Red Hat Bugzilla – Bug 49732
raidstop always fails on /dev/md0
Last modified: 2007-04-18 12:35:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Description of problem:
Trying to run "raidstop /dev/md0" will always report that the raid is
still in use.
Steps to Reproduce:
1. create and start a raid on /dev/md0
2. run "raidstop /dev/md0"
3. poof, error.
Actual Results: raidstop claims that md0 is still in use.
Expected Results: Raid should stop.
It looks like the raidtools are doing a version check on the md driver
(version.c), but for some reason, the "close" has been commented out, and
this leaves /dev/md0 open, which increases the usage counter in the md
driver, so that the "stop" IOCTL will fail.
I worked around this by hex-editing raidstop (I didn't have the source at
the time) to use /dev/md1 for version checking (it's hardcoded in the
source). This left the counters for md0 untouched, and I was able to stop
This is a serious problem for anyone working with raids where the raid
does not live from boot to boot.
Weird.. I do mkraid/raidstart and later raidstop a lot and it never fails for me
unless a filesystem is mounted...