The startup-sequences of typical Linux systems vary considerably. One technique that's sometimes used is to write a sentinel-file on clean shutdown, then check for its existence (and remove it) on reboot. If the sentinel isn't there, a hard-shutdown is assumed and a filesystem check is offered.
I've set up my system slightly differently: a filesystem check is done every time. But since I use journaled filesystems like "ext3" and "reiserFS," this is almost instantaneous. The system simply checks the journal.
Three or four times a year, literally, I'll take a drive offline and run an exhaustive filesystem integrity check on it, just to make sure that the journal is doing its job. I've never yet encountered a case where it didn't.
I also periodically run SMART device self-tests on a regular basis to check for self-reported possible impending failures. If the drive thinks it's about to die, it gets replaced.
|