X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=misc%2Ffsck.8.in;h=f97f545201133f174dc6649865d497c213426c12;hb=7380ac903316c0fe91ed6706eb4d84249a9b348d;hp=bef29f219087b67245dda252aeedaf213fdd86ef;hpb=caf8ce4cc497b22cca26e1063183e58391c1b3a0;p=tools%2Fe2fsprogs.git diff --git a/misc/fsck.8.in b/misc/fsck.8.in index bef29f2..f97f545 100644 --- a/misc/fsck.8.in +++ b/misc/fsck.8.in @@ -13,10 +13,11 @@ fsck \- check and repair a Linux file system [ .B \-t .I fstype -] [\-\-] [ +] +.I filesys [ ... ] +[\-\-] [ .B fsck-options ] -.I filesys [ ... ] .SH DESCRIPTION .B fsck is used to check and optionally repair a one or more Linux file systems. @@ -86,29 +87,67 @@ option, if you wish for errors to be corrected automatically, or the .B \-n option if you do not.) .TP -.BI \-t " fstype" -Specifies the type of file system to be checked. When the +.BI \-t " fslist" +Specifies the type(s) of file system to be checked. When the .B \-A flag is specified, only filesystems that match -.I fstype -are checked. If -.I fstype -is prefixed with -.I no -then only filesystems whose type does not match -.I fstype -are checked. +.I fslist +are checked. The +.I fslist +parameter is a comma-separated list of filesystems and options +specifiers. All of the filesystems in this comma-separated list may be +prefixed by a negation operator +.RB ' no ' +or +.RB ' ! ', +which requests that only those filesystems not listed in +.I fslist +will be checked. If all of the filesystems in +.I fslist +are not prefixed by a negation operator, then only those filesystems +listed +in +.I fslist +will be checked. +.sp +Options specifiers may be included in the comma separated +.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 +.B /etc/fstab +entry do (or do not, if the options specifier was prefixed by a negation +operator) contain +.I fs-option +in their options field of the +.B /etc/fstab +file will be checked. +.sp +For compatibility with Mandrake distributions whose boot scripts +depend upon an unauthorized UI change to the +.B fsck +program, if a filesystem type of +.B loop +is found in +.IR fslist , +it is treated as if +.B opts=loop +were specified as an argument to the +.B \-t +option. .sp Normally, the filesystem type is deduced by searching for .I filesys in the .I /etc/fstab file and using the corresponding entry. -If the type can not be deduced, +If the type can not be deduced, and there is only a single filesystem +given as an argument to the +.B \-t +option, .B fsck -will use the type specified by the -.B \-t -option if it specifies a unique filesystem type. If this type is not +will use the specified filesystem type. If this type is not available, then the default file system type (currently ext2) is used. .TP .B \-A @@ -127,10 +166,20 @@ filesystems will be checked in the order specified by the .I fs_passno (the sixth) field in the .I /etc/fstab -file. If there are multiple filesystems with the same pass number, -e2fsck will attempt to check them in parallel, although it will avoid running -multiple filesystem checks on the same physical disk. Hence, -a very common configuration in +file. +Filesystems with a +.I fs_passno +value of 0 are skipped and are not checked at all. Filesystems with a +.I fs_passno +value of greater than zero will be checked in order, with filesystems +with filesystems with the lowest +.I fs_passno +number being checked first. +If there are multiple filesystems with the same pass number, +fsck will attempt to check them in parallel, although it will avoid running +multiple filesystem checks on the same physical disk. +.sp +Hence, a very common configuration in .I /etc/fstab files is to set the root filesystem to have a .I fs_passno @@ -141,7 +190,7 @@ value of 2. This will allow .B fsck to automatically run filesystem checkers in parallel if it is advantageous to do so. System administrators might choose -not to use this configuration if they need to avoid multiple filesystem +not to use this configuration if they need to avoid multiple filesystem 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. @@ -178,12 +227,32 @@ Produce verbose output, including all file system-specific commands that are executed. .TP .B fsck-options -Any options which are not understood by -.BR fsck , -or which follow the +Options which which are not understood by +.B fsck +are passed to the filesystem-specific checker. These arguments +.B must +not take arguments, as there is no +way for +.B fsck +to be able to properly guess which arguments take options and which +don't. +.IP +Options and arguments which follow the .B \-\- -option are treated as file system-specific options to be passed to the +are treated as file system-specific options to be passed to the file system-specific checker. +.IP +Please note that fsck is not +designed to pass arbitrarily complicated options to filesystem-specific +checkers. If you're doing something complicated, please just +execute the filesystem-specific checker directly. If you pass +.B fsck +some horribly complicated option and arguments, and it doesn't do +what you expect, +.B don't bother reporting it as a bug. +You're almost certainly doing something that you shouldn't be doing +with +.BR fsck. .PP Currently, standardized file system-specific options are somewhat in flux. Although not guaranteed, the following options are supported @@ -211,14 +280,55 @@ default behavior; it supports this option for backwards compatibility reasons only. .SH AUTHOR Theodore Ts'o (tytso@mit.edu) -.PP -The manual page was shamelessly adapted from David Engel and Fred van -Kempen's generic -.B fsck -front end program, which was in turn shamelessly -adapted from Remy Card's version for the ext2 file system. .SH FILES .IR /etc/fstab . +.SH ENVIRONMENT VARIABLES +The +.B fsck +program's behavior is affected by the following environment variables: +.TP +.B FSCK_FORCE_ALL_PARALLEL +If this environment variable is set, +.B fsck +will attempt to run all of the specified filesystems in parallel, +regardless of whether the filesystems appear to be on the same +device. (This is useful for RAID systems or high-end storage systems +such as those sold by companies such as IBM or EMC.) +.TP +.B FSCK_MAX_INST +This environment variable will limit the maximum number of file system +checkers that can be running at one time. This allows configurations +which have a large number of disks to avoid +.B fsck +starting too many file system checkers at once, which might overload +CPU and memory resources available on the system. If this value is +zero, then an unlimited number of processes can be spawned. This is +currently the default, but future versions of +.B fsck +may attempt to automatically determine how many file system checks can +be run based on gathering accounting data from the operating system. +.TP +.B PATH +The +.B PATH +environment variable is used to find file system 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. +.TP +.B FSTAB_FILE +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 +.BR fsck . .SH SEE ALSO .BR fstab (5), .BR mkfs (8),