Bug 679843 - 99-raid-check doesn't check arrays w/ active I/O
99-raid-check doesn't check arrays w/ active I/O
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mdadm (Show other bugs)
15
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: Doug Ledford
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-23 12:07 EST by Larkin Lowrey
Modified: 2011-04-15 17:11 EDT (History)
1 user (show)

See Also:
Fixed In Version: mdadm-3.1.5-2.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-04-15 17:11:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Larkin Lowrey 2011-02-23 12:07:13 EST
Description of problem:
The /etc/cron.weekly/99-raid-check script does not check my md1 but does check md0 and md2.

Version-Release number of selected component (if applicable):
mdadm-3.1.3-0.git20100804.2.fc14.x86_64

How reproducible:
Depends on I/O at the time the script runs. Happens every time for me unless I run the script from the command-line.

Steps to Reproduce:
1. use dd to write several gigs of /dev/zero to a file
2. while dd is writing, confirm /sys/block/mdX/md/array_state is 'active'
3. run 99-raid-check
4. verify mdX was not checked
  
Actual results:
The array busy with IO is not checked

Expected results:
All valid arrays are checked, busy or not

Additional info:
# while true; do cat /sys/block/md1/md/array_state; sleep 0.5; done
clean
clean
active
clean
clean
clean
clean
clean
clean
active
clean
clean
clean
clean
clean

Apparently, when 99-raid-check runs there is a lot of write activity which keeps md1 in the 'active' state. The script checks for 'clean' so it skips md1 since it is 'active'.

Suggested fix:
array_state values of 'clean' or 'active' should be considered ok.

Change this:
    if [ "$array_state" = clean -a "$sync_action" = idle ]; then
to...
    if [ "$array_state" = clean -o "$array_state" = active ] && [ "$sync_action" = idle ]; then
Comment 1 Doug Ledford 2011-03-25 15:16:15 EDT
Moving this to f15, but will likely make its way back into f14 too.
Comment 2 Fedora Update System 2011-03-28 11:45:06 EDT
mdadm-3.1.5-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mdadm-3.1.5-1.fc15
Comment 3 Fedora Update System 2011-03-28 23:33:52 EDT
Package mdadm-3.1.5-1.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mdadm-3.1.5-1.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/mdadm-3.1.5-1.fc15
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2011-03-31 15:44:31 EDT
Package mdadm-3.1.5-2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mdadm-3.1.5-2.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/mdadm-3.1.5-2.fc15
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2011-04-15 17:10:57 EDT
mdadm-3.1.5-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.