All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wakko Warner <wakko@animx.eu.org>
To: Anthony Youngman <antlists@youngman.org.uk>
Cc: linux-raid@vger.kernel.org
Subject: Re: Why not just return an error?
Date: Mon, 10 Oct 2016 18:10:22 -0400	[thread overview]
Message-ID: <20161010221022.GA16060@animx.eu.org> (raw)
In-Reply-To: <b9e7054f-8d68-c576-41a5-aec60c53aa9b@youngman.org.uk>

(CCs trimmed)

Anthony Youngman wrote:
> 
> 
> On 07/10/16 18:44, Dark Penguin wrote:
> >
> >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.

  parent reply	other threads:[~2016-10-10 22:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 23:32 Why not just return an error? Dark Penguin
2016-10-07  5:26 ` keld
2016-10-07  8:21   ` Rudy Zijlstra
2016-10-07  9:30     ` keld
2016-10-07 11:21 ` Andreas Klauer
2016-10-07 14:43   ` Phil Turmel
2016-10-07 16:23     ` Dark Penguin
2016-10-07 16:52       ` Phil Turmel
2016-10-07 17:44         ` Dark Penguin
2016-10-07 18:41           ` Phil Turmel
2016-10-07 20:39             ` Dark Penguin
2016-10-07 23:11             ` Edward Kuns
2016-10-10 20:47           ` Anthony Youngman
2016-10-10 21:37             ` Andreas Klauer
2016-10-10 21:55               ` Wols Lists
2016-10-11  4:00                 ` Brad Campbell
2016-10-11  9:18                   ` Wols Lists
2016-10-11 10:01                     ` Brad Campbell
2016-10-11 10:15                       ` Wols Lists
2016-10-10 22:10             ` Wakko Warner [this message]
2016-10-07 14:19 ` Phil Turmel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161010221022.GA16060@animx.eu.org \
    --to=wakko@animx.eu.org \
    --cc=antlists@youngman.org.uk \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.