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
ddrescue both fail as soon as they read data from a bad block, since the drive then disappears from
dd if=/dev/rdisk3 of=image.img bs=16m:
ddrescue -v /dev/disk4 image.img logfile:
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
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.