Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fsck(1M) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

checklist(4)

fs(4)

FSCK[SDF](1M)  —  HP-UX

Series 500 Only

NAME

fsck − file system consistency check and interactive repair

SYNOPSIS

/etc/fsck [−y] [−n] [−s] [−d] [ file system ]

DESCRIPTION

Fsck checks for and interactively repairs inconsistent conditions in SDF file systems.  If the file system is consistent, fsck reports the number of files, the number of blocks used, the number of blocks free, and the percent of volume unused.  If the file system is inconsistent, fsck prompts the operator for concurrence before each operation is attempted.  Note that certain types of corrective actions result in some data loss.  The amount and severity of the loss can be determined from the diagnostic output.  The default action for each inconsistency correction is to wait for the operator to respond yes or no.  If the operator does not have write permission, fsck will default to a −n action. 

Fsck makes multiple passes over the file system, so care should be taken to ensure that the system is quiescent.  You should unmount the file system being checked, if possible.  At the least, the system should be single-user, and spurious processes (such as cron) should be killed.

The following flags are interpreted by fsck:

−y Assume a yes response to all questions asked. 

−n Assume a no response to all questions asked; do not open the file system for writing. 

−s Ignore the actual free list and unconditionally reconstruct a new one.  This option is useful in correcting multiply claimed blocks when one of the claimants is the free list.  When using this option, the number of unclaimed blocks reported by fsck includes all the blocks in the free map.  This can produce extensive output if −d is also selected. 

−s should only be selected after a previous fsck indicates a conflict between a file and the free map.  After fsck −s has executed, the integrity of the conflicting file(s) should be checked. 

If −s is used to correct a problem on a virtual memory device, there is a high probability that the final step in fsck will fail, and you will be forced to reboot.  Should this occur, an appropriate error message will be printed.  No damage should occur. 

−d Dump additional information.  The more d’s that are present, the more information that is dumped.  You may specify up to five d’s.  However, using more than two can result in an overwhelming amount of output. 

Fsck also recognizes, and ignores, the −S and −t options found in other versions of fsck. An appropriate warning is printed.

File system is a device file name describing the device on which the file system to be checked resides.  If no file system(s) are specified, fsck will read a list of default file systems from the file /etc/checklist. 

Error messages from fsck are written to stderr. Information generated because of the −d option and normal output is written to stdout. Both are unbuffered.

Inconsistencies checked include:

1.  Blocks claimed by more than one inode, or by the free list;

2.  Blocks claimed by an inode or the free list outside the range of the file system;

3.  Incorrect link counts;

4.  Blocks not accounted for anywhere;

5.  Bad inode format;

6.  Directory checks:
Files pointing to unallocated inodes,
Inode numbers out of range,
Multiply linked directories,
Link to the parent directory.

Orphaned files (allocated but unreferenced) with non-zero sizes are, with the operator’s concurrence, reconnected by placing them in the lost+found directory.  The name assigned is the inode number.  The only restriction is that lost+found must exist in the root of the file system being checked, and must have empty slots in which entries can be made.  This is accomplished by creating lost+found, copying a number of files to it, and then removing them (before fsck is executed). 

Orphaned directories and files with zero size, with the operator’s concurrence, are returned directly to the free list.  This will also happen if the lost+found directory does not exist. 

You should run a backup prior to running fsck for repairs. 

DIAGNOSTICS

The diagnostics are intended to be self-explanatory. 

WARNINGS

All SDF file systems being checked must be described by a character special device file. 

Do not redirect stdout or stderr to a file on the device being checked.  This includes pipes when checking the root volume. 

Fsck cannot check devices with a logical block size greater than 4096. 

HARDWARE DEPENDENCIES

SDF file systems are implemented only on Series 500 computers. 

FILES

/etc/checklist contains the default list of file systems to check

SEE ALSO

checklist(4), fs(4). 

Series 500 HP-UX System Administrator Manual. 

Hewlett-Packard Company  —  Version B.1,  April 12, 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026