]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super-intel.c
imsm: fix: rebuild does not continue after reboot
authorLukasz Dorau <lukasz.dorau@intel.com>
Fri, 20 Apr 2012 11:45:02 +0000 (13:45 +0200)
committerNeilBrown <neilb@suse.de>
Sun, 22 Apr 2012 23:51:10 +0000 (09:51 +1000)
commit7ce05701813496571e1f7f79c726aa6e4868bd5f
tree6c13d7458152913d2550f479b234eb3922ffe53c
parent0a999759b54f94fd63ac0ee298a549acef6f7d6f
imsm: fix: rebuild does not continue after reboot

If system is rebooted during rebuild, md driver changes sync_action
from 'recover' to 'idle' (during stopping all md devices).
If mdmon is still running then, it detects the change of sync_action state,
finishes rebuild and writes metadata to disks. After computer's restart
the RAID volume is in Normal state in OROM and rebuild seems to be finished.
After system's start-up RAID volume is in auto-read-only state
and metadata is in Dirty state. Rebuild seems to be finished but it is not.
Data is inconsistent (out-of-sync).

When mdmon detects the change of sync_action from 'recover' to 'idle',
it has to check if rebuild is really finished. Appropriate test was added.
Now mdmon examines each volume's member if it is being rebuilt.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c