fsck(1M-ufs) fsck(1M-ufs)
NAME
fsck (ufs) - file system consistency check and interactive repair
SYNOPSIS
fsck [-F ufs] [genericoptions] [special ...]
fsck [-F ufs] [genericoptions] [-o b=#,w,r] [special ...]
DESCRIPTION
fsck audits and interactively repairs inconsistent conditions on file
systems. In this case, it asks for confirmation before attempting any
corrections. Inconsistencies other than those mentioned below can
often result in some loss of data. The amount and severity of data
lost can be determined from the diagnostic output.
fsck corrects innocuous inconsistencies such as: unreferenced inodes,
too-large link counts in inodes, missing blocks in the free list,
blocks appearing in the free list and also in files, or incorrect
counts in the super block, automatically. It displays a message for
each inconsistency corrected that identifies the nature of, and file
system on which, the correction is to take place. After successfully
correcting a file system, fsck prints the number of files on that file
system, the number of used and free blocks, and the percentage of
fragmentation.
The default action for each correction is to wait for the operator to
respond either yes or no. If the operator does not have write permis-
sion on the file system, fsck will default to a -n (no corrections)
action.
Inconsistencies checked are as follows:
- Blocks claimed by more than one inode or the free list.
- Blocks claimed by an inode or the free list outside the range of
the file system.
- Incorrect link counts.
- Incorrect directory sizes.
- Bad inode format.
- Blocks not accounted for anywhere.
- Directory checks, file pointing to unallocated inode, inode number
out of range, absence of "." and ".." as the first two entries in
each directory.
- Super Block checks: more blocks for inodes than there are in the
file system.
Page 1 Reliant UNIX 5.44 Printed 11/98
fsck(1M-ufs) fsck(1M-ufs)
- Bad free block list format.
- Total free block and/or free inode count incorrect.
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 prepended
with the following characters "i-". If the lost+found directory does
not exist, it is created. If there is insufficient space its size is
increased.
A file system may be specified by giving the name of the block or
character special device on which it resides, or by giving the name of
its mount point.
OPTIONS
-F ufs Specifies the ufs-FSType.
genericoptions Options supported by the generic fsck command.
-o Specifies the ufs file system specific suboptions.
If invalid options are specified, a warning mes-
sage is printed and the invalid options are
ignored. The following options are available:
b=# Use the block specified as the super block
for the file system. Block 32 is always an
alternate super block.
r Read-only check of the file system. fsck does
not attempt to fix and inconsistencies.
w Only checks those file systems that are
designated as read-write in /etc/vfstab.
SEE ALSO
crash(1M), generic fsck(1M), mkfs(1M), vfstab(4), fs(4-ufs).
Page 2 Reliant UNIX 5.44 Printed 11/98