Skip to contentSkip to conversation

Why does one get mismatches?

DISCUSSION Jon Hardcastle 7 participants 12 messages Jan 20, 2010 – Jan 21, 2010 MD RAID

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · Brett Russ

From: Brett Russ <[email protected]>
Subject: Re: Why does one get mismatches?
To: [email protected]
Date: Wednesday, 20 January, 2010, 14:46

Quoted 1 line · Jon Hardcastle

I will gather the information you require, but so it

Quoted 9 lines

is clear it is a

Quoted 1 line

a echo 'check' that is kicking off the ultimate

mismatch not from

Quoted 1 line

boot.

What do you mean by mismatches detected?  How is this observed?
-BR

cat /sys/block/md4/md/mismatch_cnt

I have a script that i use that runs a 'check' then looks at this value once the check is complete. If it is > 0 it reports this number to me via email and then starts a repair. I am under the impression that the repair - when complete should report (in an ideal world) an identical number indicating that it did indeed find x errors and repaired them. But i am getting differing amount check shows 8 repair shows 12 next run it'll be 24 and 6 so something is up.

I have been able to get the info you asked for using mdadm -E but not with the array stopped. I cant stop it just yet. What would you be looking for in this data?

-----------------------
N: Jon Hardcastle
E: [email protected]
'Do not worry about tomorrow, for tomorrow will bring worries of its own.'

***********
Please note, I am phasing out jd_hardcastle AT yahoo.com and replacing it with jon AT eHardcastle.com
***********

-----------------------

/dev/sda1:

          Magic : a92b4efc
        Version : 0.90.00
           UUID : 7438efd1:9e6ca2b5:d6b88274:7003b1d3
  Creation Time : Thu Oct 11 00:01:49 2007
     Raid Level : raid6
  Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
     Array Size : 2441919680 (2328.80 GiB 2500.53 GB)

Raid Devices : 7
Total Devices : 7
Preferred Minor : 4

Update Time : Wed Jan 20 12:54:16 2010
State : clean
Active Devices : 7
Working Devices : 7
Failed Devices : 0
Spare Devices : 0
Checksum : b2468ec2 - correct
Events : 1834225

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 5 8 1 5 active sync /dev/sda1

   0     0       8       65        0      active sync   /dev/sde1
   1     1       8       33        1      active sync   /dev/sdc1
   2     2       8       97        2      active sync   /dev/sdg1
   3     3       8       17        3      active sync   /dev/sdb1
   4     4       8       49        4      active sync   /dev/sdd1
   5     5       8        1        5      active sync   /dev/sda1
   6     6       8       81        6      active sync   /dev/sdf1
/dev/sdb1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 7438efd1:9e6ca2b5:d6b88274:7003b1d3
  Creation Time : Thu Oct 11 00:01:49 2007
     Raid Level : raid6
  Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
     Array Size : 2441919680 (2328.80 GiB 2500.53 GB)

Raid Devices : 7
Total Devices : 7
Preferred Minor : 4

Update Time : Wed Jan 20 12:54:16 2010
State : clean
Active Devices : 7
Working Devices : 7
Failed Devices : 0
Spare Devices : 0
Checksum : b2468ece - correct
Events : 1834225

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 3 8 17 3 active sync /dev/sdb1

   0     0       8       65        0      active sync   /dev/sde1
   1     1       8       33        1      active sync   /dev/sdc1
   2     2       8       97        2      active sync   /dev/sdg1
   3     3       8       17        3      active sync   /dev/sdb1
   4     4       8       49        4      active sync   /dev/sdd1
   5     5       8        1        5      active sync   /dev/sda1
   6     6       8       81        6      active sync   /dev/sdf1
/dev/sdc1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 7438efd1:9e6ca2b5:d6b88274:7003b1d3
  Creation Time : Thu Oct 11 00:01:49 2007
     Raid Level : raid6
  Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
     Array Size : 2441919680 (2328.80 GiB 2500.53 GB)

