Edit: Executive summary (--verbose version below): I need a machine to shut down quickly in a power outage due to short battery life. Is there any reason I should not use 'umount -f' (embedded in a power-failure-case script) on a scratch drive whose IO is holding up the shutdown, and whose data I don't care about if the jobs are dead anyway?
a question from a newbie SysAdmin (long-time *nix user).
I recently set up a CentOS computational server, and got apcupsd talking to my UPS, so that it shuts down gracefully as soon as we lose power (that's all I have money for). The local power company got around to testing this before I had the stomach to pull the plug (geesh!). This provided me with some very tense moments while it took 10 min or so to unmount the filesystems, bringing the battery to 12% before finally shutting down.
It took so long because I chocked the machine full of heavy IO jobs in preparation for the simpler test of issuing a 'halt' command to see how long shutdown would take. The heavy IO all goes to a scratch space on dedicated drives in a RAID0. If the job dies, I couldn't care less about what is on those drives. I can even afford to remake the filesystem after such a failure. It would be a pain if any of the lighter-use drives (home dirs) were corrupted if the battery dies before the shutdown completes.
That said, apcupsd has a place for a sys-admin to insert a bash script that gets executed when certain conditions are met. If that condition is a power failure, and I really don't care about corrupting the scratch data in order to get a speedy shutdown, is 'umount -f' my friend?
Is there anything I'm not considering? Will I necessarily need to remake the filesystem after this, or just delete the most-certainly corrupted files on the drive?