2 .\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
3 .\" This file may be copied under the terms of the GNU Public License.
5 .TH FSCK 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
7 fsck \- check and repair a Linux file system
19 .B fs-specific-options
23 is used to check and optionally repair one or more Linux file systems.
25 can be a device name (e.g.
26 .IR /dev/hdc1 ", " /dev/sdb2 ),
28 .IR / ", " /usr ", " /home ),
29 or an ext2 label or UUID specifier (e.g.
30 UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root).
33 program will try to run filesystems on different physical disk drives
34 in parallel to reduce total amount time to check all of the filesystems.
36 The exit code returned by
38 is the sum of the following conditions:
42 \ 1\ \-\ File system errors corrected
44 \ 2\ \-\ System should be rebooted
46 \ 4\ \-\ File system errors left uncorrected
48 \ 8\ \-\ Operational error
50 \ 16\ \-\ Usage or syntax error
52 \ 32\ \-\ Fsck canceled by user request
54 \ 128\ \-\ Shared library error
56 The exit code returned when all file systems are checked using the
58 option is the bit-wise OR of the exit codes for each
59 file system that is checked.
63 is simply a front-end for the various file system checkers
64 (\fBfsck\fR.\fIfstype\fR) available under Linux. The file
65 system-specific checker is searched for in
71 and finally in the directories listed in the PATH environment
72 variable. Please see the file system-specific checker manual pages for
79 operations. This is a good idea if you are checking multiple
80 filesystems and the checkers are in an interactive mode. (Note:
82 runs in an interactive mode by default. To make
84 run in a non-interactive mode, you must either specify the
88 option, if you wish for errors to be corrected automatically, or the
90 option if you do not.)
93 Specifies the type(s) of file system to be checked. When the
95 flag is specified, only filesystems that match
99 parameter is a comma-separated list of filesystems and options
100 specifiers. All of the filesystems in this comma-separated list may be
101 prefixed by a negation operator
105 which requests that only those filesystems not listed in
107 will be checked. If all of the filesystems in
109 are not prefixed by a negation operator, then only those filesystems
115 Options specifiers may be included in the comma separated
117 They must have the format
118 .BI opts= fs-option\fR.
119 If an options specifier is present, then only filesystems which contain
121 in their mount options field of
123 will be checked. If the options specifier is prefixed by a negation
125 those filesystems that do not have
127 in their mount options field of
135 then only filesystems listed in
139 option will be checked.
141 For compatibility with Mandrake distributions whose boot scripts
142 depend upon an unauthorized UI change to the
144 program, if a filesystem type of
150 were specified as an argument to the
154 Normally, the filesystem type is deduced by searching for
158 file and using the corresponding entry.
159 If the type can not be deduced, and there is only a single filesystem
160 given as an argument to the
164 will use the specified filesystem type. If this type is not
165 available, then the default file system type (currently ext2) is used.
170 file and try to check all file systems in one run. This option is
171 typically used from the
173 system initalization file, instead of multiple commands for checking
174 a single file system.
176 The root filesystem will be checked first unless the
178 option is specified (see below). After that,
179 filesystems will be checked in the order specified by the
181 (the sixth) field in the
186 value of 0 are skipped and are not checked at all. Filesystems with a
188 value of greater than zero will be checked in order,
189 with filesystems with the lowest
191 number being checked first.
192 If there are multiple filesystems with the same pass number,
193 fsck will attempt to check them in parallel, although it will avoid running
194 multiple filesystem checks on the same physical disk.
196 Hence, a very common configuration in
198 files is to set the root filesystem to have a
201 and to set all filesystems to have a
203 value of 2. This will allow
205 to automatically run filesystem checkers in parallel if it is advantageous
206 to do so. System administrators might choose
207 not to use this configuration if they need to avoid multiple filesystem
208 checks running in parallel for some reason --- for example, if the
209 machine in question is short on memory so that
210 excessive paging is a concern.
213 Display completion/progress bars for those filesystems checkers (currently
214 only for ext2) which support them. Fsck will manage the filesystem checkers
215 so that only one of them will display a progress bar at a time.
218 Don't execute, just show what would be done.
223 flag is set, check the root filesystem in parallel with the other filesystems.
224 This is not the safest thing in the world to do,
225 since if the root filesystem is in doubt things like the
227 executable might be corrupted! This option is mainly provided
228 for those sysadmins who don't want to repartition the root
229 filesystem to be small and compact (which is really the right solution).
232 When checking all file systems with the
234 flag, skip the root file system (in case it's already mounted read-write).
237 Don't show the title on startup.
240 Produce verbose output, including all file system-specific commands
243 .B fs-specific-options
244 Options which are not understood by
246 are passed to the filesystem-specific checker. These arguments
248 not take arguments, as there is no
251 to be able to properly guess which arguments take options and which
254 Options and arguments which follow the
256 are treated as file system-specific options to be passed to the
257 file system-specific checker.
259 Please note that fsck is not
260 designed to pass arbitrarily complicated options to filesystem-specific
261 checkers. If you're doing something complicated, please just
262 execute the filesystem-specific checker directly. If you pass
264 some horribly complicated option and arguments, and it doesn't do
266 .B don't bother reporting it as a bug.
267 You're almost certainly doing something that you shouldn't be doing
271 Currently, standardized file system-specific options are somewhat in
272 flux. Although not guaranteed, the following options are supported
273 by most file system checkers:
276 Automatically repair the file system without any questions (use
277 this option with caution). Note that
281 for backwards compatibility only. This option is mapped to
284 option which is safe to use, unlike the
286 option that most file system checkers support.
289 Interactively repair the filesystem (ask for confirmations). Note: It
290 is generally a bad idea to use this option if multiple fsck's are being
291 run in parallel. Also note that this is
293 default behavior; it supports this option for backwards compatibility
296 Theodore Ts'o (tytso@mit.edu)
299 .SH ENVIRONMENT VARIABLES
302 program's behavior is affected by the following environment variables:
304 .B FSCK_FORCE_ALL_PARALLEL
305 If this environment variable is set,
307 will attempt to run all of the specified filesystems in parallel,
308 regardless of whether the filesystems appear to be on the same
309 device. (This is useful for RAID systems or high-end storage systems
310 such as those sold by companies such as IBM or EMC.)
313 This environment variable will limit the maximum number of file system
314 checkers that can be running at one time. This allows configurations
315 which have a large number of disks to avoid
317 starting too many file system checkers at once, which might overload
318 CPU and memory resources available on the system. If this value is
319 zero, then an unlimited number of processes can be spawned. This is
320 currently the default, but future versions of
322 may attempt to automatically determine how many file system checks can
323 be run based on gathering accounting data from the operating system.
328 environment variable is used to find file system checkers. A set of
329 system directories are searched first:
336 Then the set of directories found in the
338 environment are searched.
341 This environment variable allows the system administrator
342 to override the standard location of the
344 file. It is also use for developers who are testing