ddrescue to recover files from a hard drive. Details:
- 500GB SATA drive,
- 2 Partitions (e.g.
sdb3) – each with about 200 GB of data,
- connected with SATA adapter to USB,
sudo ddrescue -d /dev/sdb2 sdb2.img sdb2.logfile --force -R.
The disk is pretty damaged from what I've experienced:
- Takes a very long time to mount and browse.
- Becomes unresponsive intermittently.
- Not much luck copying across files individually one by one.
I've been running
ddrescue on each partition and see something strange but which gives me hope.
ddrescuejust seems to hang at various points in time, i.e.
oposdon't move and neither does
run time. Current rate stays very high and does not change. What is happening here? Is the drive just becoming completely unresponsive for a while?
- Very often
ddrescueis not making any progress rescuing anything and
last sucessful readstarts to count up for a very long time – indefinitely really. When this happens I
^Cout, powercycle the drive and start
ddrescueagain. Surprisingly it immediately starts succeeding in rescuing files at very high speeds. Sometimes this lasts and sometimes it's dead in the water after a few seconds.
It looks like this:
rescued: 10970 MB, errsize: 338 MB, current rate: 15073 kB/s ipos: 191426 MB, errors: 3806, average rate: 15612 kB/s opos: 191426 MB, run time: 1.65 m, successful read: 0 s ago
and a while later:
rescued: 11402 MB, errsize: 600 MB, current rate: 0 B/s ipos: 144382 MB, errors: 7149, average rate: 4299 kB/s opos: 144382 MB, run time: 7.66 m, successful read: 2.06 m ago
The fact that the drive reads absolutely fine for a while after it's first plugged in makes me think there is something other than bad sectors at play here. Could I for example write a bash script that power cycles and restarts
ddrescue often? Will this kill the drive? For info, I took some practices into play from this post about