Thread (21 messages) 21 messages, 9 authors, 2016-10-11

Re: Why not just return an error?

From: Wakko Warner <hidden>
Date: 2016-10-10 22:10:22

(CCs trimmed)

Anthony Youngman wrote:

On 07/10/16 18:44, Dark Penguin wrote:
quoted
I actually wanted to ask about that. Can you really ddrescue a drive
with a "hole" in it, re-add it and expect it to work?.. What happens if
you try to read from that "hole" again? And while I'm talking about
re-adding, when does it become impossible to "re-add" a drive?..
If you want to do some kernel development work, this is something
you can do something about :-)

ddrescue creates a log of sectors that failed to copy. I've been
thinking a bit about this, not least because other people have
mentioned it.
I've done disk rescues where I work and I came up with an idea to use the
device mapper targets to emulate this.  Why not just read the .log file and
create a mapping where if it's good, it goes to the disk, if bad, it goes to
error.  It obviously won't handle writes, but you can layer a snapshot
device on top of it.  When the "error" is corrected, it'll write to the
snapshot.  You can then tear everything down, and merge the snapshot into
the disk.  I tried something similar when I had a bad sector on a drive and
md kept kicking it out.  Fortunately it was in /usr and wasn't important.

-- 
 Microsoft has beaten Volkswagen's world record.  Volkswagen only created 22
 million bugs.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help