linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wols Lists <antlists@youngman.org.uk>
To: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>,
	Eyal Lebedinsky <eyal@eyal.emu.id.au>
Cc: linux-raid@vger.kernel.org
Subject: Re: using the raid6check report
Date: Sun, 8 Jan 2017 21:06:14 +0000	[thread overview]
Message-ID: <5872A9C6.7010408@youngman.org.uk> (raw)
In-Reply-To: <20170108204659.GB7057@lazy.lzy>

On 08/01/17 20:46, Piergiorgio Sartor wrote:
> "should" as in "it is supposed to do it".
> 
> So, as far as I know, "raid6check" with "repair" will
> check the parity and try to find errors.
> If possible, it will find where the error is, then
> re-compute the value and write the corrected data.
> 
> Now, this was somehow tested and *should* work.
> 
> An other option is just to check for the errors and
> see if one drive is constantly at fault.
> This will not write anything, so it is safer, but
> it will help to see if there are strange things,
> before writing to the disk(s).

Hmmm ...

I've now been thinking about it, and actually I'm not sure it's possible
even with raid6, to correct a corrupt read. The thing is, raid protects
against a failure to read - if a sector fails, the parity will re-create
it. But if a data sector is corrupted, how is raid to know WHICH sector?

If one of the parity sectors is corrupted, it's easy. Calculate parity
from the data, and either P or Q will be wrong, so fix it. But if it's a
*data* sector that's corrupted, both P and Q will be wrong. How easy is
it to work back from that, and work out *which* data sector is wrong? My
fu makes me think you can't, though I could quite easily be wrong :-)

But should that even happen, unless a disk is on its way out, anyway? I
remember years ago, back in the 80s, our minicomputers had
error-correction in the drive. I don't remember the algorithm, but it
wrote 16-bit words to disk - each an 8-bit data byte. The first half was
the original data, and the second half was some parity pattern such that
for any single-bit corruption you knew which half was corrupt, and you
could throw away the corrupt parity, or recreate the correct data from
the parity. Even with a 2-bit error I think it was >90% detection and
recreation. I can't imagine something like that not being in drive
hardware today.

Cheers,
Wol

  reply	other threads:[~2017-01-08 21:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23  0:56 using the raid6check report Eyal Lebedinsky
2017-01-08 17:40 ` Piergiorgio Sartor
2017-01-08 20:36   ` Eyal Lebedinsky
2017-01-08 20:46     ` Piergiorgio Sartor
2017-01-08 21:06       ` Wols Lists [this message]
2017-01-08 21:20         ` Eyal Lebedinsky
2017-01-08 21:43         ` Piergiorgio Sartor
2017-01-08 20:52   ` Wols Lists
2017-01-08 21:41     ` Piergiorgio Sartor
2017-01-08 22:39       ` NeilBrown
2017-01-09  0:32         ` Eyal Lebedinsky
2017-01-09  1:56           ` NeilBrown
2017-01-09  2:13             ` Eyal Lebedinsky

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=5872A9C6.7010408@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=eyal@eyal.emu.id.au \
    --cc=linux-raid@vger.kernel.org \
    --cc=piergiorgio.sartor@nexgo.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).