Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've seen that there's a good amount of relocated sectors on my home server with one harddrive, so it should be about time to replace it.

Sure, I can plug the replacement harddrive in, format and begin from scratch, but it doesn't feel so compelling.

As this home server currently isn't equipped with any RAID, I guess that I am stuck at connecting a second harddrive and transfer the content from the old harddrive onto the replacement and then switch the default harddrive inside the OS (Ubuntu 10.10).

For me, having zip-zero experience of this, I do not know where to begin.

  1. How can I transfer the data from Harddrive 1 -> Harddrive 2?
  2. How do I switch the "main harddrive" inside my Ubuntu 10.10?

Thanks

share|improve this question

closed as off-topic by Falcon Momot, Ward, Bryan, Scott Pack, Iain Jul 6 '13 at 16:24

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about hardware or software used in a home setting are off-topic because they require answers that may not be practical for the business and support professionals here. You should try asking on Super User instead." – Falcon Momot, Ward, Bryan, Scott Pack, Iain
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 0 down vote accepted

It's possible there are custom tools for this, but if you want to get your hands dirty and do it yourself, the stages are:

  1. Attach the new HDD physically. Identify the device (/dev/hdc, /dev/sdba, whatever).
  2. Use fdisk to partition the new disc. Don't forget to tag the partition that will be the new /boot as being bootable.
  3. Mount the new partitions one at a time, on /mnt. With the machine quiescent (single-user mode is best), use dump | restore to copy the data from each old partition to each new partition.
  4. Use grub to install an MBR on the new HDD.
  5. Remove (and carefully store!) the old HDD, replacing it with the new one. Have bootable media to hand in case it fails to boot from the new HDD.
  6. Once you're completely happy with the new HDD, put the old one into a chassis and use DBAN to securely wipe it before disposal.

Each of these steps has a lot of fiddly detail involved, and you are strongly advised to read around each step, and try it on a dev box, before doing it on your live box. But you will have learned a lot about low-level systems admin by the time you've done all this. Good luck!

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.