Tru64 UNIX File System: Adminstration Handbook

This appendix discusses the UFS structure checker, fsck(8), operation in detail. As discussed in Chapter 5, fsck(8) performs UFS detection and correction based on the command flags and responses given by the user. Operation of fsck(8) is broken down into phases, and each phase is responsible for performing a distinct function for either detecting or correcting a file system inconsistency. The following sections are meant to update the section of the ULTRIX document (Jeltema 1990 1992) for Tru64 UNIX that describes each phase and detail about what the tool is doing. This information can be quite valuable when diagnosing fsck(8) as it works on sticky file system corruption.
During Phase 1, fsck(8) constructs several internal tables and bitmaps; an understanding of these aids in our discussion of the operation of the tool.
The fsck(8) command has two basic modes of operation: interactive and preen. In preen mode, fsck(8) corrects a limited subset of file system problems automatically. In Tru64 UNIX, this mode is used by bcheckrc(8) during the system boot to check UFSs before mounting them. The AdvFSs are ignored by fsck(8) in any mode of operation, of course.
System administrators who would like to check and correct file system problems with total control over the results should use fsck(8) in interactive mode. In this mode, the tool checks the consistency of a file system and stops when an inconsistency is detected. At this point, it...