Hi Mirko, > 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
That might work if you're lucky. And by lucky I mean that a) your dying hard drive is still functional enough that dd can read all files on it and copy them over to the new drive, and b) your system is absolutely idle when you do this dd copying, such that the file system doesn't change during the copying, since otherwise your copy might not be mountable. But I don't think you can 'dd' an entire drive like that; I think you need to first partition the new drive identically to your old drive, and then coppy each partition with dd if=/dev/sda1 of=/dev/sdc1 and so on. I've done that in the past, and usually had to try several times until I had a file system copy which was mountable. I always make sure that there's NOTHING running on the machine, and so a 'sync' several times before starting the copy, just for good measure. Assuming that works, you'll still need to boot the system with a live or rescue CD or something equivalent after you switched to the new drive and "find" the new O/S and mount it with 'chroot', and then add the boot loader to the new master boot record with something like /sbin/grub-install /dev/sda and that should make your new drive bootable. > Or is there another preferable solution? Not that I know of. Good luck, Horst _______________________________________________ rhelv5-list mailing list rhelv5-list@redhat.com https://www.redhat.com/mailman/listinfo/rhelv5-list