fsck: broken file system with background check remains broken after bootup

Rob spamrefuse at yahoo.com
Tue Jan 4 02:22:39 PST 2005


I had following situation:

   Someone suddenly cut the power of a FreeBSD 5.3 PC, leaving the /usr
   filesystem in a very broken state. During next bootup, there was indeed
   the message telling 'not properly unmounted', but boot continued with
   background fsck after 60 seconds; although I have
   in /etc/rc.conf. Because /usr was bad, the system hang immediately after
   bootup. I had to hit the power button (grump) to get a reboot....causing
   possibly more problems.

   I fixed it, by going into single user mode and do a manual fsck on all
   the filesystems. This way /usr got fixed and the system rebooted fine.

This scared me. What if /usr was such broken that even single user mode
would hang!?!

Moreover, the main user of this PC is not a Unix guru and I hoped that
the configuration setting in /etc/rc.conf of fsck_y_enable would do an
automatic fix at bootup, like it used to do with 4.10. However, that
apparently does not happen anymore.

What can I do to enforce an immediate fix of the filesystems at bootup
with FreeBSD 5.3, when a filesystem is not properly unmounted at shutdown?

I suppose I should not change default background_fsck ("YES"). How about
the background_fsck_delay? Should I set this to "0"?


More information about the freebsd-stable mailing list