mismatch_cnt of 128 and 1408.
Hello,
My backup box with raid5 recently suffered a series of power failures. Now I'm doing some recovery hoping that power surges did not damage HDDs.
I have here
- md0 a raid1 of 3*1GB=1GB (root partition) and
- md1 a raid5 of 3*500GB=1000GB (backup partition) and
- md2 a raid1 of 3*4GB=4GB (swap).
I did following things:
1. power on the server, and incidentally mount count for md1 enforced an fsck which found two errors.
2. /usr/share/mdadm/checkarray -a
which does a resync of all raid partitions. It takes 5 hours for the 1TB backup partition.
3. afterwards the command: cat /sys/block/md?/md/mismatch_cnt gave answer:
md0: 128
md1: 0
md2: 1408
4. touch /forcefsck ; shutdown -r now
5. then after reboot: /usr/share/mdadm/checkarray -a ; cat /sys/block/md?/md/mismatch_cnt
md0: 128
md1: 0
md2: 1408
Now I am alarmed that something might be wrong with the root partition. From other posts I remember that mismatch count for swap partitions is allowed to be nonzero.
I checked smart health status of HDDs with smartctl -H and the drives are healthy.
Is mismatch count = 128 an indication of bad HDD? How to discover which one is bad?
Signature · 1 line
Janek Kozicki |
Am Mon, 24 Mar 2008 08:36:51 +0100 schrieb Janek Kozicki:
Quoted 4 lines
Now I am alarmed that something might be wrong with the root partition. From other posts I remember that mismatch count for swap partitions is allowed to be nonzero.
Apparently it can also happen when a file is truncated between the writes to the individual disks:
http://www.mail-archive.com/[email protected]/msg07546.html
Or could it just be that it was writing when the power failed?
Quoted 8 lines
I checked smart health status of HDDs with smartctl -H and the drives are healthy.
Is mismatch count = 128 an indication of bad HDD? How to discover which one is bad?
You could run a long SMART selftest. If the downtime doesn't matter, you could also boot from a live cd and run badblocks -n.
Signature · 1 line
Oliver
Quoted 9 lines · On Monday March 24, [email protected] wrote:
5. then after reboot:
/usr/share/mdadm/checkarray-a ; cat /sys/block/md?/md/mismatch_cnt
md0: 128
md1: 0
md2: 1408Now I am alarmed that something might be wrong with the root partition. From other posts I remember that mismatch count for swap partitions is allowed to be nonzero.
Yes, the 'swap' is nothing to worry about.
As md does it's checks in units of around 128 sectors, the "md0: 128" probably just means a single sector is different between the two.
I recommend
echo repair > /sys/block/md0/md/sync_action
That will fix it.
Probably just another 'fsck -f' after that just to be on the same side.
NeilBrown
Neil Brown said: (by the date of Tue, 25 Mar 2008 14:33:53 +1100)
Quoted 3 lines
I recommend
echo repair >/sys/block/md0/md/sync_action
That will fix it.
great, thanks. It worked :-)
Signature · 1 line
Janek Kozicki |
} -----Original Message-----
} From: [email protected] [mailto:linux-raid- } [email protected]] On Behalf Of Neil Brown
} Sent: Monday, March 24, 2008 11:34 PM
} To: Janek Kozicki
} Cc: [email protected]
} Subject: Re: mismatch_cnt of 128 and 1408.
}
} On Monday March 24, [email protected] wrote:
} >
} > 5. then after reboot: /usr/share/mdadm/checkarray -a ; cat } /sys/block/md?/md/mismatch_cnt
} > md0: 128 } > md1: 0 } > md2: 1408
} >
} > Now I am alarmed that something might be wrong with the root } > partition. From other posts I remember that mismatch count for swap } > partitions is allowed to be nonzero.
}
} Yes, the 'swap' is nothing to worry about.
How can a mismatch on swap be ok? Seems the wrong data could be read in 50% of the time.
Thanks,
Guy
}
} As md does it's checks in units of around 128 sectors, the "md0: 128" } probably just means a single sector is different between the two. }
} I recommend
}
} echo repair > /sys/block/md0/md/sync_action
}
} That will fix it.
}
} Probably just another 'fsck -f' after that just to be on the same } side.
}
} NeilBrown
} --
} 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