Whamcloud - gitweb
Merge branch 'maint' into next
[tools/e2fsprogs.git] / misc / fsck.8.in
index fb20521..aa5fd05 100644 (file)
@@ -8,19 +8,25 @@ fsck \- check and repair a Linux file system
 .SH SYNOPSIS
 .B fsck
 [
 .SH SYNOPSIS
 .B fsck
 [
-.B \-sACVRTNP
+.B \-sAVRTNP
+]
+[
+.B \-C
+[
+.I fd
+]
 ]
 [
 .B \-t
 .I fstype
 ] 
 ]
 [
 .B \-t
 .I fstype
 ] 
-.I filesys [ ... ]
+.I [filesys ... ]
 [\-\-] [
 [\-\-] [
-.B fsck-options
+.B fs-specific-options
 ]
 .SH DESCRIPTION
 .B fsck
 ]
 .SH DESCRIPTION
 .B fsck
-is used to check and optionally repair one or more Linux file systems.  
+is used to check and optionally repair one or more Linux file systems.  
 .I filesys
 can be a device name (e.g.
 .IR /dev/hdc1 ", " /dev/sdb2 ),
 .I filesys
 can be a device name (e.g.
 .IR /dev/hdc1 ", " /dev/sdb2 ),
@@ -28,10 +34,21 @@ a mount point (e.g.
 .IR / ", " /usr ", " /home ),
 or an ext2 label or UUID specifier (e.g.
 UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root).  
 .IR / ", " /usr ", " /home ),
 or an ext2 label or UUID specifier (e.g.
 UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root).  
-The 
+Normally, the 
 .B fsck 
 .B fsck 
-program will try to run filesystems on different physical disk drives 
-in parallel to reduce total amount time to check all of the filesystems.
+program will try to handle filesystems on different physical disk drives 
+in parallel to reduce the total amount of time needed to check all of the
+filesystems.
+.PP
+If no filesystems are specified on the command line, and the 
+.B \-A 
+option is not specified, 
+.B fsck
+will default to checking filesystems in
+.B /etc/fstab
+serially.  This is equivalent to the 
+.B \-As
+options.
 .PP
 The exit code returned by
 .B fsck
 .PP
 The exit code returned by
 .B fsck
@@ -49,11 +66,12 @@ is the sum of the following conditions:
 .br
 \      16\     \-\ Usage or syntax error
 .br
 .br
 \      16\     \-\ Usage or syntax error
 .br
+\      32\     \-\ Fsck canceled by user request
+.br
 \      128\    \-\ Shared library error
 .br
 \      128\    \-\ Shared library error
 .br
-The exit code returned when all file systems are checked using the
-.B \-A
-option is the bit-wise OR of the exit codes for each
+The exit code returned when multiple file systems are checked 
+is the bit-wise OR of the exit codes for each
 file system that is checked.
 .PP
 In actuality,
 file system that is checked.
 .PP
 In actuality,
@@ -74,7 +92,7 @@ further details.
 .B \-s
 Serialize 
 .B fsck 
 .B \-s
 Serialize 
 .B fsck 