Raid Devices : 7
Total Devices : 7
Preferred Minor : 4

Update Time : Wed Jan 20 12:54:16 2010
State : clean
Active Devices : 7
Working Devices : 7
Failed Devices : 0
Spare Devices : 0
Checksum : b2468eda - correct
Events : 1834225

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 1 8 33 1 active sync /dev/sdc1

   0     0       8       65        0      active sync   /dev/sde1
   1     1       8       33        1      active sync   /dev/sdc1
   2     2       8       97        2      active sync   /dev/sdg1
   3     3       8       17        3      active sync   /dev/sdb1
   4     4       8       49        4      active sync   /dev/sdd1
   5     5       8        1        5      active sync   /dev/sda1
   6     6       8       81        6      active sync   /dev/sdf1
/dev/sdd1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 7438efd1:9e6ca2b5:d6b88274:7003b1d3
  Creation Time : Thu Oct 11 00:01:49 2007
     Raid Level : raid6
  Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
     Array Size : 2441919680 (2328.80 GiB 2500.53 GB)

Raid Devices : 7
Total Devices : 7
Preferred Minor : 4

Update Time : Wed Jan 20 12:54:16 2010
State : clean
Active Devices : 7
Working Devices : 7
Failed Devices : 0
Spare Devices : 0
Checksum : b2468ef0 - correct
Events : 1834225

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 4 8 49 4 active sync /dev/sdd1

   0     0       8       65        0      active sync   /dev/sde1
   1     1       8       33        1      active sync   /dev/sdc1
   2     2       8       97        2      active sync   /dev/sdg1
   3     3       8       17        3      active sync   /dev/sdb1
   4     4       8       49        4      active sync   /dev/sdd1
   5     5       8        1        5      active sync   /dev/sda1
   6     6       8       81        6      active sync   /dev/sdf1
/dev/sde1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 7438efd1:9e6ca2b5:d6b88274:7003b1d3
  Creation Time : Thu Oct 11 00:01:49 2007
     Raid Level : raid6
  Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
     Array Size : 2441919680 (2328.80 GiB 2500.53 GB)

Raid Devices : 7
Total Devices : 7
Preferred Minor : 4

Update Time : Wed Jan 20 12:54:16 2010
State : clean
Active Devices : 7
Working Devices : 7
Failed Devices : 0
Spare Devices : 0
Checksum : b2468ef8 - correct
Events : 1834225

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 0 8 65 0 active sync /dev/sde1

   0     0       8       65        0      active sync   /dev/sde1
   1     1       8       33        1      active sync   /dev/sdc1
   2     2       8       97        2      active sync   /dev/sdg1
   3     3       8       17        3      active sync   /dev/sdb1
   4     4       8       49        4      active sync   /dev/sdd1
   5     5       8        1        5      active sync   /dev/sda1
   6     6       8       81        6      active sync   /dev/sdf1
/dev/sdf1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 7438efd1:9e6ca2b5:d6b88274:7003b1d3
  Creation Time : Thu Oct 11 00:01:49 2007
     Raid Level : raid6
  Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
     Array Size : 2441919680 (2328.80 GiB 2500.53 GB)

Raid Devices : 7
Total Devices : 7
Preferred Minor : 4

Update Time : Wed Jan 20 12:54:16 2010
State : clean
Active Devices : 7
Working Devices : 7
Failed Devices : 0
Spare Devices : 0
Checksum : b2468f14 - correct
Events : 1834225

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 6 8 81 6 active sync /dev/sdf1

   0     0       8       65        0      active sync   /dev/sde1
   1     1       8       33        1      active sync   /dev/sdc1
   2     2       8       97        2      active sync   /dev/sdg1
   3     3       8       17        3      active sync   /dev/sdb1
   4     4       8       49        4      active sync   /dev/sdd1
   5     5       8        1        5      active sync   /dev/sda1
   6     6       8       81        6      active sync   /dev/sdf1
