bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] How to do this...?


From: Paul L Daniels
Subject: Re: [Bug-ddrescue] How to do this...?
Date: Sat, 21 Jun 2014 01:35:18 +1000

On Fri, 20 Jun 2014 17:28:20 +0200
Antonio Diaz Diaz <address@hidden> wrote:

> Paul L Daniels wrote:
> > I need ddrescue to exit (with non-zero code perhaps) as soon as the
> > read rate hits zero, so that I can then power down the HDD, wait a
> > few minutes, and then have it power back up, all using a script, ie;
> 
> What about 'ddrescue --timeout=0'?

        Thanks, that seems to be working on my initial tests.

        I've written a small tool this evening to help me do the whole
        thing cleanly, called it "waitfordevice" ( rather unoriginal
        ).  Available as source at http://ctpc.biz/waitfordevice.c

        I just build it using;
                 gcc waitfordevice.c -o waitfordevice

        ...and then in the script...

#!/bin/sh

while [ 1 -eq 1 ]; do
        ./powerSwitch on 3
        ./waitfordevice -d /dev/sde -v
        sleep 2
        ddrescue --timeout=0 -v -f /dev/sde drive.img drive.log
        ./powerSwitch off 3
        echo "Sleeping..."
        sleep 60
done
        
        It works well for those drives that read a small amount and
        then suddenly report a very large error, like 50MB read, 499GB
        ERROR.  

        Using the above setup I've managed to now recover most of the
        drive, where's previously I'd have just given up.

        The "waitfordevice" tool also lets you put in a drive
        signature / serial test to make sure you've got the same drive
        again, ie;  ./waitfordevice -v -d /dev/sde -s ST9750420AS


Regards,
Paul.

-- 
Computer Repairs for Charters towers - http://ctpc.biz
A.B.N. 19 500 721 806



reply via email to

[Prev in Thread] Current Thread [Next in Thread]