Filesystem check phases (DTFS)
When you check and repair a DTFS filesystem,
fsck works non-interactively to repair inconsistencies,
reporting on its progress with these messages:
** Phase 1 - Check Super Block
** Phase 2 - Check File Structure
** Phase 3 - Check Directory Entries
** Phase 4 - Check Block Bitmap
Each phase compares components and checks that
these components agree with each other.
Phase 1-
fsck reads the map of filesystem inodes
(inode bitmap) and initializes the map of filesystem blocks
(block bitmap).
Phase 2-
fsck reads the inodes and validates them.
DTFS files are managed through a structure known as
a ``B+ tree''.
The tree consists of disk block addresses that point either to
intermediate blocks (known as ``interior nodes'') or to
the actual user data blocks (referred to as ``leaf nodes'').
This tree structure is normally balanced (the distance from top
level to leaf is the same for all paths in the tree). fsck
verifies the parent inodes and rebalances any inodes (trees) that
have become unbalanced.
Phase 3-
fsck rebuilds the directory hierarchy.
Because DTFS inodes contain the
inode number of the parent directory and the inode filename,
reconstruction is much easier and requires no lost+found directory.
If any inodes that cannot be reconnected or contain
invalid data (bad inodes) are found, the inode bitmap is updated.
The block bitmap is then updated.
Phase 4-
fsck updates information in the superblock.
For a complete list of error messages, see the
fsck(ADM)
manual page.
See also:
Next topic:
How UNIX systems maintain files and filesystems
Previous topic:
filesystem check Phase 3
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003