/dev/sdg1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 7438efd1:9e6ca2b5:d6b88274:7003b1d3
  Creation Time : Thu Oct 11 00:01:49 2007
     Raid Level : raid6
  Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
     Array Size : 2441919680 (2328.80 GiB 2500.53 GB)

Raid Devices : 7
Total Devices : 7
Preferred Minor : 4

Update Time : Wed Jan 20 12:54:16 2010
State : clean
Active Devices : 7
Working Devices : 7
Failed Devices : 0
Spare Devices : 0
Checksum : b2468f1c - correct
Events : 1834225

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 2 8 97 2 active sync /dev/sdg1

   0     0       8       65        0      active sync   /dev/sde1
   1     1       8       33        1      active sync   /dev/sdc1
   2     2       8       97        2      active sync   /dev/sdg1
   3     3       8       17        3      active sync   /dev/sdb1
   4     4       8       49        4      active sync   /dev/sdd1
   5     5       8        1        5      active sync   /dev/sda1
   6     6       8       81        6      active sync   /dev/sdf1
#1 lore raw
Quoted 4 lines · Jon Hardcastle
Quoted 1 line · Brett Russ

What do you mean by mismatches detected? How is this observed?

cat /sys/block/md4/md/mismatch_cnt

Someone else will need to comment on what this value pertains to and how it should behave.

Quoted 3 lines

I have been able to get the info you asked for using mdadm -E but not with the array stopped. I cant stop it just yet. What would you be looking for in this data?

Simply that the "Update Time" and "Events" values matched across all members, which they do.

-BR

#2 lore raw

You can find details on these parameters and their values in md's
documentation: http://www.mjmwired.net/kernel/Documentation/md.txt

A mismatch count can be checked by writing "check" to the proper file as stated in line 376:
http://www.mjmwired.net/kernel/Documentation/md.txt#376

Quoted 25 lines · Brett Russ
Quoted 6 lines · Jon Hardcastle
Quoted 2 lines · Brett Russ

What do you mean by mismatches detected?  How is this observed?

cat /sys/block/md4/md/mismatch_cnt

Someone else will need to comment on what this value pertains to and how it should behave.

Quoted 3 lines

I have been able to get the info you asked for using mdadm -E but not with the array stopped. I cant stop it just yet. What would you be looking for in this data?

Simply that the "Update Time" and "Events" values matched across all members, which they do.

-BR

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 5 lines
       Majed B.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
Quoted 6 lines · Majed B.

You can find details on these parameters and their values in md's
documentation: http://www.mjmwired.net/kernel/Documentation/md.txt

A mismatch count can be checked by writing "check" to the proper file as stated in line 376:
http://www.mjmwired.net/kernel/Documentation/md.txt#376

Sounds like Jon may have a flaky HDD if certain members continually throw errors. Jon, can you check SMART stats on your drives?

for di in a b c d e f g; do smartctl -a /dev/sd$di | grep -i _sect; done

you may have to add another option to smartctl, I forget.

-BR

#4 lore raw

He needs to run a full offline or long test before checking with smartctl -a -- since it won't show any sector errors if those tests weren't run at least once.

Quoted 23 lines · Brett Russ
Quoted 7 lines · Majed B.

You can find details on these parameters and their values in md's
documentation: http://www.mjmwired.net/kernel/Documentation/md.txt

A mismatch count can be checked by writing "check" to the proper file as stated in line 376:
http://www.mjmwired.net/kernel/Documentation/md.txt#376

Sounds like Jon may have a flaky HDD if certain members continually throw errors.  Jon, can you check SMART stats on your drives?

for di in a b c d e f g; do smartctl -a /dev/sd$di | grep -i _sect; done

you may have to add another option to smartctl, I forget.

-BR

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 5 lines
       Majed B.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw
Quoted 3 lines · Majed B.

He needs to run a full offline or long test before checking with smartctl -a -- since it won't show any sector errors if those tests weren't run at least once.

Not sure I agree with that. The md checks he's been doing will cause a read of all data regions of the relevant partition and if the disk is throwing errors, those sectors should be marked probational. Then, if a subsequent repair ends up remapping them, those sectors will show up as remapped.

The grep will show both probational and remapped sector counts for each drive.

BTW, the cmd should also include an echo so it's easy to tell which drive is being reported:

for di in a b c d e f g; do echo $di; smartctl -a /dev/sd$di | grep -i _sect; done

-BR

#6 lore raw

I keep misreading the the subject of this email thread as:

"Why does one get mustaches?"

cc

Quoted 27 lines · Brett Russ
Quoted 4 lines · Majed B.

He needs to run a full offline or long test before checking with smartctl -a -- since it won't show any sector errors if those tests weren't run at least once.

Not sure I agree with that.  The md checks he's been doing will cause a read of all data regions of the relevant partition and if the disk is throwing errors, those sectors should be marked probational.  Then, if a subsequent repair ends up remapping them, those sectors will show up as remapped.

The grep will show both probational and remapped sector counts for each drive.

BTW, the cmd should also include an echo so it's easy to tell which drive is being reported:

for di in a b c d e f g; do echo $di; smartctl -a /dev/sd$di | grep -i _sect; done

-BR

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 8 lines
Chris Chen <[email protected]>
"The fact that yours is better than anyone else's
is not a guarantee that it's any good."
-- Motivational Poster
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw
In reply to Brett Russ
Quoted 12 lines · Brett Russ
Quoted 3 lines · Majed B.

He needs to run a full offline or long test before checking with smartctl -a -- since it won't show any sector errors if those tests weren't run at least once.

Not sure I agree with that. The md checks he's been doing will cause a read of all data regions of the relevant partition and if the disk is throwing errors, those sectors should be marked probational. Then, if a

subsequent repair ends up remapping them, those sectors will show up as remapped.

Quoted 8 lines

The grep will show both probational and remapped sector counts for each drive.

BTW, the cmd should also include an echo so it's easy to tell which drive is being reported:

for di in a b c d e f g; do echo $di; smartctl -a /dev/sd$di | grep -i _sect; done

Interestingly enough, I'm struggling with a system on this matter too... I can never seem to get rid of mismatches.

# for di in a b c d e f g; do echo $di; smartctl -a /dev/hd$di | grep -i
sect; done
a
=== START OF INFORMATION SECTION ===
=== START OF READ SMART DATA SECTION ===
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always  
   -       0
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always  
   -       0
b
c
=== START OF INFORMATION SECTION ===
=== START OF READ SMART DATA SECTION ===
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always  
   -       0
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always  
   -       0

Full offline tests of both drives less than 400 power on hours ago all came up clean. No read errors. Just mismatches.

I can run a repair on them and STILL have mismatches again after a check. At the moment:

# cat /sys/block/md2/md/mismatch_cnt
1024

It's in the middle of a repair now - as quite often the filesystem on /dev/md2 will go read-only due to a journal error. I've tried everything except replacing hardware to figure out what's going on here - but it will do this like clockwork every month. A reboot later and it'll run an fsck, find no errors, then between 21 and 30 days later it will go readonly again.

It's annoying as hell and I wish I could get to the bottom of it!

Signature · 6 lines
Steven Haigh
 
Email: [email protected]
Web: http://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
#8 lore raw
Quoted 3 lines · Steven Haigh

On Wed, 20 Jan 2010 17:43:45 -0500, Brett Russ <[email protected]> wrote:

CUT!

Might that be a problem of the disks/controllers?
Jon and Steven, what hardware do you have?

#9 lore raw
Quoted 2 lines · Asdo
Quoted 1 line · Steven Haigh

On Wed, 20 Jan 2010 17:43:45 -0500, Brett Russ <[email protected]>

Quoted 4 lines · wrote:
Quoted 2 lines

CUT!

Might that be a problem of the disks/controllers?
Jon and Steven, what hardware do you have?

