Fsck \- The UNIX\(dg File System Check Program
Computer Systems Research Group
Computer Science Division
Department of Electrical Engineering and Computer Science
University of California, Berkeley
Murray Hill, New Jersey 07974
\(dgUNIX is a trademark of Bell Laboratories.
This work was done under grants from
the National Science Foundation under grant MCS80-05144,
and the Defense Advance Research Projects Agency (DoD) under
Arpa Order No. 4031 monitored by Naval Electronic System Command under
Contract No. N00039-82-C-0235.
This document reflects the use of
with the 4.2BSD file system organization. This
original paper written by
File System Check Program (\fIfsck\fR)
is an interactive file system check and repair program.
uses the redundant structural information in the
UNIX file system to perform several consistency checks.
If an inconsistency is detected, it is reported
to the operator, who may elect to fix or ignore
These inconsistencies result from the permanent interruption
of the file system updates, which are performed every
Unless there has been a hardware failure,
is able to repair corrupted file systems
using procedures based upon the order in which UNIX honors
these file system update requests.
The purpose of this document is to describe the normal updating
to discuss the possible causes of file system corruption,
and to present the corrective actions implemented
Both the program and the interaction between the
program and the operator are described.
.tl '\\*(LH'\\*(CH'\\*(RH'
.if t .ds CF July 28, 1983
.if t .ds RF McKusick, et. al.
.B "2. Overview of the file system
\0.2. Summary Information
\0.5. Updates to the file system
.B "3. Fixing corrupted file systems
\0.1. Detecting and correcting corruption
\0.2. Super block checking
\0.3. Free block checking
\0.4. Checking the inode state
\0.7. Checking the data associated with an inode
\0.8. File system connectivity
\0.3. Phase 1 - Check Blocks and Sizes
\0.4. Phase 1b - Rescan for more Dups
\0.5. Phase 2 - Check Pathnames
\0.6. Phase 3 - Check Connectivity
\0.7. Phase 4 - Check Reference Counts
\0.8. Phase 5 - Check Cyl groups
\0.9. Phase 6 - Salvage Cylinder Groups
.\" 2.94 went to 2.6, 3.64 to 3.30
.if n .ta .84i 2.6i 3.30i