On 14 October 2011 14:30, Mirko Vukovic <mirko.vuko...@gmail.com> wrote:

> The drive /dev/sda on which the kernel, root, and RHEL in general live is
> slowly dying (based on smartctl).  I have the replacement drive in hand.
>
> Is the following possible?
>
> - put the replacement drive into an empty bay
> - clone /dev/sda onto it like: *dd if=/dev/sda of=/dev/sdc
> *- move the new drive into the /dev/sda drive bay
>
> Or is there another preferable solution?
>
>

I've done this several times, but there are caveats:

* Ideally the new drive should be identical to the old drive, but it needs
to be a least bigger and not have any funny CHS features (not a problem with
most recent drives).

* The old disk needs to be sufficiently healthy to be read without  problems

* You must do this from a rescue disk with nothing mounted

Given those three things it's far and away the easiest way to clone the
disk.   It's also pretty slow.  Actually, unless you also have something
like "bs=4M" it's very slow: the default block size for dd is 512 bytes and
that's a little slow to be useful.   4M is probably overkill, smaller
blocksizes will be just as fast because dd doesn't run its reads and writes
in parallel.

It's much quicker to copy the individual file systems, but much harder. I
usually use tar for this -- you need to make sure you preserve extended
attributes (--xattrs) at least (man tar).

jch
_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to