Re: Replacing a hard drive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Bowie Bailey wrote:
I have a CentOS 4.4 system where all of the main filesystems are on a
single hard drive.  This drive is starting to give some errors, so I got
a new (larger) drive to replace it with.  What is the easiest way to
copy my filesystems over to the new drive?

I considered using dd, but I lose the extra capacity of the new drive
that way.

Not necessarily.


I tried using SystemImager, but it is giving me some errors.

I think the easiest way may be to boot from the LiveCD, recreate the
partitions, copy the info with rsync and then fix the boot partition and
grub.  Any tips or pointers to a good how-to?

I don't see a particular advantage to rsync for a once-off copy. My perennial favourite is
tar clC / ... | tar xpC ....

Insert ssh if you need to copy system to system. insert buffer into the chain if you have it. Use compression if you're copying over a slow network.

btw I recently did this, and I discovered the failing drive didn't work at all in a USB enclosure.

I used the tar trick, it's more robust than dd when some stuff can't be read.

You might want to enclose the commands:
(tar ... | tar ...) 2>&1 | tee /tmp/reportfile
because if there are lots of errors, you probably want to know there are lots of errors and be able to inspect them later.

We lost stuff - stuff like the squid cache, some mirrored Linux - stuff that was fairly easy to ignore/recreate.




--
Bowie
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



--

Cheers
John

-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxx

Please do not reply off-list
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux