summaryrefslogtreecommitdiffstats
path: root/sbin/fsck/fsck.8
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2001-04-25 07:18:22 +0000
committermckusick <mckusick@FreeBSD.org>2001-04-25 07:18:22 +0000
commit658667dbfa808d24e7cd28a50dd1031de174ffab (patch)
tree8b7cc28748b2821869d1bc86f404e697d860b70e /sbin/fsck/fsck.8
parentcdc83afc7f1e444c4646840f48592b7ff524fbea (diff)
downloadFreeBSD-src-658667dbfa808d24e7cd28a50dd1031de174ffab.zip
FreeBSD-src-658667dbfa808d24e7cd28a50dd1031de174ffab.tar.gz
Add support for running foreground (-F) and background (-B) checks.
Traditionally, fsck is invoked before the filesystems are mounted and all checks are done to completion at that time. If background checking is available, fsck is invoked twice. It is first invoked at the traditional time, before the filesystems are mounted, with the -F flag to do checking on all the filesystems that cannot do background checking. It is then invoked a second time, after the system has completed going multiuser, with the -B flag to do checking on all the filesystems that can do background checking. Unlike the foreground checking, the background checking is started asynchonously so that other system activity can proceed even on the filesystems that are being checked. At the moment, only the fast filesystem supports background checking. To be able to do background checking, a filesystem must have been running with soft updates, not have been marked as needing a foreground check, and be mounted and writable when the background check is to be done (i.e., not listed as `noauto' in /etc/fstab). These changes are the final piece needed to support background filesystem checking. They will not have any effect until you update your /etc/rc to invoke fsck in its new mode of operation. I am still playing around with exactly what those changes should be and should be committing them later this week.
Diffstat (limited to 'sbin/fsck/fsck.8')
-rw-r--r--sbin/fsck/fsck.863
1 files changed, 60 insertions, 3 deletions
diff --git a/sbin/fsck/fsck.8 b/sbin/fsck/fsck.8
index 54dc36d..04cd4b6 100644
--- a/sbin/fsck/fsck.8
+++ b/sbin/fsck/fsck.8
@@ -37,6 +37,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl dvplfyn
+.Op Fl B | F
.Op Fl l Ar maxparallel
.Op Fl t Ar fstype
.Op Fl T Ar fstype : Ns Ar fsoptions
@@ -52,9 +53,29 @@ file or in the command line for consistency.
It is normally used in the script
.Pa /etc/rc
during automatic reboot.
-If no filesystems are specified, and ``preen'' mode is enabled (
-.Fl p
-option)
+Traditionally,
+.Nm
+is invoked before the filesystems are mounted
+and all checks are done to completion at that time.
+If background checking is available,
+.Nm
+is invoked twice.
+It is first invoked at the traditional time,
+before the filesystems are mounted, with the
+.Fl F
+flag to do checking on all the filesystems
+that cannot do background checking.
+It is then invoked a second time,
+after the system has completed going multiuser, with the
+.Fl B
+flag to do checking on all the filesystems
+that can do background checking.
+Unlike the foreground checking,
+the background checking is started asynchonously
+so that other system activity can proceed
+even on the filesystems that are being checked.
+.Pp
+If no filesystems are specified
.Nm
reads the table
.Pa /etc/fstab
@@ -99,6 +120,42 @@ Causes
to assume no as the answer to all operator questions, except "CONTINUE?".
.It Fl p
Enter preen mode.
+In preen mode, only a restricted class of innocuous
+filesystem inconsistencies will be corrected.
+If unexpected inconsistencies caused by hardware or
+software failures are encounted, the check program
+will exit with a failure.
+See the manual pages for the individual check programs
+for a list of the sorts of failures that they correct
+when running in preen mode.
+.It Fl F
+Run in foreground mode.
+The check program for each filesystem is invoked with the
+.Fl F
+flag to determine whether it wishes to run as part of
+the boot up sequence,
+or if it is able to do its job in background after the
+system is up and running.
+A non-zero exit code indicates that it wants to run in foreground
+and the check program is invoked.
+A zero exit code indicates that it is able to run later in background
+and just a deferred message is printed.
+.It Fl B
+Run in background mode.
+The check program for each filesystem is invoked with the
+.Fl F
+flag to determine whether it wishes to run as part of
+the boot up sequence,
+or if it is able to do its job in background after the
+system is up and running.
+A non-zero exit code indicates that it wanted to run in foreground
+which is assumed to have been done, so the filesystem is skipped.
+A zero exit code indicates that it is able to run in background
+so the check program is invoked with the
+.Fl B
+flag to indicate that a check on the active filesystem should be done.
+When running in background mode,
+only one filesystem at a time will be checked.
.It Fl t Ar fstype
Invoke
.Nm
OpenPOWER on IntegriCloud