The system takes care that only a restricted class of innocuous inconsistencies can happen unless hardware or software failures intervene. These are limited to the following:
Link counts in inodes too large
Missing blocks in the free list
Blocks in the free list also in files
Counts in the super-block wrong
These are the only inconsistencies that fsck with the -p option will correct; if it encounters other inconsistencies, it exits with an abnormal return status and an automatic reboot will then fail. For each corrected inconsistency one or more lines will be printed identifying the file system on which the correction will take place, and the nature of the correction. After successfully correcting a file system, fsck will print the number of files on that file system, the number of used and free blocks, and the percentage of fragmentation.
If sent a QUIT signal, fsck will finish the file system checks, then exit with an abnormal return status that causes the automatic reboot to fail. This is useful when you wish to finish the file system checks, but do not want the machine to come up multiuser.
Without the -p option, fsck audits and interactively repairs inconsistent conditions for file systems. If the file system is inconsistent the operator is prompted for concurrence before each correction is attempted. It should be noted that some of the corrective actions which are not correctable under the -p option will result in some loss of data. The amount and severity of data lost may be determined from the diagnostic output. The default action for each consistency correction is to wait for the operator to respond yes or no. If the operator does not have write permission on the file system fsck will default to a -n action.
Fsck has more consistency checks than its predecessors check, dcheck, fcheck, and icheck combined.
The following flags are interpreted by fsck.
If no filesystems are given to fsck then a default list of file systems is read from the file /etc/fstab.
Inconsistencies checked are as follows:
Orphaned files and directories (allocated but unreferenced) are, with the operator's concurrence, reconnected by placing them in the lost+found directory. The name assigned is the inode number. If the lost+found directory does not exist, it is created. If there is insufficient space its size is increased.
Checking the raw device is almost always faster.
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97