HPlogo HP-UX Reference Volume 2 of 5 > f

fsck_vxfs(1M)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

fsck (vxfs) — check and repair a VxFS file system

SYNOPSIS

/usr/sbin/fsck [-F vxfs] [-V] [-pPmnNyY] [-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.

If special is not specified, fsck reads the table in /etc/fstab, using the first field to determine which file system to check.

Options

-F vxfs

Specify the VxFS file system type.

-V

Echo the completed command line, but performs no other action. The command line is generated by incorporating the user specified options and other information derived from /etc/fstab. This option allows the user to verify the command line.

-y|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.

-m

Check whether or not the file system is marked clean. This option does not validate the file system. If the file system is corrupt for some reason, a subsequent mount may fail and a full fsck may be required to clean it. fsck -n may be used to test for file system corruption.

-n|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.

-p

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

-P

With VxFS, -P is used by fsck by default; it does not provide any functionality. With other file system types, -P may be used for optional functionality.

-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. The default is to perform an intent log replay only. Since the VxFS file system maintains an intent log, a complete check is generally not required. 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:

    -

    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.

ERROR/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.

NOTES

Checking the raw device is almost always faster.

A full file-system check will always perform any pending extended-inode operations, generating various messages, without operator interaction. If a structural flaw is detected, the VX_FULLFSCK flag will be set on the file system, without operator interaction. If fsck was not invoked with the -y option, it must be reinvoked with the -y or -o full option to perform a full fsck.

If the -o full flag is used on a clean file system, fsck will perform a log replay first, and since the VX_FULLFSCK flag is set, it will not update the inode and extent maps before performing the full fsck, so it will report inconsistencies. Use the -n option to verify file-system inconsistency.

FILES

/etc/fstab

Default list of file systems to check.

© Hewlett-Packard Development Company, L.P.