From HSF+ to HSF+ drives
So this can be found via search, you meant HFS+ (Hierarchical File System).
Helpful tip: you can do
sudo -s by itself to drop you into a root level shell thus you only type sudo once (drop it from commands above). So, do so:
$ sudo -s
Indeed, ddrescue is taking an eternity for me but my drive is rather hosed. If you create a log file (as you should), you can always stop it and restart with new parameters. From what I've found so far (updates may follow), the best way to use the tool follows.
First, using either a Unix command (below) or Disk Utility GUI, unmount the failing partition(s) if they mounted
# diskutil unmount disk0s5
# ./ddrescue -v -n /dev/disk0s5 MyVolImage.dmg MyVolRescue.log
The log is critical. It allows you to interrupt the program at any time as well as run it against the drive multiple times.
(Note, both the target image file and the log file must be stored on a reliable drive and not the bad drive (which you unmounted anyway). Ensure you know where they will be stored. The above command would place them in the same folder as ddrescue. Also of note, the entire source disk will be copied into the image so you must have enough disk space on the target volume.)
The -n option tells it to run through the entire disk to copy off everything it can without retrying (rescuing). IMO, this is best as you want a baseline and helps in case the drive fully dies during the process. Once that finishes, run it again to go after the bad areas of the disk:
# ddrescue -v -r 3 /dev/disk0s5 MyVolImage.dmg MyVolRescue.log
The -r 3 tells it to retry bad areas 3 times. Note, we're reusing the log file created the first time. You can set that as high as you have patience for but you may want to save some time for a final run.
# ddrescue -v -r 3 -R /dev/disk0s5 MyVolImage.dmg MyVolRescue.log
as the manual states -Retrimming the areas already marked bad can lead to success as it will retry the sectors in a different order.
Instead of doing this:
# ./ddrescue -v MyVolImage.dmg /dev/disk1s3 restore.log
You may be able to use Disk Utility to mount a copy of the Image, repair if necessary and go from there. It's best to copy the disk image before modifying it in case there are problems. The Finder ought to copy faster than ddrescue, too. I'm thinking working with the image is easier because you don't have to worry about partition size problems with an actual disk.
Further recovery tools are testdisk (didn't try it and not sure I want to) and PhotoRec both are at CG Security and require compiling. PhotoRec can be used to recover a multitude of different types of files which is done by scavenging the drive or image regardless of directory structure.
There is talk about using raw devices to speed access but I have no proof yet that they work reliably. Prepend the letter r before
disk to have OS X use it raw (no caching).