Subject: Re: Bad sectors vs RAIDframe
To: Thor Lancelot Simon <tls@rek.tjls.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 06/08/2005 20:13:41
On Wed, Jun 08, 2005 at 01:43:20PM -0400, Thor Lancelot Simon wrote:
> we _know_ that, because the interface between them and the host doesn't
> really give them any other option, IDE drives generally spare sectors
> out only when those sectors are written to -- so, if you see a read
> error on such a disk, and you have the data available to write back,
> you should.
> 
> In the RAID case, if you're still redundant, you are guaranteed that
> you do have the data available to write back.  So, if you get a single
> error reading a stripe, you still got the data you needed in order to
> issue the write that will fix the bad sector on the one disk that
> failed the read.
> 
> I'm not talking about post-failure recovery -- what I'm actually talking
> about is using the RAID redundancy to _synchronously_ fix bad sectors
> on IDE disks, so that it's never necessary to fail a component, a stripe,
> a hypothetical zone, etc. at all.

Note that SCSI drives could also benefit from this. But it would be nice
if the disk driver reported different error codes for error that could
be cleared by a rewrite from errors that won't. It should be easy to
do for SCSI, and we can make some distinctions for IDE too (for example,
a commmand which completed with error vs a command timeout).

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--