]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - disk-utils/fsck.8
fsck: (man) labels are available for all filesystems
[thirdparty/util-linux.git] / disk-utils / fsck.8
index a4a11d7f56474ac26cdae9e76f1aa61a0d44e191..a4970e40cabdccbc0e3d5092d7dba9b0e2dfd828 100644 (file)
@@ -1,4 +1,3 @@
-.\" -*- nroff -*-
 .\" Copyright 1993, 1994, 1995 by Theodore Ts'o.  All Rights Reserved.
 .\" This file may be copied under the terms of the GNU Public License.
 .\"
@@ -7,7 +6,9 @@
 fsck \- check and repair a Linux filesystem
 .SH SYNOPSIS
 .B fsck
-.RB [ \-lrsAVRTMNP ]
+.RB [ \-lsAVRTMNP ]
+.RB [ \-r
+.RI [ fd ]]
 .RB [ \-C
 .RI [ fd ]]
 .RB [ \-t
@@ -23,7 +24,7 @@ can be a device name (e.g.
 .IR /dev/hdc1 ", " /dev/sdb2 ),
 a mount point (e.g.
 .IR / ", " /usr ", " /home ),
-or an ext2 label or UUID specifier (e.g.
+or an filesystem label or UUID specifier (e.g.
 UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root).
 Normally, the
 .B fsck
@@ -35,7 +36,7 @@ If no filesystems are specified on the command line, and the
 option is not specified,
 .B fsck
 will default to checking filesystems in
-.B /etc/fstab
+.I /etc/fstab
 serially.  This is equivalent to the
 .B \-As
 options.
@@ -81,20 +82,18 @@ In actuality,
 .B fsck
 is simply a front-end for the various filesystem checkers
 (\fBfsck\fR.\fIfstype\fR) available under Linux.  The
-filesystem-specific checker is searched for in
-.I /sbin
-first, then in
-.I /etc/fs
-and
-.IR /etc ,
-and finally in the directories listed in the PATH environment
-variable.  Please see the filesystem-specific checker manual pages for
+filesystem-specific checker is searched for in the
+PATH environment variable. If the PATH is undefined then
+fallback to "/sbin".
+.PP
+Please see the filesystem-specific checker manual pages for
 further details.
 .SH OPTIONS
 .TP
 .B \-l
-Lock the whole-disk device by an exclusive
-.BR flock (2).
+Create an exclusive
+.BR flock (2)
+lock file (/run/fsck/<diskname>.lock) for whole-disk device.
 This option can be used with one device only (this means that \fB\-A\fR and
 \fB\-l\fR are mutually exclusive).  This option is recommended when more
 .BR fsck (8)
@@ -103,13 +102,20 @@ multiple devices or for non-rotating disks.  \fBfsck\fR does not lock underlying
 devices when executed to check stacked devices (e.g.\& MD or DM) \(en this feature is
 not implemented yet.
 .TP
-.B \-r
+.BR \-r \ [ \fIfd\fR ]
 Report certain statistics for each fsck when it completes.  These statistics
 include the exit status, the maximum run set size (in kilobytes), the elapsed
 all-clock time and the user and system CPU time used by the fsck run.  For
 example:
 
 /dev/sda1: status 0, rss 92828, real 4.002804, user 2.677592, sys 0.86186
+
+GUI front-ends may specify a file descriptor
+.IR fd ,
+in which case the progress bar information will be sent to that file descriptor
+in a machine parsable format.  For example:
+
+/dev/sda1 0 92828 4.002804 2.677592 0.86186
 .TP
 .B \-s
 Serialize
@@ -154,13 +160,13 @@ They must have the format
 If an options specifier is present, then only filesystems which contain
 .I fs-option
 in their mount options field of
-.B /etc/fstab
+.I /etc/fstab
 will be checked.  If the options specifier is prefixed by a negation
 operator, then only
 those filesystems that do not have
 .I fs-option
 in their mount options field of
-.B /etc/fstab
+.I /etc/fstab
 will be checked.
 .sp
 For example, if
@@ -168,7 +174,7 @@ For example, if
 appears in
 .IR fslist ,
 then only filesystems listed in
-.B /etc/fstab
+.I /etc/fstab
 with the
 .B ro
 option will be checked.
@@ -191,7 +197,7 @@ Normally, the filesystem type is deduced by searching for
 in the
 .I /etc/fstab
 file and using the corresponding entry.
-If the type can not be deduced, and there is only a single filesystem
+If the type cannot be deduced, and there is only a single filesystem
 given as an argument to the
 .B \-t
 option,
@@ -232,7 +238,7 @@ multiple filesystem checks on the same physical disk.
 .B fsck
 does not check stacked devices (RAIDs, dm-crypt, \&...\&) in parallel with any other
 device.  See below for FSCK_FORCE_ALL_PARALLEL setting.  The /sys filesystem is
-used to detemine dependencies between devices.
+used to determine dependencies between devices.
 .sp
 Hence, a very common configuration in
 .I /etc/fstab
@@ -255,7 +261,7 @@ normally does not check whether the device actually exists before
 calling a filesystem specific checker.  Therefore non-existing
 devices may cause the system to enter filesystem repair mode during
 boot if the filesystem specific checker returns a fatal error.  The
-.B /etc/fstab
+.I /etc/fstab
 mount option
 .B nofail
 may be used to have
@@ -304,22 +310,27 @@ Don't show the title on startup.
 Produce verbose output, including all filesystem-specific commands
 that are executed.
 .TP
-.B fs-specific-options
-Options which are not understood by
-.B fsck
-are passed to the filesystem-specific checker.  These options
+\fB\-?\fR, \fB\-\-help\fR
+Display help text and exit.
+.TP
+\fB\-\-version\fR
+Display version information and exit.
+.SH FILESYSTEM SPECIFIC OPTIONS
+.B Options which are not understood by fsck are passed to the filesystem-specific checker! 
+.PP
+These options
 .B must
 not take arguments, as there is no
 way for
 .B fsck
 to be able to properly guess which options take arguments and which
 don't.
-.IP
+.PP
 Options and arguments which follow the
 .B \-\-
 are treated as filesystem-specific options to be passed to the
 filesystem-specific checker.
-.IP
+.PP
 Please note that \fBfsck\fR is not
 designed to pass arbitrarily complicated options to filesystem-specific
 checkers.  If you're doing something complicated, please just
@@ -331,62 +342,9 @@ what you expect,
 You're almost certainly doing something that you shouldn't be doing
 with
 .BR fsck .
-.PP
 Options to different filesystem-specific fsck's are not standardized.
-If in doubt, please consult the man pages of the filesystem-specific
-checker.  Although not guaranteed, the following options are supported
-by most filesystem checkers:
-.TP
-.B \-a
-Automatically repair the filesystem without any questions (use
-this option with caution).  Note that
-.BR e2fsck (8)
-supports
-.B \-a
-for backward compatibility only.  This option is mapped to
-.BR e2fsck 's
-.B \-p
-option which is safe to use, unlike the
-.B \-a
-option that some filesystem checkers support.
-.TP
-.B \-n
-For some filesystem-specific checkers, the
-.B \-n
-option will cause the fs-specific fsck to avoid attempting to repair any
-problems, but simply report such problems to stdout.  This is however
-not true for all filesystem-specific checkers.  In particular,
-.BR fsck.reiserfs (8)
-will not report any corruption if given this option.
-.BR fsck.minix (8)
-does not support the
-.B \-n
-option at all.
-.TP
-.B \-r
-Interactively repair the filesystem (ask for confirmations).  Note: It
-is generally a bad idea to use this option if multiple fsck's are being
-run in parallel.  Also note that this is
-.BR e2fsck 's
-default behavior; it supports this option for backward compatibility
-reasons only.
-.TP
-.B \-y
-For some filesystem-specific checkers, the
-.B \-y
-option will cause the fs-specific fsck to always attempt to fix any
-detected filesystem corruption automatically.  Sometimes an expert may
-be able to do better driving the fsck manually.  Note that
-.B not
-all filesystem-specific checkers implement this option.  In particular
-.BR fsck.minix (8)
-and
-.BR fsck.cramfs (8)
-do not support the
-.B \-y
-option as of this writing.
 .SH FILES
-.IR /etc/fstab .
+.I /etc/fstab
 .SH ENVIRONMENT VARIABLES
 The
 .B fsck
@@ -416,30 +374,20 @@ be run based on gathering accounting data from the operating system.
 .B PATH
 The
 .B PATH
-environment variable is used to find filesystem checkers.  A set of
-system directories are searched first:
-.BR /sbin ,
-.BR /sbin/fs.d ,
-.BR /sbin/fs ,
-.BR /etc/fs ,
-and
-.BR /etc .
-Then the set of directories found in the
-.B PATH
-environment are searched.
+environment variable is used to find filesystem checkers.
 .TP
 .B FSTAB_FILE
 This environment variable allows the system administrator
 to override the standard location of the
-.B /etc/fstab
+.I /etc/fstab
 file.  It is also useful for developers who are testing
 .BR fsck .
 .TP
-.B LIBBLKID_DEBUG=0xffff
-enables debug output.
+.B LIBBLKID_DEBUG=all
+enables libblkid debug output.
 .TP
-.B LIBMOUNT_DEBUG=0xffff
-enables debug output.
+.B LIBMOUNT_DEBUG=all
+enables libmount debug output.
 .SH SEE ALSO
 .na
 .BR fstab (5),
@@ -450,21 +398,21 @@ or
 or
 .BR e2fsck (8),
 .BR cramfsck (8),
-.BR fsck.minix (8),
-.BR fsck.msdos (8),
 .BR fsck.jfs (8),
 .BR fsck.nfs (8),
+.BR fsck.minix (8),
+.BR fsck.msdos (8),
 .BR fsck.vfat (8),
 .BR fsck.xfs (8),
-.BR fsck.xiafs (8),
-.BR reiserfsck (8).
+.BR reiserfsck (8)
 .ad
-.SH AUTHOR
-.MT tytso@mit.edu
-Theodore Ts'o
-.ME
+.SH AUTHORS
+.nf
+Theodore Ts'o <tytso@mit.edu>
+Karel Zak <kzak@redhat.com>
+.fi
 .SH AVAILABILITY
 The fsck command is part of the util-linux package and is available from
-.UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
+.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
 Linux Kernel Archive
 .UE .