fsck_vxfs(ADM)


fsck_vxfs - check and repair a VERITAS File System

Synopsis

fsck [-F vxfs] [generic_options] [-yY] [-nN] [-P] [ -o full,nolog ] special . . .

Description

The fsck utility checks vxfs file systems for consistency. Since vxfs records pending file system updates in an intent log, fsck typically runs an intent log replay rather than a full structural file system check on a vxfs file system.

Options

generic_options
Supported by the generic fsck command (see fsck(ADM)).

-F vxfs
Specify the vxfs file system type. If -F vxfs is not specified heuristics similiar to those used by fstyp(ADM) are used to determine the file system type.
This command executes faster if it is not required to autodetect file system types. If possible, specify -F vxfs

-y
Assume a yes response to all questions asked by fsck. Additionally, if the file system requires a full file system check after the log replay, or if the nolog suboption causes the log replay to be skipped and the file system is not clean, then a full file system check is performed.

-Y
A synonym for -y.

-n
Assume a no response to all questions asked by fsck; do not open the file system for writing. Log replay is not performed. A full file system check is performed.

-N
A synonym for -n.

-P
Cause fsck to produce messages that identify the device being checked.

NOTE: With VxFS, -P is used by fsck by default. With other file system types, it is optional.

-o
Specify vxfs file system specific options. These options can be a combination of the following in a comma-separated list:

full
Perform a full file system check. Since the vxfs file system maintains an intent log, a complete check is generally not required. The default is to perform an intent log replay only. If the file system detects damage or the log replay operation detects damage, an indication that a complete check is required is placed in the super- block, and a full check is performed.

nolog
Do not perform log replay. This option may be used if the log area was physically damaged.

When a full check is performed, the following inconsistencies are checked:

-
Blocks claimed by more than one inode or the free list.

-
Blocks claimed by an inode outside the range of the file system.

-
Incorrect link counts.

-
Size checks:

Incorrect number of blocks.

Directory entry format.

-
Bad inode format.

-
Blocks not accounted for anywhere.

-
Directory checks:

File pointing to unallocated inode.

Inode number out of range.

Linkage to parent directory.

Hash chain linkage.

Free space count.

-
Super-block checks:

Checksum mismatch.

More blocks for inodes than there are in the file system.

-
Structural Files:

(VxFS Version 2 layout and beyond)

Fileset headers.

Object Location Table (OLT).

Inode list files.

Inode allocation summary files.

Attribute files (including Access Control Lists).

Attribute link counts.

-
Bad free block list format.

-
Total free block and/or free inode count incorrect.

Orphaned files and directories (allocated but unreferenced) are, with the user's concurrence, reconnected by placing them in the lost+found directory. The name assigned is the inode number. The only restriction is that the directory lost+found must already exist in the root of the file system being checked.

Output

Structural errors discovered during a full check are displayed on standard output. Responses required during a full check are read from standard input.

The following return codes are used for the -m (generic) option for all devices other than the one used by the root file system:

0
The file system is unmounted and clean.

32
The file system is unmounted and needs checking.

33
The file system is mounted.

34
The stat of the device failed.

Other
The state could not be determined because of an error.

The following return codes are used for the -m (generic) option for the device used by the root file system:

0
The root file system is mounted read-only and is clean, or the root file system is mounted read/write and therefore doesn't need checking.

32
The root file system is mounted read-only and needs checking.

34
The stat of the device failed.

Other
The state could not be determined because of an error.

Normally, fsck will print the following messages:

log replay in progress
replay complete - marking super-block as CLEAN

If the file system is already clean, fsck will print the following message instead:

file system is clean - log replay is not required

If fsck prints any other messages, a full structural check is needed. If the -y option is specified, fsck will (if necessary) perform a full check after running the intent log replay. If the -y option is not used, fsck must be invoked with the -o full option to perform a full structural check.

Diagnostics

All error messages that relate to the contents of a file system produced during a log replay are displayed on standard output. All I/O failures and exit messages are displayed on standard error output.

Notices

Checking the raw device is almost always faster.

In contrast with previous releases of VxFS, a full file system check will not always perform any pending extended inode operations. Some extended operations can only be processed when the file system is mounted. A file system that has been marked clean may still contain extended operations.

If a structural flaw is detected during the intent log replay, the full fsck flag will be set on the file system, without operator interaction.

References

crash(ADM), fsck(ADM), fstyp(ADM), mkfs(ADM), ncheck(ADM), uadmin(S), fs_vxfs(F)



© 1997 The Santa Cruz Operation, Inc. All rights reserved.