Re: Why not just return an error?

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

 



(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.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux