Wiki . Forums . Bugs . Translation . Privacy Policy | Search . Simple . Advanced | Reports . Help | Matrix . 10.x . 11.x . 12.x . 13.x . Future . Recent . Contribs

Bug 6562 - mismatch_cnt is not 0 on /dev/md1
Summary: mismatch_cnt is not 0 on /dev/md1
Status: CLOSED UPSTREAM
Alias: None
Product: SME Server 8.X
Classification: SME Server
Component: Unknown (show other bugs)
Version: 8.0b6
Hardware: --- ---
: P3 normal
Target Milestone: future
Assignee: SME Server bug team
QA Contact: SME Server bug team
URL:
Depends on:
Blocks:
 
Reported: 2011-03-13 08:31 CET by Darryl Penny
Modified: 2014-07-20 13:29 CEST (History)
4 users (show)

See Also:
Package: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darryl Penny 2011-03-13 08:31:59 CET
Not sure if this is a bug, but I was referred to Bugzilla with this:

On an SME8 beta6 installation, the two drives were definitely in sync and ok on Friday.
On Saturday cron reported the following, and in this order:
    a) A RebuildFinished event has been detected on md device /dev/md1.
    b) Device mismatches found: 128 is now an active member of
       md device /dev/md1.
    c) /etc/cron.weekly/99-raid-check:
       WARNING: mismatch_cnt is not 0 on /dev/md1

A search of the forums or Bugzilla for mismatch_cnt produced no response.

Sunday cat /proc/mdstat shows:
    Personalities : [raid1]
    md1 : active raid1 sdb1[1] sda1[0]
          104320 blocks [2/2] [UU]

    md2 : active raid1 sdb2[1] sda2[0]
          732467520 blocks [2/2] [UU]

    unused devices: <none>
    
Could this simply be impending hardware failure or is it a possible bug?
Comment 11 Charlie Brady 2014-07-20 13:29:16 CEST
(In reply to dakruhm from comment #10)
> I suggest marking this as CLOSED.
...
> If peer review agrees, please mark as relevant closed.

Agreed. Thanks for following up and digging out the upstream diff.
Comment 10 dakruhm 2014-07-20 12:00:05 CEST
I suggest marking this as CLOSED.

The first issue in comment #4 is that the weekly cron just starts a RAID device scan. I believe this is the expected result.

This comes from:
/etc/cron.weekly/99-raid-check

Which comes from mdadm-2.6.9-5.el5

The second issue in comment #4 that the weekly cron job also causes "WARNING: mismatch_cnt is not 0 on /dev/md1" to be sent to admin. I believe this was resolved in bug 6160 and the message is not sent.

The issue in comment #6 about mismatch_cnt is not 0 not valid when swap is stored on RAID1 was resolved upstream, I believe.

This was coming from circa mdadm-2.6.9-3.el5

A patch was applied circa mdadm-2.6.9-5.el5.

Posting diff
=============================================
 for dev in $check_list; do
        mismatch_cnt=`cat /sys/block/$dev/md/mismatch_cnt`
-       if [ "$mismatch_cnt" -ne 0 ]; then
+        # Due to the fact that raid1 writes in the kernel are unbuffered,
+        # a raid1 array can have non-0 mismatch counts even when the
+        # array is healthy.  These non-0 counts will only exist in
+        # transient data areas where they don't pose a problem.  However,
+        # since we can't tell the difference between a non-0 count that
+        # is just in transient data or a non-0 count that signifies a
+        # real problem, simply don't check the mismatch_cnt on raid1
+        # devices as it's providing far too many false positives.  But by
+        # leaving the raid1 device in the check list and performing the
+        # check, we still catch and correct any bad sectors there might
+        # be in the device.
+        raid_lvl=`cat /sys/block/$dev/md/level`
+        if [ "$mismatch_cnt" -ne 0 -a "$raid_lvl" != "raid1" ]; then
                echo "WARNING: mismatch_cnt is not 0 on /dev/$dev"
        fi
 done
=============================================

If peer review agrees, please mark as relevant closed.
Comment 9 Ian Wells 2012-01-02 01:53:06 CET
Moving to future as Comment #6 is valid, but this should not block 8.0
Comment 8 Marco Hess 2012-01-01 15:45:13 CET
Just reporting this happening on my SME8b7 just a few days ago:

A RebuildFinished event has been detected on md device /dev/md1.
Device  mismatches found: 128 is now an active member of md device /dev/md1.

A RebuildFinished event has been detected on md device /dev/md2.
Device  mismatches found: 2304 is now an active member of md device /dev/md2.

/etc/cron.weekly/99-raid-check: 
WARNING: mismatch_cnt is not 0 on /dev/md1 
WARNING: mismatch_cnt is not 0 on /dev/md2 

The system is RAID1

# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[1] sda1[0]
      104320 blocks [2/2] [UU]

md2 : active raid1 sdb2[1] sda2[0]
      976655488 blocks [2/2] [UU]

unused devices: <none>
Comment 7 Charlie Brady 2011-03-14 19:49:21 CET
(In reply to comment #6)

> No, that's not true. The point of running it is to provide I/O errors,

Gee, I seem to be losing it lately. In any case, must proofread more carefully.

s/to provide/to provoke/
Comment 6 Charlie Brady 2011-03-14 19:44:32 CET
(In reply to comment #5)
> If we aren't going to send the warning then there isn't any reason to run it at
> all.

No, that's not true. The point of running it is to provide I/O errors, when would then lead to the device being ejected from the RAID. The warning concerning mismatch_cnt is a separate issue, I believe. It's certainly not valid when swap is stored on RAID1.
Comment 5 Shad L. Lords 2011-03-14 14:35:41 CET
If we aren't going to send the warning then there isn't any reason to run it at all.
Comment 4 Charlie Brady 2011-03-14 14:13:26 CET
Re-opening. There are actually two different issues here.

One is that the weekly cron just starts a RAID device scan, and that the scan causes "rebuild event" email to be sent.

The second issue, here, is that the weekly cron job also causes "WARNING: mismatch_cnt is not 0 on /dev/md1" to be sent to admin.

On most SME systems, /dev/md1 is a RAID1 device, and we keep swap on it, so we definitely expect mismatch_cnt to be non-zero often, so we should not send that warning.
Comment 3 Jonathan 2011-03-14 02:32:57 CET
Closing duplicate.
Comment 2 Darryl Penny 2011-03-13 08:56:43 CET
(In reply to comment #1)
> duplicate
> 
> *** This bug has been marked as a duplicate of bug 6160 ***

A link to the CentOS.org forum discussing this issue (just discovered):
https://www.centos.org/modules/newbb/viewtopic.php?topic_id=23164
Of interest is comment 19
Comment 1 Shad L. Lords 2011-03-13 08:34:40 CET
duplicate

*** This bug has been marked as a duplicate of bug 6160 ***