1 .\" $NetBSD: fsck.8,v 1.38 2011/04/28 12:16:10 wiz Exp $
3 .\" Copyright (c) 1996 Christos Zoulas. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 .Nd file system consistency check and interactive repair
34 .Op Fl l Ar maxparallel
35 .Op Fl T Ar fstype:fsoptions
37 .Op Fl x Ar mountpoint
38 .Op special | node ...
42 command invokes file system-specific programs to check
43 the special devices listed in the
45 file or in the command line for consistency.
47 It is normally used in the script
49 during automatic reboot.
50 If no file systems are specified, and
58 to determine which file systems to check, in what order.
59 Only partitions in fstab that are mounted ``rw,'' ``rq'' or ``ro''
60 and that have non-zero pass number are checked.
61 File systems with pass number 1 (normally just the root file system)
62 are checked one at a time.
63 When pass 1 completes, all remaining file systems are checked,
64 running one process per disk drive.
65 By default, file systems which are already mounted read-write are not checked.
66 The disk drive containing each file system is inferred from the longest prefix
67 of the device name that ends in a digit; the remaining characters are assumed
68 to be the partition designator.
70 The options are as follows:
71 .Bl -tag -width indent
74 Just print the commands without executing them.
76 Force checking of file systems, even when they are marked clean (for file
77 systems that support this), or when they are mounted read-write.
78 .It Fl l Ar maxparallel
79 Limit the number of parallel checks to the number specified in
80 the following argument.
81 By default, the limit is the number of disks, running one process per disk.
82 If a smaller limit is given, the disks are checked round-robin,
83 one file system at a time.
87 to assume no as the answer to all operator questions, except "CONTINUE?".
89 Display a progress meter for each file system check.
90 This option also disables parallel checking.
91 Note that progress meters are not supported by all file system types.
96 will check all file systems listed in
98 according to their pass number, and will make minor repairs without
101 Quiet mode, do not output any messages for clean filesystems.
102 .It Fl T Ar fstype:fsoptions
103 List of comma separated file system specific options for the specified
104 file system type, in the same format as
109 only for the comma separated list of file system types.
110 If the list starts with
114 for the file system types that are not specified in the list.
116 Print the commands before executing them.
117 .It Fl x Ar mountpoint
118 Exclude the filesystem which has a
129 as the answer to all operator questions.
132 .Bl -tag -width /etc/fstab -compact
141 Any major problems will cause
143 to exit with the following non-zero
145 codes, so as to alert any invoking program or script that human
146 intervention is required.
151 Unresolved errors while checking the filesystem.
154 on the filesystem(s) is required.
156 The root filesystem was changed in the process of checking, and updating the
157 mount was unsuccessful.
158 A reboot (without sync) is required.
160 The filesystem check has failed, and a subsequent check is required
161 that will require human intervention.
164 exited because of the result of a signal (usually