Red Hat Bugzilla – Bug 819883
raid-check doesn't check arrays with active I/O
Last modified: 2012-07-02 07:13:49 EDT
Description of problem:
The /etc/cron.weekly/99-raid-check script does not check my md2 but does check
md0 and md1.
Version-Release number of selected component (if applicable):
Depends on I/O at the time the script runs.
Steps to Reproduce:
1. Used dd command to write 1 GB of /dev/zero to a file:
[root@dhcpxx-xx ~]# dd if=/dev/zero of=foobar count=1 bs=1073741824
2. While dd was writing, confirm /sys/block/mdX/md/array_state is 'active'
[root@dhcpxx-xx ~]# cat /sys/block/md2/md/array_state
3. Run the script 99-raid-check
4. Verify mdX was not checked. In my case mdX= md2
Sep 5 07:09:15 dhcpxx-xx kernel: md: syncing RAID array md0
Sep 5 07:09:38 dhcpxx-xx kernel: md: md0: sync done.
Sep 5 07:10:51 dhcpxx-xx kernel: md: syncing RAID array md0
Sep 5 07:10:51 dhcpxx-xx kernel: md: delaying resync of md1 until md0 has
finished resync (they share one or more physical units)
Sep 5 07:12:04 dhcpxx-xx kernel: md: md0: sync done.
Sep 5 07:12:04 dhcpxx-xx kernel: md: syncing RAID array md1
The array busy with IO is not checked
All valid arrays are checked, irrespective of whether it is busy or not
When 99-raid-check runs there is a lot of write activity which keeps md2 in the
'active' state. The script checks for 'clean' so it skips md2 since it is
array_state values of 'clean' or 'active' should be considered ok.
if [ "$array_state" = clean -a "$sync_action" = idle ]; then
if [ "$array_state" = clean -o "$array_state" = active ] && [
"$sync_action" = idle ]; then
DOH, I need to read bash scripts correctly, the Fedora script reads like
this, ie. already does the right thing:
if [ "$array_state" != "clean" -a "$array_state" != "active" ]; then
if [ "$sync_action" != idle ]; then
Closing - NOTABUG
Please reopen for EL5, this is still a bug there (as you saw as you reported this against mdadm-2.6.9-3.el5), as pointed up on the linux-raid list yesterday (see http://marc.info/?l=linux-raid&m=134118030800900&w=2 )
There is already a bugzilla open against RHEL5 and the fix has pushed into
Ah OK, I guess I just couldn't find it.