Re: OT: Mirroring via disk image file
Roberto C. Sanchez wrote:
On Sun, Oct 30, 2005 at 03:15:56PM -0500, Marty wrote:
I plan to mirror then replace a hard drive, using an identical model drive.
Instead of a device-device copy e.g. "cp /dev/hda /dev/hdb" I hope to do
"cp <old drive> image" followed by cp image <new drive>" where "image" is
a disk image file of the original drive.
Will the physical sector arrangment be preserved using the intermediate image
file, or is that only possible with the device-device copy? I'm asking here
because don't have the identical drives available to test my theory beforehand.
[Assumption, current hard drive is hda, CD-ROM is hdc]
If the drives are *exactly* identical,
*exactly*, can that mean both e.g. 80GB drives?
you can move your old drive to be
the slave on the secondary ide channel, which makes it hdd. Then place
the new drive on hda. Boot Knoppix, or another suitable live CD distro,
and then do this:
dd if=/dev/hdd of=/dev/hda
Make absolutely 100% sure that hdd contains the old drive and hda the
new drive, or you will obliterate your data with garbage. Also, make
sure that you specify `if' and `of' correctly, since `i' and `o' are
next to each other on a qwerty keyboard.
If you would like to this reasonably quickly, I would recommend enabling
DMA on the drives after booting. I believe that Knoppix leaves it off
by default since it can cause problems in some rare cases.