Using dd to mirror disk



Hi,

I've been attempting to use dd to mirror a disk using the command:

dd if=/dev/hda of=/dev/hdc bs=1024

Here's the original disk:

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 144 1052257+ 82 Linux swap
/dev/hda3 145 271 1020127+ 83 Linux
/dev/hda4 272 14593 115041465 f Win95 Ext'd (LBA)
/dev/hda5 272 1546 10241406 83 Linux
/dev/hda6 1547 2438 7164958+ 83 Linux
/dev/hda7 2439 2565 1020096 83 Linux
/dev/hda8 2566 14593 96614878+ 83 Linux


And here's the second disk, after performing the dd operation:

Disk /dev/hdc: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 83 Linux
/dev/hdc2 14 144 1052257+ 82 Linux swap
/dev/hdc3 145 271 1020127+ 83 Linux
/dev/hdc4 272 14593 115041465 f Win95 Ext'd (LBA)
/dev/hdc5 272 1546 10241406 83 Linux
/dev/hdc6 1547 2438 7164958+ 83 Linux
/dev/hdc7 2439 2565 1020096 83 Linux
/dev/hdc8 2566 14593 96614878+ 83 Linux


All looks well, but none of the partitions on hdc can be mounted:

eg,

mount /dev/hdc7 /mnt

generates the following errors in /var/log/messages (as well as the
standard "wrong fs type, bad option, bad superblock on /dev/hdc7")

May 26 09:15:40 srv2 kernel: hdc7: bad access: block=0, count=1
May 26 09:15:40 srv2 kernel: end_request: I/O error, dev 16:07 (hdc), sector 0
May 26 09:15:40 srv2 kernel: FAT: unable to read boot sector

Any thoughts?

Thanks,
Pete

.



Relevant Pages