HP-UX Reference (11i v3 07/02) - 1M System Administration Commands A-M (vol 3)

f
fsck_hfs(1M) fsck_hfs(1M)
-c 0 to disable all caches, thus reducing memory usage.
-b blocknum
Use the specified blocknum as the superblock for the file system. An alternate superblock
can usually be found at block ((SBSIZE+BBSIZE)/DEV_BSIZE)
, typically block 16.
DEV_BSIZE is defined in <sys/param.h>
. You can also find a list of alternate super-
blocks in
/var/adm/sbtab
(see mkfs(1M)).
-f Force fsck
to check a mounted file system.
-i Ignore (that is, do not check) mounted le systems. This option does not ask the user
whether to check the mounted file systems or not. Instead it simply ignores the mounted
file systems and does not check them. If the
-i option is specified with the -f option, then
the
-i option takes precedence; that is, the
fsck is skipped on mounted file systems in
this case.
-m Perform a sanity check only. Verify whether special is mounted, or needs additional check-
ing. Refer to the RETURN VALUE section for more information.
-n-N Assume a no response to all questions asked by
fsck about repairing a file system. Do
not open the file system for writing.
-p "Preen" the file system. Proceed to process and repair le systems without user interac-
tion, as described above. Exit immediately if there is a problem requiring intervention.
-P Same as -p except that cleanly unmounted file systems are not checked.
-q Quiet. Do not print size-check messages in Phase 1. Unreferenced fifos are silently
removed. If
fsck requires it, counts in the superblock and cylinder groups are automati-
cally fixed.
-s Safe performance mode. To improve performance, a system wide sync() will not be
issued.
-V Echo the completed command line, but perform no other actions. The command line is gen-
erated 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 about repairing a file system. This
should be used with great caution, because this is a free license to continue after essentially
unlimited trouble has been encountered.
In all cases, fsck checks the following inconsistencies:
Blocks claimed by more than one inode or the free list.
Blocks claimed by an inode or the free list outside the range of the file system.
Incorrect link counts.
Size checks:
Directory size not of proper format.
Bad inode format.
Blocks not accounted for anywhere.
Directory checks:
File pointing to unallocated inode.
Inode number out of range.
Superblock checks:
More blocks for inodes than there are in the file system.
Bad free block list format.
Total free block and/or free inode count incorrect.
Invalid continuation inode number in a primary inode.
Orphaned files and directories (allocated but unreferenced) are, with the operator’s concurrence, recon-
nected 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 have empty slots in which entries can be made. This
is accomplished by copying a number of files to the directory, then removing them before fsck is executed.
Unreferenced continuation inodes are removed with the -p option, since they do not refer back to the pri-
mary inode. When a primary inode contains an invalid continuation inode number, the continuation inode
number should be cleared (that is, set to 0). This is not done automatically (with the -p option), because
access control list information may have been lost and should be corrected.
HP-UX 11i Version 3: February 2007 2 Hewlett-Packard Company 243