Hi:
That should be fine.
You can go to 1 TB if you want with no problem.
Just make sure you can get a SATA II hard drive. A SATA III hard drive may note work because of this document.
http://h20566.www2.hp.com/hpsc/doc/public/display?sp4ts.oid=3718645&docId=emr_na-c02711513-3
I have the dc7800 (which is about the same as the dc5800) and I installed a SATA III hard drive and it exhibited the same problems listed in the above document.
At first I thought I got a bad HDD, so I returned it and the replacement did the same thing.
So, I took the 1 TB SATA III hard drive out of my HP 8200 Elite CMT, and it worked fine in my dc7800 because it was a Seagate hard drive made for HP.