Tools for hard drive diagnostics, repair, and data recovery
Post a reply

Re: HD Duplicator :

February 8th, 2015, 16:31

maximus wrote:If you had the ability to control a device that could turn power off and on, a script could be made to cycle the power when ddrescue exited prematurely.

Interesting. Some time ago I came up with something along those lines. It's just basically two high-side P-channel MOSFETs which would be switched on or off via a COM port or a USB-TTL serial adapter, or perhaps a parallel LPT port. Alternatively, you could just use the power control circuitry in an old USB-SATA bridge PCB.

Code:
          +12V             +12V
           +                +
           |                |
           |                |
           |               .-.
           |               | | R
           |               | |
           |               '-'
        S  |                |
           +-||     R       |
      Q    <-||     ___     |
           +-||----|___|----+
        D  |   G            |
           |                |
           V                |       R
                             \|     ___
        SATA +12V         Q   |----|___|---< from serial port
                             <|
                            |
                            |
                           ===
                           GND

The above example is the typical implementation in WD and Seagate bridge PCBs. Of course there would be additional considerations such as overcurrent protection, if desired.

Re: HD Duplicator :

February 8th, 2015, 17:40

One thing I am not sure of at this time is how to tell for sure when ddrescue exits for an error like this. I never tested it, but it should exit with the same error code as a write error as that is how it was implemented. Because my patch is basically a hack to ddrescue, it is somewhat limited in what it can do.

Re: HD Duplicator :

February 8th, 2015, 21:33

Just checked and with my patch when using either the scsi or ata passthrough options in ddrescue and it exits with an abnormal error it will return with an exit code of 1, which was what I expected. I just though of a creative way to test it by locking a drive with a password to get this result.

A side note: With a normal read the internal read command returns -1 and errno contains 5 (Input/Output error). It seems to return this for both a normal read error or any sort of abnormal error. So when using normal read commands there is no way to tell the difference as far as I can tell. It would be nice if there was a way to tell with a normal read, but I guess that may be up to the ones who write the Linux kernel.

Question: How does one edit their post on here? I wanted to edit my last post and did not see an edit button on the post when logged in.

Edit: I am able to edit this post right after posting, but there is no edit button for the previous post. Is this normal behavior on here?

Re: HD Duplicator :

February 8th, 2015, 21:48

maximus wrote:Edit: I am able to edit this post right after posting, but there is no edit button for the previous post. Is this normal behavior on here?

There is a finite edit window, after which you can no longer edit your post.

Re: HD Duplicator :

February 8th, 2015, 21:53

maximus wrote:Edit: I am able to edit this post right after posting, but there is no edit button for the previous post. Is this normal behavior on here?


Yes the editing feature is available for a short time after posting.

It allows you to fix mistakes, trigger happy posts where you miss something or think of additional, but it stops people screwing up threads or the actual timeline of posts by changing things around after the fact.

IMHO, a good idea, as only a percentage of people do the right thing.
Post a reply