[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using dd to clone smaller drive to larger drive

Warning to archive readers. I believe a typo in one of the commands below will destroy your data. Read on...

Alvin Oga wrote:

- if you want to leave bad data behind

mount /dev/hdb1 /mnt/new-disk


	tar cvfp old-disk-paritions /mnt/new-disk

DON'T TYPE THE ABOVE. I interpreted it to mean type:
	tar cvfp /dev/hda3 /mnt/new-disk/var

(and so I had mounted /dev/hdb3 to /mnt/new-disk/var)

Now my original /var which was on /dev/hda3 appears to be completely gone. Since *this* was my attempt to back up this data, this is very bad. I had BIND running chrooted in /var/lib/named/etc/bind but now there don't appear to be such directories (/var is completely empty). I have THOSE files backed up, but the rest of var is probably not backed up. I'd be pleased if anyone could explain what happened. And more pleased if someone explained a way to recover. I should mention that while /var appears empty when you cd in there, df shows it 100% full. What gives? Thanks.


umount /mnt/new-disk

boot the new disk with a floppy or bootable cdrom and rerun grub/lilo on the new disk

Reply to: