[opensuse] Re: Copy hard drive
Jonathan Arnold wrote:
SMART is saying that one of my hard drives is an accident waiting to happen and that I should replace it. No worries there, as I have two 160gb hard drives just sitting around in an unused box I was going to cannibalize anyway. But it does have / and /home on it, so what would be the best way to go about doing this? I think I have an IDE slot to plug in the new drive, or at least I could temporarily replace my CD or something.
I assume I would want to use dd or something?
If they are the same size, dd is perfect. Otherwise, rsync is a good choice as well. But -a (as mentioned by Pete) is not sufficient, it looses hard links. Therefore, you should add at least -H and do the rsync file-system wise (otherwise the hard-link detection will fail). Of course, you can also use find -xdev $src_dir | cpio -pdmuV $dest_dir For local file tree copies, cpio is a fast true-and-tried method. You probably don't want to replace your CD, as you need it to boot the rescue system from the SUSE DVD, which you will use to copy /. Try to avoid copying / from an active system. Don't forget to grub --install the new disk afterwards, otherwise you won't be able to boot from it. Good luck, Joachim PS: That's the reason why all my systems use Software mirroring with md, even if there's only one disk in it. (Well, most have two mirrored disks anyhow -- disk prices are so low today.) If I need to replace the disk, I have almost no outage, this can be done with mdadm during normal usage, except for the very short time to put the disk into the chassis. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (1)
-
Joachim Schrod