I'm attempting to recover as much data as possible from a failed 750 GB hard drive which is connected via a USB 3 drive enclosure.
The drive itself has over 1500 bad blocks, detected by badblocks
on Linux.
It mounts perfectly on my computer (running macOS 10.12), but when data from a corrupt block is read, the drive idles for a few seconds, disappears from /dev
, and then reappears — as if someone had unplugged the USB cable and then quickly plugged it back in again.
The first bad block occurs about 136 GiB from the start of the disk, however this is not the only one. This is evidenced by output from badblocks
, along with when both dd
and ddrescue
fail.
dd
and ddrescue
both fail as soon as they read data from a bad block, since the drive then disappears from /dev
:
dd if=/dev/rdisk3 of=image.img bs=16m
:
ddrescue -v /dev/disk4 image.img logfile
:
Rerunning ddrescue
after the initial termination with the same log file results in it immediately terminating and not advancing further.
Since I am able to traverse the filesystem and access some files normally, I wrote a script to determine which files are accessible and which aren't, so I can copy the known good files from the disk. However, this is slow, and I'm worried that it may damage the disk further.
Is there any tool similar to dd
or ddrescue
which can recover data from this drive, which just waits for the drive to remount instead of automatically quitting upon reading a bad block?
I'm able to use both macOS as well as Linux (Ubuntu), so solutions for either platform would work for me.
/dev
", not theumount
command, right? I'm asking to avoid terminology confusion. I thinkddrescue
is supposed to continue its interrupted run when you invoke it with the same logfile. Maybe you can write a simple script that runsddrescue
after a while again and again – and see if it advances your progress. Another approach is to fabricate the initial logfile (based on thebadblocks
result) soddrescue
never touches problematic sectors. There isddrescuelog
tool that may help. Just an idea, I have never done it myself./dev
(and is sometimes assigned a new identifier upon remount). Rerunningddrescue
again results in immediate termination, it never advances further. I'll experiment with manipulating the log file to see if that yields any results.badblocks
had no problems, right? Have you triedddrescue --direct
option?