Interrupting fsck during startup
Ben Scott
dragonhawk at gmail.com
Fri Mar 27 17:52:04 EDT 2009
On Fri, Mar 27, 2009 at 2:15 PM, Michael ODonnell
<michael.odonnell at comcast.net> wrote:
> In certain time-critical situations it is desirable that we be able to
> interrupt fsck as it tries to preen certain huge filesystems.
Observation: I find that those time-critical situations usually
occur on critical systems which are never shut down. Thus, when they
reboot, it's because they just crashed, and that's the only time fsck
ever gets a chance to run. If they already had a policy of doing
scheduled PM (preventative maintenance) with controlled shutdowns and
regular fsck, then they wouldn't be hitting the "it's been too long
since you ran fsck" event in the first place.
So in practice, what you really may be asking for is "disable
automatic fsck entirely". If so, you can do that with "tune2fs -c 0
-i 0".
If desired, combine the above with implementation of a PM plan that
fsck's "when you have time".
> Yes, we know that interrupting fsck is not good sysadmin hygiene ...
I seem to recall that it can cause filesystem damage. That may be
why the system is trapping and ignoring SIGINT now.
If you really don't care if you trash your filesystem by killing
e2fsck, patch the source to no longer trap SIGINT. I'll leave it up
to you to decide if you really want that or not.
Perhaps better would be a countdown with option to abort before the
actual fsck. Like (dare I say it) MS Windows does: "Filesystem will
be checked in %d seconds. Press any key to skip...".
-- Ben
More information about the gnhlug-discuss
mailing list