[ltp] Re: Cloning a hard disk?
Bret Comstock Waldow
linux-thinkpad@linux-thinkpad.org
Sat, 20 Aug 2005 20:36:51 +1200
--nextPart1682436.QlBjZdum33
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
On Fri, 19 Aug 2005 18:48, Jaime Iniesta wrote:
> It looks like my test didn't work. After 11 hours I aborted the process:
>
> root@0[dev]# dd if=3D/dev/hda of=3D/dev/uba bs=3D10M
> 1895+0 records in
> 1895+0 records out
> 19870515200 bytes transferred in 40062.003484 seconds (495994 bytes/sec)
On my T21, I used two identical disks, one mounted in the hard driver carri=
er=20
in the Ultrabay. I booted on Tom's disk, and ran dd:
date; dd if=3D/dev/hda of=3D/dev/hdc bs=3D16384k; date
=46or 20 G disks, this took 2.8 hours. Varying bs didn't change the time m=
uch.
On my T42, I use an external 2.5" USB2 drive case. When I tried it the fir=
st=20
time, I used the stock 40G drive plus a 40G Seagate Momentus. As the T42=20
doesn't have a floppy, and since I could leave the CDROM drive in, I booted=
=20
on the SystemRescue CD.
The first time I tried, it took 10 hours - not what I expected.
I discovered something odd, though, by accident. If I boot the machine=20
normally, then unplug the external USB drive and replug it, it will duplica=
te=20
the drive in 50 minutes. The command is:
dd if=3D/dev/hda of=3D/dev/sda bs=3D4096k
Disks are again identical (Seagate Momentus 80G now, though).
The version of dd on the SystemRescue CD and on my Gentoo install offer the=
=20
same number.
I presume the hotplugging causes it to pick up USB2 instead of USB1, and th=
at=20
explains the huge speed gain. As I'm doing this from a running system (I l=
og=20
out of X and run as root) I run fsck -f on the ext3 linux partitions=20
afterwards, and fix some small errors usually. I can then find my files on=
=20
the backup drive, and the partitions are correctly mirrored if I've changed=
=20
them.
I have switched drives and booted on the backup. My Windows 98 partitions =
are=20
also successfully copied, and I've booted on that.
Neither in the T21, nor with the T42, have I been able to duplicate Windows=
=20
2000 or XP with this scheme. In fact, the ORIGINAL copy will stop working=
=20
properly too! It accepts my password, shows me the Royal Hourglass, and=20
returns me to the login dialog.
Happily, I have little need for Windows these days, and can run it in VMwar=
e=20
when I do.
I don't remember if I've tried the hotplug trick with the SystemRescue CD, =
and=20
it's copy of dd. I will tonight.
Cheers,
Bret
--nextPart1682436.QlBjZdum33
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQBDBuun922F8D4woqURAtqQAJ9cJ35Xjoy43khCiJZnHXR8iexMvgCfbTql
evH2Ibff1N1zg2ny/93IiIU=
=057f
-----END PGP SIGNATURE-----
--nextPart1682436.QlBjZdum33--