Rescuing a broken hard drive with ddrescue
Some quick notes in case I ever have to do it again. A WARNING and REMINDER: this took 7 days for a 2TB disk.
One of my backup drives died and wouldn't mount. Really I was using it as an archive as I keep running out of disk space. This is probably a bad idea. Anyway I have rescued it.
My initial thought was using dd but this just kept failing (on unmounted disks; 5 was my new one, 4 the old one, identified using Disk Utility on my mac or diskutil list
)
sudo dd bs=4M if=/dev/disk5s2 of=/dev/disk4s1
dd: /dev/disk5s2: Input/output error
A bit of searching round I found a shit article on ddrescue
but that led me to the excellent manual page. The first example on there worked for me as a template ("Example 1: Fully automatic rescue of a whole disc with two ext2 partitions").
I used brew install ddrescue
then
sudo ddrescue -f -r3 /dev/disk4 /dev/disk5 mapfile
[5 passes for Copying non-tried blocks
, 2 for Trimming failed blocks
, 3 for Retrying bad sectors
]
rescued: 2000 GB, bad areas: 14, run time: 7d 1h 14m
then
sudo fsck_hfs -fy -l /dev/disk5s2
** The volume LaCie appears to be OK.
Hooray!