Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fsck(1M) — HP-UX 5.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

checklist(5)

fs(5)

FSCK(1M)  —  Series 500 Implementation

NAME

fsck − file system consistency check and interactive repair

SYNOPSIS

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

HP-UX COMPATIBILITY

Level: HP-UX/NUCLEUS

Origin: HP

Remarks: This manual page describes fsck as implemented on the Series 500 (SDF file system).  Refer to other fsck(1M) manual pages for information valid for other file systems.

Not supported on the Integral PC. 

DESCRIPTION

Fsck checks and interactively repairs inconsistent conditions for SDF file systems.  If the file system is consistent, then the number of files, the number of blocks used, the number of blocks free, and the percent volume unused are reported.  If the file system is inconsistent, the operator is prompted for concurrence before each operation is attempted.  Note that many corrective actions will result in some loss of data.  The amount and severity of the loss may 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, and 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 (that is, /dev/rhd).  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 i-node, or by the free list;

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

3.  Incorrect link counts;

4.  Blocks not accounted for anywhere;

5.  Bad i-node format;

6.  Directory checks:
Files pointing to unallocated i-nodes,
I-node 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 i-node 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. 

FILES

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

SEE ALSO

checklist(5), fs(5). 

Series 500 HP-UX System Administrator Manual. 

DIAGNOSTICS

The diagnostics are intended to be self-explanatory. 

BUGS

All file systems 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 1024. 
 

Hewlett-Packard  —  last mod. May 11, 2021

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