|author||Kirk McKusick <mckusick@FreeBSD.org>||2001-04-24 22:38:08 +0000|
|committer||Kirk McKusick <mckusick@FreeBSD.org>||2001-04-24 22:38:08 +0000|
Add support for the -F flag which determines whether a specified
filesystem needs foreground checking (usually at boot time) or can defer to background checking (after the system is up and running). See the manual page, fsck_ffs(8), for details on the -F and -B options. These options are primarily intended for use by the fsck front end. All output is directed to stdout so that the output is coherent when redirected to a file or a pipe. Unify the code with the fsck front end that allows either a device or a mount point to be specified as the argument to be checked.
Notes: svn path=/head/; revision=75927
Diffstat (limited to 'sbin/fsck_ffs/fsck_ffs.8')
1 files changed, 35 insertions, 54 deletions
diff --git a/sbin/fsck_ffs/fsck_ffs.8 b/sbin/fsck_ffs/fsck_ffs.8
index a666fdad8ee8..1422d90bb012 100644
@@ -42,41 +42,14 @@
.Nd filesystem consistency check and interactive repair
-.Op Fl f
-.Op Fl m Ar mode
-.Op Ar filesystem
-.Op Fl ny
+.Op Fl BFpfny
.Op Fl b Ar block#
.Op Fl c Ar level
-.Op Fl l Ar maxparallel
.Op Fl m Ar mode
-.Op Ar filesystem
-The first form of
-preens a standard set of filesystems or the specified filesystems.
-It is normally used in the script
-during automatic reboot.
-reads the table
-to determine which filesystems to check.
-Only partitions in fstab that are mounted ``rw,'' ``rq'' or ``ro''
-and that have non-zero pass number are checked.
-Filesystems with pass number 1 (normally just the root filesystem)
-are checked one at a time.
-When pass 1 completes, all remaining filesystems are checked,
-running one process per disk drive.
-The disk drive containing each filesystem is inferred from the longest prefix
-of the device name that ends in a digit; the remaining characters are assumed
-to be the partition designator.
+The specified disk partitions and/or filesystems are checked.
In "preen" mode the clean flag of each filesystem's superblock is examined
and only those filesystems that
are not marked clean are checked.
@@ -166,17 +139,40 @@ will default to a
-has more consistency checks than
-.Em check , dcheck , fcheck ,
The following flags are interpreted by
.Bl -tag -width indent
+.It Fl F
+Determine whether the filesystem needs to be cleaned immediately
+in foreground, or if its cleaning can be deferred to background.
+To be eligible for background cleaning it 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.
+If these conditions are met, then
+exits with a zero exit status.
+Otherwise it exits with a non-zero exit status.
+If the filesystem is clean,
+it will exit with a non-zero exit status so that the clean status
+of the filesystem can be verified and reported during the foreground
+Note that when invoked with the
+flag, no cleanups are done.
+The only thing that
+does is to determine whether a foreground or background
+check is needed and exit with an appropriate status code.
+.It Fl B
+A check is done on the specified and possibly active filesystem.
+The set of corrections that can be done is limited to those done
+when running in preen mode (see the
+If unexpected errors are found,
+the filesystem is marked as needing a foreground check and
+exits without attempting any further cleaning.
.It Fl b
Use the block specified immediately after the flag as
the super block for the filesystem. Block 32 is usually
@@ -220,12 +216,6 @@ Force
filesystems when preening.
-.It Fl l
-Limit the number of parallel checks to the number specified in the following
-By default, the limit is the number of disks, running one process per disk.
-If a smaller limit is given, the disks are checked round-robin, one filesystem
-at a time.
.It Fl m
Use the mode specified in octal immediately after the flag as the
permission bits to use when creating the
@@ -250,12 +240,6 @@ this should be used with great caution as this is a free license
to continue after essentially unlimited trouble has been encountered.
-If no filesystems are given to
-then a default list of filesystems is read from
-.Pa /etc/fstab .
Inconsistencies checked are as follows:
.Bl -enum -compact
@@ -312,9 +296,6 @@ If the
directory does not exist, it is created.
If there is insufficient space its size is increased.
-Because of inconsistencies between the block device and the buffer cache,
-the raw device should always be used.
.Bl -tag -width /etc/fstab -compact
.It Pa /etc/fstab