On 05/18/2011 04:04 PM, Lennart Poettering wrote:
Host requests power down from UPS in 30s. Host then continues shut
down. If the host now ends up taking more time then expected for
shutting down it might still be busy at the time of the power going
away. It's a race between "UPS powering off" and "system finishing
shutdown". It's a bet that your system is faster than 30s when
unmounting the remaining file systems, syncing the MD/DM metadata to
disk, syncing ATA and so on (i.e. all the stuff the kernel does when you
invoke the reboot() syscall).
Here's another race. Host requests power down from UPS in 30s. Host
completes shutdown. At some point during that 30s interval, commercial
power is restored. Result: Host shuts down and never restarts. Sorry
about that.
The way I've always prevented that is to have the host do a reboot,
not a shutdown, but send an immediate shutdown command to the UPS
just before sending control to the BIOS for the reboot.
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.