I'm running some fairly old hardware on this particular server. It's a dual P3 1Ghz.

After running a repair on /dev/md2, I now see:

# cat /sys/block/md2/md/mismatch_cnt
1536

Again, no smart errors, nothing to indicate a disk problem at all :(

As this really keeps killing the machine and it is a live system - the only thing I can really think of doing is to break the RAID and just rsync the drives twice daily :\

Signature · 6 lines
Steven Haigh
 
Email: [email protected]
Web: http://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
#10 lore raw
Quoted 13 lines · Steven Haigh
Quoted 2 lines · Asdo
Quoted 1 line · Steven Haigh

On Wed, 20 Jan 2010 17:43:45 -0500, Brett Russ<[email protected]>

Quoted 4 lines · wrote:
Quoted 2 lines

CUT!

Might that be a problem of the disks/controllers?
Jon and Steven, what hardware do you have?

I'm running some fairly old hardware on this particular server. It's a dual P3 1Ghz.

After running a repair on /dev/md2, I now see:

Quoted 8 lines
# cat /sys/block/md2/md/mismatch_cnt
1536

Again, no smart errors, nothing to indicate a disk problem at all :(

As this really keeps killing the machine and it is a live system - the only thing I can really think of doing is to break the RAID and just rsync the drives twice daily :\

the same happened with many people. and we all hate it since it cause a huge load at all weekend on most of our servers:-( according to redhat it's not a bug:-(

Signature · 1 line
  Levente                               "Si vis pacem para bellum!"
#11 lore raw
Quoted 31 lines · Farkas Levente

From: Farkas Levente <[email protected]>
Subject: Re: Why does one get mismatches?
To: "Steven Haigh" <[email protected]>
Cc: "Asdo" <[email protected]>, [email protected]
Date: Thursday, 21 January, 2010, 11:48

Quoted 1 line · Steven Haigh

On Thu, 21 Jan 2010 09:08:42 +0100, Asdo<[email protected]>

Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 1 line · Steven Haigh

On Wed, 20 Jan 2010 17:43:45 -0500, Brett

Russ<[email protected]>

Quoted 7 lines
Quoted 4 lines · wrote:
Quoted 2 lines

CUT!

Might that be a problem of the disks/controllers?
Jon and Steven, what hardware do you have?

I'm running some fairly old hardware on this

particular server. It's a

Quoted 7 lines

dual P3 1Ghz.

After running a repair on /dev/md2, I now see:

# cat /sys/block/md2/md/mismatch_cnt
1536

Again, no smart errors, nothing to indicate a disk

problem at all :(

Quoted 2 lines

As this really keeps killing the machine and it is a

live system - the

Quoted 19 lines
Quoted 1 line

only thing I can really think of doing is to break the

RAID and just rsync

Quoted 1 line

the drives twice daily :\

the same happened with many people. and we all hate it since it cause a
huge load at all weekend on most of our servers:-( according to redhat it's not a bug:-(

Signature · 8 lines
   Levente         
               
     "Si vis pacem para bellum!"
--
To unsubscribe from this list: send the line "unsubscribe
linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Well i am running a Semperon based desktop system that has 4 in built sata and 2 IDE, and 2 PCI-E controller cards exposing 2 sata ports each.

I have off the IDE 2 320GB HDD's that is split across 3 md's boot/swap/main. Only the Main is 'check'ed/repaired. Very rarely have a problem here!

On the Sata's I have 7 HDD's of varying size(4x500, 2x750, 1x1TB) and makes(Samsung, Hitachi, Seagate) strung together to form a now raid6 (raid5 until a couple of weeks ago). On top of that i have a VG split into ~6 LV's and in some of those i have mount SquashFS filesystems. until i moved the drive order around at the weekend for access issues. I didn't really have any problems - except the occasional issue - I scrub it weekly currently.

BUT I have only just converted from raid5 to 6 and probably not run that many checks since so it could be related to that!

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html