Bug 679843 - 99-raid-check doesn't check arrays w/ active I/O
Summary: 99-raid-check doesn't check arrays w/ active I/O
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mdadm
Version: 15
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Doug Ledford
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-23 17:07 UTC by Larkin Lowrey
Modified: 2017-03-22 08:47 UTC (History)
2 users (show)

Fixed In Version: mdadm-3.1.5-2.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-15 21:11:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Larkin Lowrey 2011-02-23 17:07:13 UTC
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 19:16:15 UTC
Moving this to f15, but will likely make its way back into f14 too.

Comment 2 Fedora Update System 2011-03-28 15:45:06 UTC
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-29 03:33:52 UTC
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 19:44:31 UTC
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 21:10:57 UTC
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.