fsck_vxfs(1M) fsck_vxfs(1M)
NAME [Toc] [Back]
fsck_vxfs: fsck - check and repair a VxFS file system
SYNOPSIS [Toc] [Back]
fsck [-F vxfs] [-V] [-mnNpPsyY] [-pP] [-o p] [special ... ]
fsck [-F vxfs] [-V] [-mnNpPsyY] [-o full,mounted,nolog] [special ... ]
DESCRIPTION [Toc] [Back]
fsck checks VxFS file systems for consistency. Because VxFS records
pending file system updates in an intent log, fsck typically replays
the intent log instead of doing a full structural file system check.
You can use options (-o full or -y) to force a full structural file
system check.
special specifies one or more special character devices, for example,
/dev/rdsk/c1t0d0.
If multiple devices are specified, each device is checked in turn
unless the -P option or the -o p suboption is also specified, in which
case the devices are checked in parallel. If special is not
specified, fsck prompts you with each file system listed in /etc/fstab
to determine which file system to check, unless you specify -y or -Y,
to automatically answer yes to the prompts.
Options [Toc] [Back]
fsck recognizes the following options:
-F vxfs Specify the VxFS file system type.
-m Check whether or not the file system is marked clean.
This option does not validate the file system. The
file system could have been corrupted since it was
marked clean (for example, by a system crash), and if
so, a mount could fail. In that case, a full fsck
would be required to clean it. Use fsck -n to test for
file system corruption.
-n|-N Assume a "no" response to all prompts by fsck; do not
open the file system for writing, do not replay the
intent log. A full file system check is performed.
-o specific_options
Specify VxFS file system specific options. See the
subsection The -o Specific Options below.
-p Produce messages that identify the device being
checked.
-P With VxFS, -P is used by fsck by default; it does not
provide any functionality.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: Sep 2004
fsck_vxfs(1M) fsck_vxfs(1M)
-s Safe performance mode. To improve performance, a
system wide sync() will not be issued (see sync(2)).
-V Echo the completed command line, but do not execute the
command. 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 prompts 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.
Because VxFS maintains an intent log, a complete check is generally
not required; the default is to replay the intent log only. If
fsck_vxfs detects file system damage or the log replay operation
detects damage, an indication that a complete check is required is
placed in the super-block. In this case, if the -y option was
specified, the full check will be run after the log replay. If the -y
option was not used, fsck must be run again, with the -o full option
to perform the full structural check.
Operands [Toc] [Back]
fsck recognizes the following operand:
special Name of one or more special character devices which
contain VxFS file systems.
The -o Specific Options [Toc] [Back]
The -o option specifies 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.
mounted Allows a full check of a mounted file system. -o
mounted is only used internally as part of the primary
cluster node recovery process after the primary fails.
Never enter this option from the command line as it can
destroy a file system if not used correctly.
nolog Do not perform log replay. This option may be used if
the log area was physically damaged.
Note: Use the -n option to verify whether there are
file system inconsistencies. Use fsck -o full,nolog to
fix a corrupted file system and avoid a log replay. If
you run fsck -o full without nolog on a clean file
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: Sep 2004
fsck_vxfs(1M) fsck_vxfs(1M)
system, it replays the intent log and performs a full
file system check.
p Allows parallel log replay for several VxFS file
systems. Each message from fsck is prefixed with the
device name to identify the device. This suboption
does not perform a full file system check in parallel;
that is still done sequentially on each device, even
when multiple devices are specified. This option is
compatible only with the -y|-Y option (that is, noninteractive
full file system check), in which case a
log replay is done in parallel on all specified
devices. A sequential full file system check is
performed on devices where needed. The number of
devices that can be checked in parallel is determined
by the amount of physical memory in the system. One
instance of fsck on a single device can consume up to a
maximum of 32 megabytes of memory.
Check a File System [Toc] [Back]
A full check looks for the following inconsistencies:
+ 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.
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: Sep 2004
fsck_vxfs(1M) fsck_vxfs(1M)
Lost and Found Directory [Toc] [Back]
Orphaned files and directories (allocated but unreferenced) are, with
the user's agreement, 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
file system's root directory.
Notes [Toc] [Back]
Checking the raw device is almost always faster.
Unlike 2.x and earlier releases of VxFS, a full file system check does
not always perform 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 can still contain extended
operations.
If a structural flaw is detected during the intent log replay, the
full fsck flag is set on the file system without operator interaction.
If fsck encounters a large file on an older OS version, the command
stops without completing the file system check.
RETURN VALUES [Toc] [Back]
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 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 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 is
clean.
32 The root file system is mounted read-only and needs
checking.
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: Sep 2004
fsck_vxfs(1M) fsck_vxfs(1M)
34 The stat of the device failed.
Other
The state could not be determined because of an error.
In most cases, fsck prints the following messages:
log replay in progress
replay complete - marking super-block as CLEAN
If the file system is already clean, fsck prints 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 performs (if necessary) 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.
If -o p or -P is specified, fsck prints the following messages for a
device, for example /dev/rdsk/c0t0d0:
/dev/rdsk/c0t0d0:log replay in progress
/dev/rdsk/c0t0d0:replay complete - marking super-block as CLEAN
DIAGNOSTICS [Toc] [Back]
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.
WARNINGS [Toc] [Back]
-o mounted allows a full check of a mounted file system. -o mounted
is only used internally as part of the primary cluster node recovery
process after the primary fails. Never enter this option from the
command line as it can destroy a file system if not used correctly.
The -s (safe performance mode) option will be obsoleted in future
releases.
SEE ALSO [Toc] [Back]
fsck(1M), fsck_hfs(1M), mkfs(1M), mkfs_vxfs(1M), ncheck_vxfs(1M),
sync(2), fs_vxfs(4).
Hewlett-Packard Company - 5 - HP-UX 11i Version 2: Sep 2004 [ Back ] |