All times are UTC - 5 hours [ DST ]


Switch to mobile style


Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: HD Duplicator :
PostPosted: February 8th, 2015, 16:31 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 14945
Location: Australia
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.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: HD Duplicator :
PostPosted: February 8th, 2015, 17:40 
Offline

Joined: January 29th, 2012, 1:43
Posts: 995
Location: United States
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.

_________________
http://www.hddsuperclone.com
Home of HDDSuperClone


Top
 Profile  
 
 Post subject: Re: HD Duplicator :
PostPosted: February 8th, 2015, 21:33 
Offline

Joined: January 29th, 2012, 1:43
Posts: 995
Location: United States
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?

_________________
http://www.hddsuperclone.com
Home of HDDSuperClone


Top
 Profile  
 
 Post subject: Re: HD Duplicator :
PostPosted: February 8th, 2015, 21:48 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 14945
Location: Australia
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.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: HD Duplicator :
PostPosted: February 8th, 2015, 21:53 
Offline
User avatar

Joined: December 4th, 2012, 1:35
Posts: 3779
Location: Adelaide, Australia
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group