From: Doug Ledford <dledford@redhat.com>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: Michael Evans <mjevans1983@gmail.com>,
Eyal Lebedinsky <eyal@eyal.emu.id.au>,
linux-raid list <linux-raid@vger.kernel.org>
Subject: Re: mismatch_cnt again
Date: Sat, 07 Nov 2009 09:58:40 -0500 [thread overview]
Message-ID: <4AF58B20.3000409@redhat.com> (raw)
In-Reply-To: <87tyx6tpcb.fsf@frosties.localdomain>
[-- Attachment #1: Type: text/plain, Size: 3775 bytes --]
On 11/07/2009 08:51 AM, Goswin von Brederlow wrote:
> Michael Evans <mjevans1983@gmail.com> writes:
>
>> Your dmesg and/or the syslog stream of the same kernel warnings/info
>> should show you when and where these errors occurred.
>
> I believe mismatch count doesn't show up in the kernel. The mismatch
> count shows where data can be read clearly from the disks but the
> computed parity does not match the read parity (or the mirrors
> disagree). If the drive reports an actual error then the block is
> recomputed and not left as mismatch.
>
> So this would be caused by a bit flipping in ram (cpu, controler or
> disk) before being written to the platter, flipping in the cable or
> flipping on the platter. Or software.
>
> I currently only have mismatches on raid1. In both cases on a device
> containing swap on lvm, which I think is the culprit. Lucky me.
I'm very quickly starting to become dubious of the current mismatch_cnt
implementation. I think a kernel patch is in order and I may just work
on that today. Here's the deal: a non-0 mismatch count is worthless if
you don't also tell people *where* the mismatch is so they can
investigate it and correct it.
And Goswin is correct, once a mismatch exists, reading the mismatch
would not normally produce any kernel messages because the data is being
read just fine, it's simply inconsistent (bad parity or disagreeing
copies in raid1/10). Whatever *caused* it to be inconsistent might show
up in your logs (system crash, drive reset) or it might not (sectors
went bad on a disk and were reallocated by the disk's firmware so they
now read all zeros or just random junk instead of your data).
And actually, with 1TB drives, your most likely culprit for this is the
last item I just listed: reallocated drive sectors. Here's the deal.
If the drive detects the bad sectors during a write, it reallocates and
redoes the write to the new sectors, data saved. If, on the other hand,
the sectors go bad after the write, then whether or not your data gets
saved depends on a number of factors. For instance, if the sectors were
going bad slowly and you also read those sectors on a regular basis so
the drive firmware would have reason to know that they are going bad (it
would start gettings reads with errors that it had to ECC correct before
it went totally bad), then some drives will reallocate the sectors and
move the data before it's totally lost. But, if they go bad suddenly,
or if they went bad without having frequent enough intervening reads to
pick it up that it was on its way to going bad, then the data is just
lost. But, that's what RAID is for, so we can get it back. Anyway,
that's my guess for the culprit of your situation. And, unfortunately,
without getting in and looking at the mismatch to identify the correct
data, a repair operation is just as likely (50-50 chance) to corrupt
things as opposed to correct things.
With Fedora 11 there should be the palimpsest program installed. Run it
and it will allow you to see the SMART details on each drive. Take a
look and see if you have any showing reallocated sectors. I happen to
have 4 of 6 drives in my array that show reallocated sectors. I also
happen to be lucky in that none of my weekly raid-checks have turned up
a mismatch count on any devices, so the bad sectors must have been
caught in time (or there was a read error sometime for the sectors and
the raid subsystem corrected it, but if that happened I missed it in the
kernel logs).
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: CFBFF194
http://people.redhat.com/dledford
Infiniband specific RPMs available at
http://people.redhat.com/dledford/Infiniband
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-11-07 14:58 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-07 0:41 mismatch_cnt again Eyal Lebedinsky
2009-11-07 1:53 ` berk walker
2009-11-07 7:49 ` Eyal Lebedinsky
2009-11-07 8:08 ` Michael Evans
2009-11-07 8:42 ` Eyal Lebedinsky
2009-11-07 13:51 ` Goswin von Brederlow
2009-11-07 14:58 ` Doug Ledford [this message]
2009-11-07 16:23 ` Piergiorgio Sartor
2009-11-07 16:37 ` Doug Ledford
2009-11-07 22:25 ` Eyal Lebedinsky
2009-11-07 22:57 ` Doug Ledford
2009-11-08 15:32 ` Goswin von Brederlow
2009-11-09 18:08 ` Bill Davidsen
2009-11-07 22:19 ` Eyal Lebedinsky
2009-11-07 22:58 ` Doug Ledford
2009-11-08 15:46 ` Goswin von Brederlow
2009-11-08 16:04 ` Piergiorgio Sartor
2009-11-09 18:22 ` Bill Davidsen
2009-11-09 21:50 ` NeilBrown
2009-11-10 18:05 ` Bill Davidsen
2009-11-10 22:17 ` Peter Rabbitson
2009-11-13 2:15 ` Neil Brown
2009-11-09 19:13 ` Goswin von Brederlow
2009-11-08 22:51 ` Peter Rabbitson
2009-11-09 18:56 ` Piergiorgio Sartor
2009-11-09 21:14 ` NeilBrown
2009-11-09 21:54 ` Piergiorgio Sartor
2009-11-10 0:17 ` NeilBrown
2009-11-10 9:09 ` Peter Rabbitson
2009-11-10 14:03 ` Martin K. Petersen
2009-11-12 22:40 ` Bill Davidsen
2009-11-13 17:12 ` Martin K. Petersen
2009-11-14 17:01 ` Bill Davidsen
2009-11-17 5:19 ` Martin K. Petersen
2009-11-14 19:04 ` Goswin von Brederlow
2009-11-17 5:22 ` Martin K. Petersen
2009-11-10 19:52 ` Piergiorgio Sartor
2009-11-13 2:37 ` Neil Brown
2009-11-13 5:30 ` Goswin von Brederlow
2009-11-13 9:33 ` Peter Rabbitson
2009-11-15 21:05 ` Piergiorgio Sartor
2009-11-15 22:29 ` Guy Watkins
2009-11-16 1:23 ` Goswin von Brederlow
2009-11-16 1:37 ` Neil Brown
2009-11-16 5:21 ` Goswin von Brederlow
2009-11-16 5:35 ` Neil Brown
2009-11-16 7:40 ` Goswin von Brederlow
2009-11-12 22:57 ` Bill Davidsen
2009-11-09 18:11 ` Bill Davidsen
2009-11-09 20:58 ` Doug Ledford
2009-11-09 22:03 ` Eyal Lebedinsky
-- strict thread matches above, loose matches on Subject: below --
2009-11-12 19:20 greg
2009-11-13 2:28 ` Neil Brown
2009-11-13 5:19 ` Goswin von Brederlow
2009-11-15 1:54 ` Bill Davidsen
2009-11-16 21:36 greg
2009-11-16 22:14 ` Neil Brown
2009-11-17 4:50 ` Goswin von Brederlow
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=4AF58B20.3000409@redhat.com \
--to=dledford@redhat.com \
--cc=eyal@eyal.emu.id.au \
--cc=goswin-v-b@web.de \
--cc=linux-raid@vger.kernel.org \
--cc=mjevans1983@gmail.com \
/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).