-   Linux - Software (
-   -   using ddrescue on failing drive (

zenmatrix83 01-02-2014 06:58 PM

using ddrescue on failing drive
I have an external drive I stored movies on that started to fail and the partition is damaged to the point I can't access it normally. Some of these haven't been backed up yet and are quite important. I was able to restore some using photorec but started getting a lot more errors reading sectors. It starts out at about 3-4/mbps and then ultimately slows to about 141/kbps. I understand that it slows down on worse spots but I've never seen it speed up. If I interupt it though and start it again some times I can get it back to the 3-4mbs.

I'm trying to find the best way to get through most of the information that I can then try to recover the bad block. Right now I'm running it with this command and output

root@ubuntu:/home/stephen/movies# ddrescue -v -n -S /dev/sdc drive recovery.log

GNU ddrescue 1.16
About to copy 2000 GBytes from /dev/sdc to drive
Starting positions: infile = 0 B, outfile = 0 B
Copy block size: 128 sectors Initial skip size: 128 sectors
Sector size: 512 Bytes

Press Ctrl-C to interrupt
Initial status (read from logfile)
rescued: 17575 MB, errsize: 5353 MB, errors: 139
Current status
rescued: 19714 MB, errsize: 5376 MB, current rate: 170 B/s
ipos: 25091 MB, errors: 147, average rate: 2350 kB/s
opos: 25091 MB, time since last successful read: 0 s
Copying non-tried blocks...

This is the first time I've used this tools since I'm usually really good at backing stuff up so I'm trying to not let the learning curve hurt too much. My plan on is to start with this command

ddrescue -v -n -S

then go to

ddresucue -v -r3 -S

then finish with

ddrescue -v -R -s

and then accept thats all I'm going to get.

Thanks or any help

unSpawn 01-02-2014 09:31 PM


Originally Posted by zenmatrix83 (Post 5090873)
and then accept thats all I'm going to get.

Note there's also dd_rescue. The one thing that makes it stand out is its ability to read back to front. Helpful if you encounter a situation in which ddrescue slows down or halts.

zenmatrix83 01-03-2014 03:04 PM

Thanks for the reply, I looked at that but ddrescue(the GNU version) seemed to be the better algorithm. From there documentation they grab as much data as possible going in the normal direction skipping slow parts then later go to the slow parts and then read backwards in those areas, at least that's I how I understand it. I found a way to make it a lot faster, at least it spurts, but I'm not sure how much damage this could do with starting and stopping the process so much. I create two scripts that run, since I want to see the output. The first one is a infinite loop which relaunches the ddrescue every time its interrupted


while :
        echo $dt
        ddrescue -n -v -S /dev/sdc drive.img recovery.log

the second one sends SIGINT to interupt it, which is the same as pressing ctrl C


while :
        kill -SIGINT $(ps aux | grep 'ddrescue' | awk '{print $2}')
        sleep 11m       

I found that about 11 mins seems to get me the best speed, I'm getting an average speed of around 3-11mb vs the sustained 141kb that I got over a comparable time frame. I'm not saying this is the best or even a correct but this turned an estimated time from years to a few days for the first pass.

unSpawn 01-04-2014 06:10 AM


Originally Posted by zenmatrix83 (Post 5091347)
(..) I'm not sure how much damage this could do with starting and stopping the process so much.

You can use 'md5deep' in piecewise mode to generate a list of hashes from the file and compare that against the disk to see what's missing. If you suspect the state of the disk being subject to deterioration then only do that after you've completed your ddrescue processes.

haertig 01-04-2014 05:47 PM

Remember, you use ddrescue to COPY the failing disk, then you use photorec to retrieve data from the COPY. It sounds like you might have used photorec directly on the bad disk (not sure about that, but it seems like you maybe did that). This may cause the bad disk to fail sooner, so you should really only use photorec on your copy, if at all possible. Make your bad disk last as long as possible by copying it only once, thus minimizing the reads to it, then doing all your recovery work from the copy.

All times are GMT -5. The time now is 03:46 PM.