[svlug] Failing external drive. Planning to DD the failing drive to new external drive. Help please

Sarah Newman newmans at sonic.net
Thu Nov 12 10:57:26 PST 2015


On 11/12/2015 07:44 AM, H P Ladds wrote:
> I have an external hard drive failing and hope to DD the drive to a new external hard drive.
> 
> Should I reformat the new drive to ext3 (or ext4) before DDing?
> 
> The failing drive has two 500 gig partitions (I believe ext3). Should I DD the partitions separately or DD the entire drive?
> 
> After DDing I'll try to retrieve the data. Oh and it is all data, no OS.

What does "failing" mean? Is there data it can't read?

If there's data it can't read, I would use ddrescue to copy the entire disk to an image. ddrescue has a way to keep track of data it can't read, so if
you make two copies (one with the stuff it can't read set to 0 and one where the stuff it can't read is set to 1) you can do an md5sum on each (using
both /dev/loop0 and /dev/loop1) and compare the md5sums to find corrupted files. I can't recall exactly how to do this off the top of my head, but I
can try to dig it up if you aren't able to figure it out.

The commands for setting up are losetup /dev/loop<0 or 1> <img> , kpartx -av /dev/loop<0 or 1> to add partition mappings. Then kpartx -dv /dev/loop<0
or 1> & losetup -d /dev/loop<0 or 1> to tear it down again.

--Sarah



More information about the svlug mailing list