fsck_ffs.8 (75545) | fsck_ffs.8 (75927) |
---|---|
1.\" 2.\" Copyright (c) 1980, 1989, 1991, 1993 3.\" The Regents of the University of California. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 | 1.\" 2.\" Copyright (c) 1980, 1989, 1991, 1993 3.\" The Regents of the University of California. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 |
34.\" $FreeBSD: head/sbin/fsck_ffs/fsck_ffs.8 75545 2001-04-16 15:12:58Z ru $ | 34.\" $FreeBSD: head/sbin/fsck_ffs/fsck_ffs.8 75927 2001-04-24 22:38:08Z mckusick $ |
35.\" 36.Dd November 15, 1996 37.Dt FSCK_FFS 8 38.Os BSD 4 39.Sh NAME 40.Nm fsck_ffs , 41.Nm fsck_ufs 42.Nd filesystem consistency check and interactive repair 43.Sh SYNOPSIS 44.Nm | 35.\" 36.Dd November 15, 1996 37.Dt FSCK_FFS 8 38.Os BSD 4 39.Sh NAME 40.Nm fsck_ffs , 41.Nm fsck_ufs 42.Nd filesystem consistency check and interactive repair 43.Sh SYNOPSIS 44.Nm |
45.Fl p 46.Op Fl f 47.Op Fl m Ar mode 48.Op Ar filesystem 49.Ar ... 50.Nm 51.Op Fl ny | 45.Op Fl BFpfny |
52.Op Fl b Ar block# 53.Op Fl c Ar level | 46.Op Fl b Ar block# 47.Op Fl c Ar level |
54.Op Fl l Ar maxparallel | |
55.Op Fl m Ar mode | 48.Op Fl m Ar mode |
56.Op Ar filesystem | 49.Ar filesystem |
57.Ar ... 58.Sh DESCRIPTION | 50.Ar ... 51.Sh DESCRIPTION |
59The first form of 60.Nm 61preens a standard set of filesystems or the specified filesystems. 62It is normally used in the script 63.Pa /etc/rc 64during automatic reboot. 65Here 66.Nm 67reads the table 68.Pa /etc/fstab 69to determine which filesystems to check. 70Only partitions in fstab that are mounted ``rw,'' ``rq'' or ``ro'' 71and that have non-zero pass number are checked. 72Filesystems with pass number 1 (normally just the root filesystem) 73are checked one at a time. 74When pass 1 completes, all remaining filesystems are checked, 75running one process per disk drive. 76The disk drive containing each filesystem is inferred from the longest prefix 77of the device name that ends in a digit; the remaining characters are assumed 78to be the partition designator. 79.Pp | 52The specified disk partitions and/or filesystems are checked. |
80In "preen" mode the clean flag of each filesystem's superblock is examined 81and only those filesystems that 82are not marked clean are checked. 83Filesystems are marked clean when they are unmounted, 84when they have been mounted read-only, or when 85.Nm 86runs on them successfully. 87If the --- 73 unchanged lines hidden (view full) --- 161or 162.Li no . 163If the operator does not have write permission on the filesystem 164.Nm 165will default to a 166.Fl n 167action. 168.Pp | 53In "preen" mode the clean flag of each filesystem's superblock is examined 54and only those filesystems that 55are not marked clean are checked. 56Filesystems are marked clean when they are unmounted, 57when they have been mounted read-only, or when 58.Nm 59runs on them successfully. 60If the --- 73 unchanged lines hidden (view full) --- 134or 135.Li no . 136If the operator does not have write permission on the filesystem 137.Nm 138will default to a 139.Fl n 140action. 141.Pp |
169.Nm Fsck 170has more consistency checks than 171its predecessors 172.Em check , dcheck , fcheck , 173and 174.Em icheck 175combined. 176.Pp | |
177The following flags are interpreted by | 142The following flags are interpreted by |
178.Nm . | 143.Nm |
179.Bl -tag -width indent | 144.Bl -tag -width indent |
145.It Fl F 146Determine whether the filesystem needs to be cleaned immediately 147in foreground, or if its cleaning can be deferred to background. 148To be eligible for background cleaning it must have been running 149with soft updates, not have been marked as needing a foreground check, 150and be mounted and writable when the background check is to be done. 151If these conditions are met, then 152.Nm 153exits with a zero exit status. 154Otherwise it exits with a non-zero exit status. 155If the filesystem is clean, 156it will exit with a non-zero exit status so that the clean status 157of the filesystem can be verified and reported during the foreground 158checks. 159Note that when invoked with the 160.Fl F 161flag, no cleanups are done. 162The only thing that 163.Nm 164does is to determine whether a foreground or background 165check is needed and exit with an appropriate status code. 166.It Fl B 167A check is done on the specified and possibly active filesystem. 168The set of corrections that can be done is limited to those done 169when running in preen mode (see the 170.Fl p 171flag). 172If unexpected errors are found, 173the filesystem is marked as needing a foreground check and 174.Nm 175exits without attempting any further cleaning. |
|
180.It Fl b 181Use the block specified immediately after the flag as 182the super block for the filesystem. Block 32 is usually 183an alternate super block. 184.It Fl c 185Convert the filesystem to the specified level. 186Note that the level of a filesystem can only be raised. 187There are currently four levels defined: --- 27 unchanged lines hidden (view full) --- 215first line of output from 216.Xr dumpfs 8 . 217.It Fl f 218Force 219.Nm 220to check 221.Sq clean 222filesystems when preening. | 176.It Fl b 177Use the block specified immediately after the flag as 178the super block for the filesystem. Block 32 is usually 179an alternate super block. 180.It Fl c 181Convert the filesystem to the specified level. 182Note that the level of a filesystem can only be raised. 183There are currently four levels defined: --- 27 unchanged lines hidden (view full) --- 211first line of output from 212.Xr dumpfs 8 . 213.It Fl f 214Force 215.Nm 216to check 217.Sq clean 218filesystems when preening. |
223.It Fl l 224Limit the number of parallel checks to the number specified in the following 225argument. 226By default, the limit is the number of disks, running one process per disk. 227If a smaller limit is given, the disks are checked round-robin, one filesystem 228at a time. | |
229.It Fl m 230Use the mode specified in octal immediately after the flag as the 231permission bits to use when creating the 232.Pa lost+found 233directory rather than the default 1777. 234In particular, systems that do not wish to have lost files accessible 235by all users on the system should use a more restrictive 236set of permissions such as 700. --- 8 unchanged lines hidden (view full) --- 245Preen filesystems (see above). 246.It Fl y 247Assume a yes response to all questions asked by 248.Nm ; 249this should be used with great caution as this is a free license 250to continue after essentially unlimited trouble has been encountered. 251.El 252.Pp | 219.It Fl m 220Use the mode specified in octal immediately after the flag as the 221permission bits to use when creating the 222.Pa lost+found 223directory rather than the default 1777. 224In particular, systems that do not wish to have lost files accessible 225by all users on the system should use a more restrictive 226set of permissions such as 700. --- 8 unchanged lines hidden (view full) --- 235Preen filesystems (see above). 236.It Fl y 237Assume a yes response to all questions asked by 238.Nm ; 239this should be used with great caution as this is a free license 240to continue after essentially unlimited trouble has been encountered. 241.El 242.Pp |
253If no filesystems are given to 254.Nm 255then a default list of filesystems is read from 256the file 257.Pa /etc/fstab . 258.Pp | |
259Inconsistencies checked are as follows: 260.Pp 261.Bl -enum -compact 262.It 263Blocks claimed by more than one inode or the free map. 264.It 265Blocks claimed by an inode outside the range of the filesystem. 266.It --- 40 unchanged lines hidden (view full) --- 307placing them in the 308.Pa lost+found 309directory. 310The name assigned is the inode number. 311If the 312.Pa lost+found 313directory does not exist, it is created. 314If there is insufficient space its size is increased. | 243Inconsistencies checked are as follows: 244.Pp 245.Bl -enum -compact 246.It 247Blocks claimed by more than one inode or the free map. 248.It 249Blocks claimed by an inode outside the range of the filesystem. 250.It --- 40 unchanged lines hidden (view full) --- 291placing them in the 292.Pa lost+found 293directory. 294The name assigned is the inode number. 295If the 296.Pa lost+found 297directory does not exist, it is created. 298If there is insufficient space its size is increased. |
315.Pp 316Because of inconsistencies between the block device and the buffer cache, 317the raw device should always be used. | |
318.Sh FILES 319.Bl -tag -width /etc/fstab -compact 320.It Pa /etc/fstab 321contains default list of filesystems to check. 322.El 323.Sh DIAGNOSTICS 324The diagnostics produced by 325.Nm 326are fully enumerated and explained in Appendix A of 327.Rs 328.%T "Fsck \- The UNIX File System Check Program" 329.Re 330.Sh SEE ALSO 331.Xr fs 5 , 332.Xr fstab 5 , 333.Xr fsck 8 , 334.Xr fsdb 8 , 335.Xr newfs 8 , 336.Xr reboot 8 | 299.Sh FILES 300.Bl -tag -width /etc/fstab -compact 301.It Pa /etc/fstab 302contains default list of filesystems to check. 303.El 304.Sh DIAGNOSTICS 305The diagnostics produced by 306.Nm 307are fully enumerated and explained in Appendix A of 308.Rs 309.%T "Fsck \- The UNIX File System Check Program" 310.Re 311.Sh SEE ALSO 312.Xr fs 5 , 313.Xr fstab 5 , 314.Xr fsck 8 , 315.Xr fsdb 8 , 316.Xr newfs 8 , 317.Xr reboot 8 |