Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


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.

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.