Annotation of cci/usr/src/man/man8/fsck.8, revision 1.1.1.1

1.1       root        1: .de us
                      2: \\$1\l'|0\(ul'
                      3: ..
                      4: .TH FSCK 8 "4 February 1983"
                      5: .UC 4
                      6: .SH NAME
                      7: fsck \- file system consistency check and interactive repair
                      8: .SH SYNOPSIS
                      9: .B /etc/fsck
                     10: .B \-p
                     11: [
                     12: filesystem ...
                     13: ]
                     14: .br
                     15: .B /etc/fsck
                     16: [
                     17: .B \-b
                     18: block#
                     19: ] [
                     20: .B \-y
                     21: ] [
                     22: .B \-n
                     23: ] [
                     24: filesystem 
                     25: ] ...
                     26: .SH DESCRIPTION
                     27: The first form of
                     28: .I fsck
                     29: preens a standard set of filesystems or the specified file systems.
                     30: It is normally used in the script
                     31: .B /etc/rc
                     32: during automatic reboot.
                     33: In this case
                     34: .I fsck
                     35: reads the table
                     36: .B /etc/fstab
                     37: to determine which file systems to check.
                     38: It uses the information there to inspect groups of disks in parallel taking
                     39: maximum advantage of i/o overlap to check the file systems
                     40: as quickly as possible.
                     41: Normally, the root file system will be checked on pass 1, other
                     42: ``root'' (``a'' partition) file systems on pass 2, other
                     43: small file systems on separate passes (e.g. the ``d'' file systems
                     44: on pass 3 and the ``e'' file systems on pass 4), and finally
                     45: the large user file systems on the last pass, e.g. pass 5.
                     46: A pass number of 0 in fstab causes a disk to not be checked; similarly
                     47: partitions which are not shown as to be mounted ``rw'' or ``ro''
                     48: are not checked.
                     49: .PP
                     50: The system takes care that only a restricted class of innocuous
                     51: inconsistencies can happen unless hardware or software failures intervene.
                     52: These are limited to the following:
                     53: .IP
                     54: Unreferenced inodes
                     55: .ns
                     56: .IP
                     57: Link counts in inodes too large
                     58: .ns
                     59: .IP
                     60: Missing blocks in the free list
                     61: .ns
                     62: .IP
                     63: Blocks in the free list also in files
                     64: .ns
                     65: .IP
                     66: Counts in the super-block wrong
                     67: .PP
                     68: These are the only inconsistencies which
                     69: .I fsck
                     70: with the
                     71: .B \-p
                     72: option will correct; if it encounters other inconsistencies, it exits
                     73: with an abnormal return status and an automatic reboot will then fail.
                     74: For each corrected inconsistency one or more lines will be printed
                     75: identifying the file system on which the correction will take place,
                     76: and the nature of the correction.  After successfully correcting a file
                     77: system,
                     78: .I fsck
                     79: will print the number of files on that file system and the number of
                     80: used and free blocks.
                     81: .PP
                     82: Without the
                     83: .B \-p
                     84: option,
                     85: .I fsck
                     86: audits and interactively repairs inconsistent conditions for file systems. 
                     87: If the file system is inconsistent the operator is prompted for concurrence
                     88: before each correction is attempted.
                     89: It should be noted that a number of the corrective actions which are not
                     90: fixable under the
                     91: .B \-p
                     92: option will result in some loss
                     93: of data.
                     94: The amount and severity of data lost may be determined from the diagnostic
                     95: output.
                     96: The default action for each consistency correction
                     97: is to wait for the operator to respond \fByes\fP or \fBno\fP.
                     98: If the operator does not have write permission 
                     99: .I fsck
                    100: will default to a 
                    101: .BR "\-n " action.
                    102: .PP
                    103: .I Fsck
                    104: has more consistency checks than
                    105: its predecessors
                    106: .IR "check, dcheck, fcheck, " "and" " icheck"
                    107: combined.
                    108: .PP
                    109: The following flags are interpreted by
                    110: .I fsck.
                    111: .TP 6
                    112: .B \-b
                    113: Use the block specified immediately after the flag as
                    114: the super block for the file system.  Block 16 is always
                    115: an alternate super block.
                    116: .TP 6
                    117: .B  \-y
                    118: Assume a yes response to all questions asked by 
                    119: .I fsck;
                    120: this should be used with great caution as this is a free license
                    121: to continue after essentially unlimited trouble has been encountered.
                    122: .TP 6
                    123: .B  \-n
                    124: Assume a no response to all questions asked by 
                    125: .I fsck;
                    126: do not open the file system for writing.
                    127: .PP
                    128: If no filesystems are given to 
                    129: .I fsck
                    130: then a default list of file systems is read from
                    131: the file
                    132: .BR /etc/fstab .
                    133: .PP
                    134: .ne 10
                    135: Inconsistencies checked are as follows:
                    136: .TP 6
                    137: 1.
                    138: Blocks claimed by more than one inode or the free list.
                    139: .br
                    140: .br
                    141: .ns
                    142: .TP 6
                    143: 2.
                    144: Blocks claimed by an inode or the free list outside the range of the file system.
                    145: .br
                    146: .br
                    147: .ns
                    148: .TP 6
                    149: 3.
                    150: Incorrect link counts.
                    151: .br
                    152: .br
                    153: .ns
                    154: .TP 6
                    155: 4.
                    156: Size checks:
                    157: .br
                    158: .ns
                    159: .IP "" 12
                    160: Directory size not of proper format.
                    161: .br
                    162: .br
                    163: .ns
                    164: .TP 6
                    165: 5.
                    166: Bad inode format.
                    167: .br
                    168: .br
                    169: .ns
                    170: .TP 6
                    171: 6.
                    172: Blocks not accounted for anywhere.
                    173: .br
                    174: .br
                    175: .ns
                    176: .TP 6
                    177: 7.
                    178: Directory checks:
                    179: .br
                    180: .br
                    181: .ns
                    182: .IP "" 12
                    183: File pointing to unallocated inode.
                    184: .br
                    185: Inode number out of range.
                    186: .br
                    187: .br
                    188: .ns
                    189: .TP 6
                    190: 8.
                    191: Super Block checks:
                    192: .br
                    193: .br
                    194: .ns
                    195: .IP "" 12
                    196: .br
                    197: More blocks for inodes than there are in the file system.
                    198: .br
                    199: .br
                    200: .ns
                    201: .TP 6
                    202: 9.
                    203: Bad free block list format.
                    204: .br
                    205: .br
                    206: .ns
                    207: .TP 6
                    208: 10.
                    209: Total free block and/or free inode count incorrect.
                    210: .PP
                    211: Orphaned files and directories (allocated but unreferenced) are,
                    212: with the operator's concurrence, reconnected by
                    213: placing them in the 
                    214: .B lost+found
                    215: directory.
                    216: The name assigned is the inode number. The only restriction
                    217: is that the directory 
                    218: .B lost+found
                    219: must preexist
                    220: in the root of the filesystem being checked and
                    221: must have empty slots in which entries can be made.
                    222: This is accomplished by making 
                    223: .BR lost+found ,
                    224: copying a number of files to the directory, and then removing them
                    225: (before
                    226: .I
                    227: fsck
                    228: is executed).
                    229: .PP
                    230: Checking the raw device is almost always faster.
                    231: .SH FILES
                    232: .br
                    233: .ns
                    234: .TP 21
                    235: /etc/fstab
                    236: contains default list of file systems to check.
                    237: .SH DIAGNOSTICS
                    238: The diagnostics produced by 
                    239: .I fsck
                    240: are intended to be self-explanatory.
                    241: .SH "SEE ALSO"
                    242: fstab(5),
                    243: fs(5),
                    244: newfs(8),
                    245: mkfs(8),
                    246: reboot(8)
                    247: .SH BUGS
                    248: Inode numbers for
                    249: .BR . ""
                    250: and
                    251: .BR .. ""
                    252: in each directory should be checked for validity.
                    253: .PP
                    254: There should be some way to start a \fBfsck \-p\fR at pass \fIn\fR.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.