HP-UX Reference (11i v1 00/12) - 1M System Administration Commands A-M (vol 3)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1m/!!!intro.1m
________________________________________________________________
___ ___
f
fsck_hfs(1M) fsck_hfs(1M)
NAME
fsck - HFS file system consistency check and interactive repair
SYNOPSIS
/usr/sbin/fsck [-F hfs][-m][-V][-b blocknum][special ...]
/usr/sbin/fsck [-F hfs][-c size][-f][-p-P][-V][special ...]
/usr/sbin/fsck [-F hfs][-b blocknum][-c size][-f][-n-N-y-Y]
[-q][-V][special ...]
DESCRIPTION
The fsck command audits and repairs inconsistent conditions for HFS file systems on mass storage device
files identified by special. If the file system is consistent, the number of files on that file system and the
number of used and free blocks are reported. If the file system is inconsistent, fsck provides a mechan-
ism to fix these inconsistencies, depending on which form of the fsck command is used.
special represents a special device (e.g., /dev/rdsk/c1d0s8).
If the target device is a swap device,
fsck does not continue to process. fsck also checks the target dev-
ice to ensure a mounted file system is not being checked. If a mounted device is specified but the
-f option
is omitted,
fsck prompts the user for a response.
If the -p-P option is used and special is not specified, fsck reads the pass numbers in
/etc/fstab to
determine which groups of disks to inspect in parallel, taking maximum advantage of I/O overlap to process
the file systems as quickly as possible. The
-p-P option is normally used in the script
/sbin/bcheckrc during automatic reboot.
Normally, the root file system is checked on pass 1, and other "root" (section 0) file systems on pass 2.
Other small file systems are checked on separate passes (such as the section 4 file systems on pass 3 and
the section 7 file systems on pass 4), and finally the large user file systems are checked on the last pass (for
example, pass 5). A pass number of 0 in
/etc/fstab causes a file system not to be checked. If the
optional fields are not present on a line in /etc/fstab, fsck processes the file system on such lines
sequentially after all eligible file systems with positive pass numbers have been processed.
The inconsistencies that fsck
with the -p-P option corrects are shown below. These are inconsistencies
that are correctable without data loss. If it encounters other inconsistencies, it exits with an abnormal
return status. For each corrected inconsistency, one or more lines are printed identifying the file system on
which the correction will take place and the nature of the correction. Correctable inconsistencies are lim-
ited to the following:
• Unreferenced inodes
• Unreferenced continuation inodes (see inode(4))
• Unreferenced pipes and FIFOs
• Link counts in inodes too large
• Missing blocks in the free list
• Blocks in the free list also in files
• Counts in the superblock wrong.
The
-P option operates in the same manner as the -p option except that cleanly unmounted file systems
are not checked (see fsclean(1M)). This can greatly decrease the amount of time required to reboot a sys-
tem that was brought down cleanly.
If the -p-P option is not specified, the pass numbers are ignored and the file systems are checked interac-
tively in the order they are listed in /etc/fstab.
Without the -p-P option, fsck prompts for concurrence before each correction is attempted when the
file system is inconsistent. It should be noted that some corrective actions result in a loss of data. The
amount and severity of data loss can be determined from the diagnostic output. The default action for each
consistency correction is to wait for the operator to respond yes or no. If the operator does not have write
permission, fsck defaults to a -n action.
Options
fsck recognizes the following options:
-F hfs Specify the HFS file system.
-c size Set the size of the buffer cache which fsck uses to cache disk blocks. size is the number of
cache blocks, and is between 0 and 100 inclusive. The most common use of this option is
HP-UX Release 11i: December 2000 − 1 − Section 1M−−255
___
___