-operations.  This is a good idea if you checking multiple
+operations.  This is a good idea if you are checking multiple
 filesystems and the checkers are in an interactive mode.  (Note:
 .BR e2fsck (8)
 runs in an interactive mode by default.  To make 
 filesystems and the checkers are in an interactive mode.  (Note:
 .BR e2fsck (8)
 runs in an interactive mode by default.  To make 
@@ -110,19 +128,31 @@ in
 .I fslist
 will be checked.
 .sp
 .I fslist
 will be checked.
 .sp
-Options specifiers may be included in the comma separated
+Options specifiers may be included in the comma-separated
 .IR fslist .
 They must have the format 
 .IR fslist .
 They must have the format 
-.BI opts= fs-option\fR,
-and may be prefixed by a negation operator.  If an options specifier is
-present, then only filesystems whose 
+.BI opts= fs-option\fR.
+If an options specifier is present, then only filesystems which contain
+.I fs-option
+in their mount options field of 
 .B /etc/fstab
 .B /etc/fstab
-entry do (or do not, if the options specifier was prefixed by a negation
-operator) contain 
+will be checked.  If the options specifier is prefixed by a negation
+operator, then only 
+those filesystems that do not have
 .I fs-option
 .I fs-option
-in their options field of the
+in their mount options field of
 .B /etc/fstab 
 .B /etc/fstab 
-file will be checked.
+will be checked.
+.sp
+For example, if
+.B opts=ro
+appears in
+.IR fslist ,
+then only filesystems listed in
+.B /etc/fstab 
+with the
+.B ro
+option will be checked.
 .sp
 For compatibility with Mandrake distributions whose boot scripts
 depend upon an unauthorized UI change to the
 .sp
 For compatibility with Mandrake distributions whose boot scripts
 depend upon an unauthorized UI change to the
@@ -156,7 +186,7 @@ Walk through the
 file and try to check all file systems in one run.  This option is
 typically used from the
 .I /etc/rc
 file and try to check all file systems in one run.  This option is
 typically used from the
 .I /etc/rc
-system initalization file, instead of multiple commands for checking
+system initialization file, instead of multiple commands for checking
 a single file system.
 .sp
 The root filesystem will be checked first unless the
 a single file system.
 .sp
 The root filesystem will be checked first unless the
@@ -184,7 +214,7 @@ Hence, a very common configuration in
 files is to set the root filesystem to have a 
 .I fs_passno
 value of 1
 files is to set the root filesystem to have a 
 .I fs_passno
 value of 1
-and to set all filesystems to have a
+and to set all other filesystems to have a
 .I fs_passno
 value of 2.  This will allow
 .B fsck
 .I fs_passno
 value of 2.  This will allow
 .B fsck
@@ -195,10 +225,13 @@ checks running in parallel for some reason --- for example, if the
 machine in question is short on memory so that
 excessive paging is a concern.
 .TP
 machine in question is short on memory so that
 excessive paging is a concern.
 .TP
-.B \-C
-Display completion/progress bars for those filesystems checkers (currently
-only for ext2) which support them.   Fsck will manage the filesystem checkers
-so that only one of them will display a progress bar at a time.
+.B \-C\fR [ \fI "fd" \fR ]
+Display completion/progress bars for those filesystem checkers (currently 
+only for ext2 and ext3) which support them.   Fsck will manage the
+filesystem checkers so that only one of them will display  
+a progress bar at a time.  GUI front-ends may specify a file descriptor
+.IR fd ,
+in which case the progress bar information will be sent to that file descriptor.
 .TP
 .B \-N
 Don't execute, just show what would be done.
 .TP
 .B \-N
 Don't execute, just show what would be done.
@@ -226,8 +259,8 @@ Don't show the title on startup.
 Produce verbose output, including all file system-specific commands
 that are executed.
 .TP
 Produce verbose output, including all file system-specific commands
 that are executed.
 .TP
-.B fsck-options
-Options which which are not understood by 
+.B fs-specific-options
+Options which are not understood by 
 .B fsck 
 are passed to the filesystem-specific checker.  These arguments
 .B must
 .B fsck 
 are passed to the filesystem-specific checker.  These arguments
 .B must
@@ -254,8 +287,9 @@ You're almost certainly doing something that you shouldn't be doing
 with 
 .BR fsck.
 .PP
 with 
 .BR fsck.
 .PP
-Currently, standardized file system-specific options are somewhat in
-flux.  Although not guaranteed, the following options are supported
+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 file system checkers:
 .TP
 .B \-a
 by most file system checkers:
 .TP
 .B \-a
@@ -269,7 +303,20 @@ for backwards compatibility only.  This option is mapped to
 .B \-p
 option which is safe to use, unlike the 
 .B \-a 
 .B \-p
 option which is safe to use, unlike the 
 .B \-a 
-option that most file system checkers support.
+option that some file system 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
 .TP
 .B \-r
 Interactively repair the filesystem (ask for confirmations).  Note: It
@@ -278,6 +325,21 @@ run in parallel.  Also note that this is
 .BR e2fsck 's
 default behavior; it supports this option for backwards compatibility
 reasons only.
 .BR e2fsck 's
 default behavior; it supports this option for backwards 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)
+does not support the
+.B -y
+option as of this writing.
 .SH AUTHOR
 Theodore Ts'o (tytso@mit.edu)
 .SH FILES
 .SH AUTHOR
 Theodore Ts'o (tytso@mit.edu)
 .SH FILES
@@ -327,13 +389,22 @@ environment are searched.
 This environment variable allows the system administrator 
 to override the standard location of the 
 .B /etc/fstab
 This environment variable allows the system administrator 
 to override the standard location of the 
 .B /etc/fstab
-file.  It is also use for developers who are testing
+file.  It is also useful for developers who are testing
 .BR fsck .
 .SH SEE ALSO
 .BR fstab (5),
 .BR mkfs (8),
 .BR fsck .
 .SH SEE ALSO
 .BR fstab (5),
 .BR mkfs (8),
-.BR fsck.minix (8),
 .BR fsck.ext2 (8)
 or
 .BR fsck.ext2 (8)
 or
+.BR fsck.ext3 (8)
+or
 .BR e2fsck (8),
 .BR e2fsck (8),
-.BR fsck.xiafs (8).
+.BR cramfsck (8),
+.BR fsck.minix (8),
+.BR fsck.msdos (8),
+.BR fsck.jfs (8),
+.BR fsck.nfs (8),
+.BR fsck.vfat (8),
+.BR fsck.xfs (8),
+.BR fsck.xiafs (8),
+.BR reiserfsck (8).