Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 1 | .\" -*- nroff -*- |
Theodore Ts'o | a418d3a | 1997-04-26 14:00:26 +0000 | [diff] [blame] | 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. |
| 4 | .\" |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 5 | .TH FSCK 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 6 | .SH NAME |
| 7 | fsck \- check and repair a Linux file system |
| 8 | .SH SYNOPSIS |
| 9 | .B fsck |
| 10 | [ |
Theodore Ts'o | fe263da | 2008-02-16 14:14:24 -0500 | [diff] [blame] | 11 | .B \-sAVRTMNP |
Theodore Ts'o | 22dcccd | 2005-01-05 13:43:29 -0500 | [diff] [blame] | 12 | ] |
| 13 | [ |
| 14 | .B \-C |
| 15 | [ |
| 16 | .I fd |
| 17 | ] |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 18 | ] |
| 19 | [ |
| 20 | .B \-t |
| 21 | .I fstype |
Theodore Ts'o | 1d349cc | 2001-08-15 19:06:55 -0400 | [diff] [blame] | 22 | ] |
Theodore Ts'o | a141135 | 2002-08-17 17:39:39 -0400 | [diff] [blame] | 23 | .I [filesys ... ] |
Theodore Ts'o | 1d349cc | 2001-08-15 19:06:55 -0400 | [diff] [blame] | 24 | [\-\-] [ |
Theodore Ts'o | f044b4d | 2002-08-17 13:32:21 -0400 | [diff] [blame] | 25 | .B fs-specific-options |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 26 | ] |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 27 | .SH DESCRIPTION |
| 28 | .B fsck |
Theodore Ts'o | f044b4d | 2002-08-17 13:32:21 -0400 | [diff] [blame] | 29 | is used to check and optionally repair one or more Linux file systems. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 30 | .I filesys |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 31 | can be a device name (e.g. |
| 32 | .IR /dev/hdc1 ", " /dev/sdb2 ), |
| 33 | a mount point (e.g. |
| 34 | .IR / ", " /usr ", " /home ), |
| 35 | or an ext2 label or UUID specifier (e.g. |
| 36 | UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). |
Theodore Ts'o | a141135 | 2002-08-17 17:39:39 -0400 | [diff] [blame] | 37 | Normally, the |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 38 | .B fsck |
Theodore Ts'o | f37ab68 | 2005-05-05 23:15:55 -0400 | [diff] [blame] | 39 | program will try to handle filesystems on different physical disk drives |
| 40 | in parallel to reduce the total amount of time needed to check all of the |
| 41 | filesystems. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 42 | .PP |
Theodore Ts'o | a141135 | 2002-08-17 17:39:39 -0400 | [diff] [blame] | 43 | If no filesystems are specified on the command line, and the |
| 44 | .B \-A |
| 45 | option is not specified, |
| 46 | .B fsck |
| 47 | will default to checking filesystems in |
| 48 | .B /etc/fstab |
Theodore Ts'o | f37ab68 | 2005-05-05 23:15:55 -0400 | [diff] [blame] | 49 | serially. This is equivalent to the |
Theodore Ts'o | a141135 | 2002-08-17 17:39:39 -0400 | [diff] [blame] | 50 | .B \-As |
| 51 | options. |
| 52 | .PP |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 53 | The exit code returned by |
| 54 | .B fsck |
| 55 | is the sum of the following conditions: |
| 56 | .br |
| 57 | \ 0\ \-\ No errors |
| 58 | .br |
| 59 | \ 1\ \-\ File system errors corrected |
| 60 | .br |
| 61 | \ 2\ \-\ System should be rebooted |
| 62 | .br |
| 63 | \ 4\ \-\ File system errors left uncorrected |
| 64 | .br |
| 65 | \ 8\ \-\ Operational error |
| 66 | .br |
| 67 | \ 16\ \-\ Usage or syntax error |
| 68 | .br |
Theodore Ts'o | 4cae045 | 2002-07-21 14:14:03 -0400 | [diff] [blame] | 69 | \ 32\ \-\ Fsck canceled by user request |
| 70 | .br |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 71 | \ 128\ \-\ Shared library error |
| 72 | .br |
Theodore Ts'o | a141135 | 2002-08-17 17:39:39 -0400 | [diff] [blame] | 73 | The exit code returned when multiple file systems are checked |
| 74 | is the bit-wise OR of the exit codes for each |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 75 | file system that is checked. |
| 76 | .PP |
| 77 | In actuality, |
| 78 | .B fsck |
| 79 | is simply a front-end for the various file system checkers |
| 80 | (\fBfsck\fR.\fIfstype\fR) available under Linux. The file |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 81 | system-specific checker is searched for in |
| 82 | .I /sbin |
| 83 | first, then in |
| 84 | .I /etc/fs |
| 85 | and |
| 86 | .IR /etc , |
| 87 | and finally in the directories listed in the PATH environment |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 88 | variable. Please see the file system-specific checker manual pages for |
| 89 | further details. |
| 90 | .SH OPTIONS |
| 91 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 92 | .B \-s |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 93 | Serialize |
| 94 | .B fsck |
Theodore Ts'o | f044b4d | 2002-08-17 13:32:21 -0400 | [diff] [blame] | 95 | operations. This is a good idea if you are checking multiple |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 96 | filesystems and the checkers are in an interactive mode. (Note: |
| 97 | .BR e2fsck (8) |
| 98 | runs in an interactive mode by default. To make |
| 99 | .BR e2fsck (8) |
| 100 | run in a non-interactive mode, you must either specify the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 101 | .B \-p |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 102 | or |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 103 | .B \-a |
| 104 | option, if you wish for errors to be corrected automatically, or the |
| 105 | .B \-n |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 106 | option if you do not.) |
| 107 | .TP |
Theodore Ts'o | 10a32f1 | 2001-05-21 02:15:15 +0000 | [diff] [blame] | 108 | .BI \-t " fslist" |
| 109 | Specifies the type(s) of file system to be checked. When the |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 110 | .B \-A |
| 111 | flag is specified, only filesystems that match |
Theodore Ts'o | 10a32f1 | 2001-05-21 02:15:15 +0000 | [diff] [blame] | 112 | .I fslist |
| 113 | are checked. The |
| 114 | .I fslist |
| 115 | parameter is a comma-separated list of filesystems and options |
| 116 | specifiers. All of the filesystems in this comma-separated list may be |
| 117 | prefixed by a negation operator |
| 118 | .RB ' no ' |
| 119 | or |
| 120 | .RB ' ! ', |
| 121 | which requests that only those filesystems not listed in |
| 122 | .I fslist |
| 123 | will be checked. If all of the filesystems in |
| 124 | .I fslist |
| 125 | are not prefixed by a negation operator, then only those filesystems |
| 126 | listed |
| 127 | in |
| 128 | .I fslist |
| 129 | will be checked. |
| 130 | .sp |
Theodore Ts'o | f37ab68 | 2005-05-05 23:15:55 -0400 | [diff] [blame] | 131 | Options specifiers may be included in the comma-separated |
Theodore Ts'o | 10a32f1 | 2001-05-21 02:15:15 +0000 | [diff] [blame] | 132 | .IR fslist . |
| 133 | They must have the format |
Theodore Ts'o | f044b4d | 2002-08-17 13:32:21 -0400 | [diff] [blame] | 134 | .BI opts= fs-option\fR. |
| 135 | If an options specifier is present, then only filesystems which contain |
Theodore Ts'o | 10a32f1 | 2001-05-21 02:15:15 +0000 | [diff] [blame] | 136 | .I fs-option |
Theodore Ts'o | f044b4d | 2002-08-17 13:32:21 -0400 | [diff] [blame] | 137 | in their mount options field of |
| 138 | .B /etc/fstab |
| 139 | will be checked. If the options specifier is prefixed by a negation |
| 140 | operator, then only |
| 141 | those filesystems that do not have |
| 142 | .I fs-option |
| 143 | in their mount options field of |
Theodore Ts'o | 10a32f1 | 2001-05-21 02:15:15 +0000 | [diff] [blame] | 144 | .B /etc/fstab |
Theodore Ts'o | f044b4d | 2002-08-17 13:32:21 -0400 | [diff] [blame] | 145 | will be checked. |
| 146 | .sp |
| 147 | For example, if |
| 148 | .B opts=ro |
| 149 | appears in |
| 150 | .IR fslist , |
| 151 | then only filesystems listed in |
| 152 | .B /etc/fstab |
| 153 | with the |
| 154 | .B ro |
| 155 | option will be checked. |
Theodore Ts'o | 10a32f1 | 2001-05-21 02:15:15 +0000 | [diff] [blame] | 156 | .sp |
| 157 | For compatibility with Mandrake distributions whose boot scripts |
| 158 | depend upon an unauthorized UI change to the |
| 159 | .B fsck |
| 160 | program, if a filesystem type of |
| 161 | .B loop |
| 162 | is found in |
| 163 | .IR fslist , |
| 164 | it is treated as if |
| 165 | .B opts=loop |
| 166 | were specified as an argument to the |
| 167 | .B \-t |
| 168 | option. |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 169 | .sp |
| 170 | Normally, the filesystem type is deduced by searching for |
| 171 | .I filesys |
| 172 | in the |
| 173 | .I /etc/fstab |
| 174 | file and using the corresponding entry. |
Theodore Ts'o | 10a32f1 | 2001-05-21 02:15:15 +0000 | [diff] [blame] | 175 | If the type can not be deduced, and there is only a single filesystem |
| 176 | given as an argument to the |
| 177 | .B \-t |
| 178 | option, |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 179 | .B fsck |
Theodore Ts'o | 10a32f1 | 2001-05-21 02:15:15 +0000 | [diff] [blame] | 180 | will use the specified filesystem type. If this type is not |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 181 | available, then the default file system type (currently ext2) is used. |
| 182 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 183 | .B \-A |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 184 | Walk through the |
| 185 | .I /etc/fstab |
| 186 | file and try to check all file systems in one run. This option is |
| 187 | typically used from the |
| 188 | .I /etc/rc |
Theodore Ts'o | 8139367 | 2005-04-16 14:05:09 -0400 | [diff] [blame] | 189 | system initialization file, instead of multiple commands for checking |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 190 | a single file system. |
Theodore Ts'o | 7953f61 | 1999-01-09 05:03:52 +0000 | [diff] [blame] | 191 | .sp |
| 192 | The root filesystem will be checked first unless the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 193 | .B \-P |
Theodore Ts'o | 7953f61 | 1999-01-09 05:03:52 +0000 | [diff] [blame] | 194 | option is specified (see below). After that, |
| 195 | filesystems will be checked in the order specified by the |
| 196 | .I fs_passno |
| 197 | (the sixth) field in the |
| 198 | .I /etc/fstab |
Theodore Ts'o | 2d09179 | 2000-12-02 07:03:32 +0000 | [diff] [blame] | 199 | file. |
| 200 | Filesystems with a |
| 201 | .I fs_passno |
Theodore Ts'o | 9b61b8c | 2001-07-20 14:25:23 -0400 | [diff] [blame] | 202 | value of 0 are skipped and are not checked at all. Filesystems with a |
| 203 | .I fs_passno |
Theodore Ts'o | 7de6577 | 2002-04-30 20:22:32 -0400 | [diff] [blame] | 204 | value of greater than zero will be checked in order, |
Theodore Ts'o | 9b61b8c | 2001-07-20 14:25:23 -0400 | [diff] [blame] | 205 | with filesystems with the lowest |
| 206 | .I fs_passno |
| 207 | number being checked first. |
Theodore Ts'o | 2d09179 | 2000-12-02 07:03:32 +0000 | [diff] [blame] | 208 | If there are multiple filesystems with the same pass number, |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 209 | fsck will attempt to check them in parallel, although it will avoid running |
Theodore Ts'o | 2d09179 | 2000-12-02 07:03:32 +0000 | [diff] [blame] | 210 | multiple filesystem checks on the same physical disk. |
Theodore Ts'o | 9b61b8c | 2001-07-20 14:25:23 -0400 | [diff] [blame] | 211 | .sp |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 212 | Hence, a very common configuration in |
Theodore Ts'o | 7953f61 | 1999-01-09 05:03:52 +0000 | [diff] [blame] | 213 | .I /etc/fstab |
| 214 | files is to set the root filesystem to have a |
| 215 | .I fs_passno |
| 216 | value of 1 |
Theodore Ts'o | f37ab68 | 2005-05-05 23:15:55 -0400 | [diff] [blame] | 217 | and to set all other filesystems to have a |
Theodore Ts'o | 7953f61 | 1999-01-09 05:03:52 +0000 | [diff] [blame] | 218 | .I fs_passno |
| 219 | value of 2. This will allow |
| 220 | .B fsck |
| 221 | to automatically run filesystem checkers in parallel if it is advantageous |
| 222 | to do so. System administrators might choose |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 223 | not to use this configuration if they need to avoid multiple filesystem |
Theodore Ts'o | 7953f61 | 1999-01-09 05:03:52 +0000 | [diff] [blame] | 224 | checks running in parallel for some reason --- for example, if the |
| 225 | machine in question is short on memory so that |
| 226 | excessive paging is a concern. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 227 | .TP |
Theodore Ts'o | 22dcccd | 2005-01-05 13:43:29 -0500 | [diff] [blame] | 228 | .B \-C\fR [ \fI "fd" \fR ] |
| 229 | Display completion/progress bars for those filesystem checkers (currently |
| 230 | only for ext2 and ext3) which support them. Fsck will manage the |
| 231 | filesystem checkers so that only one of them will display |
| 232 | a progress bar at a time. GUI front-ends may specify a file descriptor |
| 233 | .IR fd , |
Theodore Ts'o | f37ab68 | 2005-05-05 23:15:55 -0400 | [diff] [blame] | 234 | in which case the progress bar information will be sent to that file descriptor. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 235 | .TP |
Theodore Ts'o | fe263da | 2008-02-16 14:14:24 -0500 | [diff] [blame] | 236 | .B \-M |
| 237 | Do not check mounted filesystems and return an exit code of 0 |
| 238 | for mounted filesystems. |
| 239 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 240 | .B \-N |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 241 | Don't execute, just show what would be done. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 242 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 243 | .B \-P |
Theodore Ts'o | 7f88b04 | 1997-04-26 14:48:50 +0000 | [diff] [blame] | 244 | When the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 245 | .B \-A |
Theodore Ts'o | 7f88b04 | 1997-04-26 14:48:50 +0000 | [diff] [blame] | 246 | flag is set, check the root filesystem in parallel with the other filesystems. |
| 247 | This is not the safest thing in the world to do, |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 248 | since if the root filesystem is in doubt things like the |
| 249 | .BR e2fsck (8) |
| 250 | executable might be corrupted! This option is mainly provided |
Theodore Ts'o | 7f88b04 | 1997-04-26 14:48:50 +0000 | [diff] [blame] | 251 | for those sysadmins who don't want to repartition the root |
| 252 | filesystem to be small and compact (which is really the right solution). |
| 253 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 254 | .B \-R |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 255 | When checking all file systems with the |
| 256 | .B \-A |
| 257 | flag, skip the root file system (in case it's already mounted read-write). |
| 258 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 259 | .B \-T |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 260 | Don't show the title on startup. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 261 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 262 | .B \-V |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 263 | Produce verbose output, including all file system-specific commands |
| 264 | that are executed. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 265 | .TP |
Theodore Ts'o | f044b4d | 2002-08-17 13:32:21 -0400 | [diff] [blame] | 266 | .B fs-specific-options |
| 267 | Options which are not understood by |
Theodore Ts'o | 609c9d0 | 2001-05-05 06:45:05 +0000 | [diff] [blame] | 268 | .B fsck |
| 269 | are passed to the filesystem-specific checker. These arguments |
| 270 | .B must |
| 271 | not take arguments, as there is no |
| 272 | way for |
| 273 | .B fsck |
| 274 | to be able to properly guess which arguments take options and which |
| 275 | don't. |
| 276 | .IP |
| 277 | Options and arguments which follow the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 278 | .B \-\- |
Theodore Ts'o | 609c9d0 | 2001-05-05 06:45:05 +0000 | [diff] [blame] | 279 | are treated as file system-specific options to be passed to the |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 280 | file system-specific checker. |
Theodore Ts'o | 609c9d0 | 2001-05-05 06:45:05 +0000 | [diff] [blame] | 281 | .IP |
| 282 | Please note that fsck is not |
| 283 | designed to pass arbitrarily complicated options to filesystem-specific |
| 284 | checkers. If you're doing something complicated, please just |
| 285 | execute the filesystem-specific checker directly. If you pass |
| 286 | .B fsck |
| 287 | some horribly complicated option and arguments, and it doesn't do |
| 288 | what you expect, |
| 289 | .B don't bother reporting it as a bug. |
| 290 | You're almost certainly doing something that you shouldn't be doing |
| 291 | with |
| 292 | .BR fsck. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 293 | .PP |
Theodore Ts'o | 64c90ee | 2003-12-26 13:56:14 -0500 | [diff] [blame] | 294 | Options to different filesystem-specific fsck's are not standardized. |
| 295 | If in doubt, please consult the man pages of the filesystem-specific |
| 296 | checker. Although not guaranteed, the following options are supported |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 297 | by most file system checkers: |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 298 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 299 | .B \-a |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 300 | Automatically repair the file system without any questions (use |
| 301 | this option with caution). Note that |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 302 | .BR e2fsck (8) |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 303 | supports |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 304 | .B \-a |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 305 | for backwards compatibility only. This option is mapped to |
| 306 | .BR e2fsck 's |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 307 | .B \-p |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 308 | option which is safe to use, unlike the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 309 | .B \-a |
Theodore Ts'o | 64c90ee | 2003-12-26 13:56:14 -0500 | [diff] [blame] | 310 | option that some file system checkers support. |
| 311 | .TP |
| 312 | .B \-n |
| 313 | For some filesystem-specific checkers, the |
| 314 | .B \-n |
| 315 | option will cause the fs-specific fsck to avoid attempting to repair any |
| 316 | problems, but simply report such problems to stdout. This is however |
| 317 | not true for all filesystem-specific checkers. In particular, |
| 318 | .BR fsck.reiserfs (8) |
| 319 | will not report any corruption if given this option. |
| 320 | .BR fsck.minix (8) |
| 321 | does not support the |
| 322 | .B \-n |
| 323 | option at all. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 324 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 325 | .B \-r |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 326 | Interactively repair the filesystem (ask for confirmations). Note: It |
| 327 | is generally a bad idea to use this option if multiple fsck's are being |
| 328 | run in parallel. Also note that this is |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 329 | .BR e2fsck 's |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 330 | default behavior; it supports this option for backwards compatibility |
| 331 | reasons only. |
Theodore Ts'o | 64c90ee | 2003-12-26 13:56:14 -0500 | [diff] [blame] | 332 | .TP |
| 333 | .B \-y |
| 334 | For some filesystem-specific checkers, the |
| 335 | .B \-y |
| 336 | option will cause the fs-specific fsck to always attempt to fix any |
| 337 | detected filesystem corruption automatically. Sometimes an expert may |
| 338 | be able to do better driving the fsck manually. Note that |
| 339 | .B not |
| 340 | all filesystem-specific checkers implement this option. In particular |
| 341 | .BR fsck.minix (8) |
| 342 | and |
| 343 | .BR fsck.cramfs (8) |
| 344 | does not support the |
| 345 | .B -y |
| 346 | option as of this writing. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 347 | .SH AUTHOR |
| 348 | Theodore Ts'o (tytso@mit.edu) |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 349 | .SH FILES |
| 350 | .IR /etc/fstab . |
Theodore Ts'o | a106911 | 2002-01-29 12:49:14 -0500 | [diff] [blame] | 351 | .SH ENVIRONMENT VARIABLES |
| 352 | The |
| 353 | .B fsck |
| 354 | program's behavior is affected by the following environment variables: |
| 355 | .TP |
| 356 | .B FSCK_FORCE_ALL_PARALLEL |
| 357 | If this environment variable is set, |
| 358 | .B fsck |
| 359 | will attempt to run all of the specified filesystems in parallel, |
| 360 | regardless of whether the filesystems appear to be on the same |
| 361 | device. (This is useful for RAID systems or high-end storage systems |
| 362 | such as those sold by companies such as IBM or EMC.) |
| 363 | .TP |
| 364 | .B FSCK_MAX_INST |
| 365 | This environment variable will limit the maximum number of file system |
| 366 | checkers that can be running at one time. This allows configurations |
| 367 | which have a large number of disks to avoid |
| 368 | .B fsck |
| 369 | starting too many file system checkers at once, which might overload |
| 370 | CPU and memory resources available on the system. If this value is |
| 371 | zero, then an unlimited number of processes can be spawned. This is |
| 372 | currently the default, but future versions of |
| 373 | .B fsck |
| 374 | may attempt to automatically determine how many file system checks can |
| 375 | be run based on gathering accounting data from the operating system. |
| 376 | .TP |
| 377 | .B PATH |
| 378 | The |
| 379 | .B PATH |
| 380 | environment variable is used to find file system checkers. A set of |
| 381 | system directories are searched first: |
| 382 | .BR /sbin , |
| 383 | .BR /sbin/fs.d , |
| 384 | .BR /sbin/fs , |
| 385 | .BR /etc/fs , |
| 386 | and |
| 387 | .BR /etc . |
| 388 | Then the set of directories found in the |
| 389 | .B PATH |
| 390 | environment are searched. |
| 391 | .TP |
| 392 | .B FSTAB_FILE |
| 393 | This environment variable allows the system administrator |
| 394 | to override the standard location of the |
| 395 | .B /etc/fstab |
Theodore Ts'o | f37ab68 | 2005-05-05 23:15:55 -0400 | [diff] [blame] | 396 | file. It is also useful for developers who are testing |
Theodore Ts'o | a106911 | 2002-01-29 12:49:14 -0500 | [diff] [blame] | 397 | .BR fsck . |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 398 | .SH SEE ALSO |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 399 | .BR fstab (5), |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 400 | .BR mkfs (8), |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 401 | .BR fsck.ext2 (8) |
| 402 | or |
Theodore Ts'o | a519836 | 2005-11-12 23:41:08 -0500 | [diff] [blame] | 403 | .BR fsck.ext3 (8) |
| 404 | or |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 405 | .BR e2fsck (8), |
Theodore Ts'o | a519836 | 2005-11-12 23:41:08 -0500 | [diff] [blame] | 406 | .BR cramfsck (8), |
Theodore Ts'o | 64c90ee | 2003-12-26 13:56:14 -0500 | [diff] [blame] | 407 | .BR fsck.minix (8), |
Theodore Ts'o | a519836 | 2005-11-12 23:41:08 -0500 | [diff] [blame] | 408 | .BR fsck.msdos (8), |
| 409 | .BR fsck.jfs (8), |
| 410 | .BR fsck.nfs (8), |
| 411 | .BR fsck.vfat (8), |
Theodore Ts'o | 64c90ee | 2003-12-26 13:56:14 -0500 | [diff] [blame] | 412 | .BR fsck.xfs (8), |
Theodore Ts'o | a519836 | 2005-11-12 23:41:08 -0500 | [diff] [blame] | 413 | .BR fsck.xiafs (8), |
Theodore Ts'o | 64c90ee | 2003-12-26 13:56:14 -0500 | [diff] [blame] | 414 | .BR reiserfsck (8). |