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

Steve Litt slitt at troubleshooters.com
Fri Nov 13 10:32:17 PST 2015

On Fri, 13 Nov 2015 12:50:41 -0500
H P Ladds <householdwords at gmail.com> wrote:

> Experimenting with dd, ddrescue, rsync. Backing-up a 3 gig thumb
> drive to new 2TB external hard drive.
> My greatest success thus far: Rsync copyies all content from 3 gig
> thumbdrive. 

To where?

Rsync was never designed to copy data from damaged disks, and yes, for
sure rsync requires source and destination have a filesystem and to be
mounted. Wrong tool.

> However, I believe the partitions of a rsync transaction
> need to be mounted. I can't mount one of the partitions of the
> failing drive. So it won't help me recovery the data.
> dd renders my new drive unrecognized by my computer. If I unplug the
> USB and power, and then reconnect the drive it works, but no content
> is on the new drive.

dd substitutes garbage for bad disk locations. Better than rsync under
these conditions, but not ideal.

> ddrescue results in one of these three: Renders the drive
> unrecognizable -- as discribed above.  Returns a "ddrescue no space
> left on device" message. Or all seems to go well but mounting the new
> hard drive results in an empty loop device being mounted (according
> to my file manager -- Dolphin.)

The preceding paragraph makes it sound like this is an intermittent
situation. If true, that just makes things worse.

Let's move all the way back... Why are you trying to rescue this disk?
Is there anything on it that won't be replaced by a clean install? If
there is, is a substantial part that would cause you extreme distress
if it were lost forever?

If the answer to either of the above is "no", then reinstall on your
new disk and move on, because the stuff you need to do to recover,
which may or may not be successful, is difficult, time consuming, and
technical. For instance, forget file managers: You do this stuff at the
command prompt.

And while we're on the subject of command prompts, if you used file
manager to check /whatever while booted to System Rescue CD or another
live CD, recheck to make sure you're checking the mounted version
of /whatever and not the one native to your live CD.

If there's data you really need that can't be replaced by a reinstall
or a backup (you have been doing backups, haven't you?), then ask
yourself which of the two partitions contains such data. You
might prefer to recover only that one.

On the other hand, if the part of your disk that's flaky contains the
mbr or GPT, then you're not going to be able to reliably get your hands
on a specific partition: Best to ddrescue the whole thing, and hope
ddrescue does a good job recovering the mbr or GPT area.

If this happened to me, I'd do a high-recount version of ddrescue to
grab the 512byte mbr or the (I don't know how big) primary (start of
disk) GPT and secondary (end of disk) GPT. Once your partition table is
absolutely known, you can ddrescue the entire device (low repeat count
for less-than-24-hour time), and then use dd to impose the fixed
version of the original mbr or GPT.

The preceding paragraph just might imply you need more known good hard
disks to complete this process. This is one of the many reasons I
initially asked you how much you really need this data. 3GB disks are
about $120 each. For certain data, buying two of those is a nobrainer
and you thank your lucky stars to have the opportunity. For other data,
why would you spend $240. If yours is the latter situation, just install
new and move on. As you've already seen, a clean new installation is
less work than recovering a seriously impaired disk.


Steve Litt 
November 2015 featured book: Troubleshooting Techniques
     of the Successful Technologist

More information about the svlug mailing list