fsck audits and interactively repairs inconsistent conditions on file systems. A file system to be checked can be specified by giving the name of the block or character special device or by giving the name of its mount point if a matching entry exists in /etc/vfstab.
special represents the character special device, for example, /dev/rdsk/c0t2d0s0, on which the file system resides. The character special device, not the block special device should be used. fsck does not work on a mounted block
If no special device is specified, all udfs file systems specified in the vfstab file with a fsckdev entry are checked. If the -p (preen) option is specified, udfs file systems with an fsckpass number greater than 1 are checked in parallel. See fsck(1M).
In the case of correcting serious inconsistencies, by default, fsck asks for confirmation before making a repair and waits for the operator to respond with either yes or no. If the operator does not have write permission on the file system, fsck defaults to the -n (no corrections) option. See fsck(1m).
Repairing some file system inconsistencies can result in loss of data. The amount and severity of data loss can be determined from the diagnostic output.
fsck automatically corrects innocuous inconsistencies. It displays a message for each corrected inconsistency that identifies the nature of the correction which took place on the file system. After successfully correcting a file system, fsck prints the number
of files on that file system and the number of used and free blocks.
Inconsistencies checked are as follows:
- Blocks claimed by more than one file or the free list
- Blocks claimed by a file or the free list outside the range of the file system
- Incorrect link counts in file entries
- Incorrect directory sizes
- Bad file entry format
- Blocks not accounted for anywhere
- Directory checks, file pointing to unallocated file entry and absence of a parent directory entry
- Descriptor checks, more blocks for files than there are in the file system
- Bad free block list format
- Total free block count incorrect