Full vxfs fsck
A full filesystem check is generally not necessary unless
there has been some sort of disk hardware failure.
When a full filesystem check is required, the following command
line is commonly used:
fsck -F vxfs -o full -y special
Four passes through the filesystem are performed
as part of full filesystem check:
Check inode sanity
``Full filesystem check: pass 1'').
This checks for bad or duplicate extent references.
For Version 2 and Version 4 layout filesystems,
additional checking is performed
for inodes that contain structural data for the filesystem.
Check directory entries.
``Full filesystem check: pass 2'').
This checks and verifies directory entries.
Check link counts of files
``Full filesystem check: pass 3'').
This checks that no files in the filesystem
Check free inode maps, free extent maps, and superblock counts
``Full filesystem check: pass 4'').
With the exception of the preliminary pass at the beginning of Pass 1,
all passes apply to Version 1, Version 2, and Version 4 layout filesystems.
Full filesystem check: pass 1
For a Version 2 or Version 4 layout filesystem,
a full filesystem check performs
a preliminary pass on file objects unique to this layout (such as
structural files in the attribute fileset).
Version 1, and Version 2, and Version 4 layout
filesystems undergo a set of standard Pass 1 functions.
The preliminary pass occurs before the standard set of Pass 1
functions for a Version 2 or Version 4 filesystem and not at
all for a Version 1 filesystem.
These passes are similar, but operate on different objects.
The Version 2 and Version 4 preliminary pass
performs the following functions:
Performs sanity checking on inodes in the
attribute fileset to ensure that
they have proper modes, link counts, matching inodes (for replicated
files), file sizes, and extent allocation information. If the file
fails any of these checks, it is considered to be bad. Bad inodes can
result in a filesystem that cannot be repaired if both copies of the
inode list are destroyed, for instance.
Checks all extents allocated to the file to ensure that blocks are valid
and that only certain file types (inode list files)
contain duplicate blocks.
Rechecks the file size information and records block allocations
for the file.
Updates the Link Count Table (LCT) entries for the inodes associated
with structural elements of the filesystem.
Pass 1 performs the following functions:
Performs basic inode sanity checks on the files
to ensure that the mode, link count, file size,
extent allocation information, and extended inode operation information
If the basic information is invalid, the file is considered
to be bad.
Checks all extents allocated to the file to ensure that all
references are to valid block numbers, and that blocks are not allocated
to multiple files.
Rechecks the basic file size information to ensure that the
file size and extents allocated to the file are in agreement.
Updates link counts for inodes.
If an inode fails sanity checking, it should be removed.
If it is essential to save an inode,
(for example, when an irreplaceable file might be lost),
select the q (quit) option,
to attempt to fix the problem,
and recheck the filesystem with
Unless you are extremely experienced in filesystem
debugging, this procedure is not recommended.
Unless fsck is being run with the -n option,
answering no to any of the questions asked by fsck
can be extremely dangerous to filesystem integrity.
Full filesystem check: pass 2
Pass 2 performs the following functions:
Checks directory entries to ensure that they
have valid inode numbers and valid file names.
If a directory has subdirectories, checks
the ``i_dotdot'' field of each
subdirectory to ensure that it acknowledges the
referencing directory as its parent.
Validates free space counts and hash chains in the directory block.
cause entire directory blocks to be considered invalid
(for example, if data in the directory is invalid or has become
Other inconsistencies are treated as minor and cause
directory blocks to be updated but retained.
If a directory or directory block is considered to be invalid and gets
cleared, any files originally referenced by the directory or
directory block will no longer be referenced.
In this situation, Pass 3
reports unreferenced files, or files with invalid link counts.
Full filesystem check: pass 3
Pass 3 performs the following functions:
If a file is not referenced, or the ``..'' path does not lead
back to the root inode, the file must be attached to the
lost+found directory, or removed.
Checks that all files are referenced
Checks that all ``dot-dot'' (..)
paths from directories lead
back to the root inode of the filesystem.
Checks that the link counts
of files are correct.
Checks the link counts on all files in the attribute fileset's
link count table.
(Version 2 layout only).
Full filesystem check: pass 4
Pass 4 performs the following functions:
Checks that the free inode maps on disk agree
with the filesystem as it was found
Checks that the free extent maps agree with extents allocated to files.
Checks that the allocation unit summaries match the counts of free
inodes and extents.
Clears the intent log to ensure the log is accessible
and in a known state.
Checks that superblock free counts agree with actual free inodes
Marks the filesystem as ready to mount so that it can be mounted.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004