From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020722 Description of problem: If a ups is being monitored by nut (network ups tools, included with RH) to watch for powerouts, and if the root device is on a raid device (not tested if it isn't but I think this is true if _any_ device is on raid), then the shutdown script fails to switch off the raid device on a powerfail shutdown. This means the raid array has to resync when the power returns (defeating the whole point of the ups). /etc/init.d/halt contains: if [ "$command" = halt ] ; then if [ -r /etc/ups/upsmon.conf -a -f /etc/killpower -a -f /etc/sysconfig/ups ] ; then . /etc/sysconfig/ups [ "$SERVER" = "yes" -a "$MODEL" != "NONE" -a -n "$MODEL" -a -n "$DEVICE" ] && $MODEL -k $DEVICE fi fi This means it calls the upsdriver with -k, killing off the power. Because the kernel never gets to a "Power down" state, the raid array is still active. This means it needs to get synced on reboot. As a workaround, I could get rid of the $MODEL -k $DEVICE command and just let the power run out. Is there some way to force the raid device to switch off before the $MODEL -k $DEVICE command? Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Construct root on raid 1 device 2. Set up NUT to monitor UPS 3. Disconnect UPS 4. Wait for switch off 5. Turn power on Actual Results: Raid device starts resync (see /proc/mdstat) Expected Results: Raid device should cleanly switch off. Additional info:
Doing some debugging it seems the nut command: $MODEL -k $DEVICE command tells the UPS to switch the power off and then waits for 90s in a sleep, hoping the power will go off! This means the kernel halt never happens. If you adjust the "grace period" of the UPS to shut down to greater than 90s (3 mins on our APC ups), then the nut command completes (the sleep times out), and the kernel actually shuts down, halting the raid devices. I assume the 90s wait is so the kernel never shuts down and so when the power comes back an ATX motherboard will come back up (rather than sitting in a shut down state).
Closing bugs on older, no longer supported, releases. Apologies for any lack of response. If this persists on a current release, such as Fedora Core 4, please open a new bug.