Update the fsck command in /etc/rc to use the new background

fsck checking. Applying these changes (typically via mergemaster)
will cause your system to start running background checks on all
your soft update enabled filesystems (provided that you have
a kernel with the required functionality, e.g., one built since
the end of April). Please report any and all problems to
mckusick@mckusick.com (not mckusick@freebsd.org which I read
infrequently). See the comment above the fsck command in /etc/rc
for instructions on how to disable background checking should it
cause you too much trouble.

Several FAQs:

1) Can I reboot before the background checks are done?

Ans) Yes, when the system restarts the checks will pick up
     where they left off.

2) Can a crash during checking corrupt my filesystem?

Ans) No, recovered resources are returned to the system using soft
     updates which ensure that the freeing is done in a safe order.

3) How will I know if any background checks are being done?

Ans) Filesystems that are to be checked in background will be listed
     as `DEFER FOR BACKGROUND CHECKING' at the usual fsck check time
     during system startup.

4) What happens to the output of the background checks?

Ans) It is sent to syslog `daemon' facility log level `notice'.

5) When will this feature be available in the 4.X kernel?

Ans) Never. It is much too radical and extensive a change to be
     MFC'ed. Besides, it needs many months of experience and
     tuning before it is ready for widespread use.

6) What happens if a background fsck fails (i.e., fsck finds
   errors that would normally require a manual fsck)?

Ans) The filesystem will be marked as needing a manual fsck.
     At the next system reboot, the check will be done in
     foreground and the usual actions taken (usually a failure
     to go multi-user until fsck has been run by hand on the
     affected filesystem).
This commit is contained in:
Kirk McKusick 2001-05-11 07:40:39 +00:00
parent 630802eb2a
commit b147605924

8
etc/rc
View File

@ -184,7 +184,9 @@ swapon -a
case ${bootmode} in
autoboot)
echo 'Automatic boot in progress...'
fsck -p
# To restore old fsck behavior use:
# fsck -p
fsck -F -p
case $? in
0)
;;
@ -810,6 +812,10 @@ case ${kern_securelevel_enable} in
;;
esac
# Start background fsck checks
echo 'Starting background filesystem checks'
nice -4 fsck -B -p 2>&1 | logger -p daemon.notice &
echo ''
date