Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fsck(8) — Ultrix-11 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

filsys(5)

fstab(5)

dcheck(8)

icheck(8)

mkfs(8)

fsck(8)

NAME

fsck − file system consistency check and interactive repair

SYNTAX

fsck [ option... ] [ filesystem... ]

DESCRIPTION

The fsck command audits and interactively repairs inconsistent conditions for the named filesystems.  If a file system is consistent then the number of files, number of blocks used, and number of blocks free are reported.  If the file system is inconsistent the operator is prompted for concurrence before each correction is attempted.  Most corrections lose data; all losses are reported.  The default action for each correction is to wait for the operator to respond “yes” or “no”.  Without write permission, fsck defaults to the −n options. 

If no filesystems are given to fsck then a default list of file systems is read from the file /etc/fstab. 

Inconsistencies checked are:

1.Blocks claimed by more than one inode or 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.Size checks: incorrect number of blocks in file, and directory size not a multiple of 16 bytes. 

5.Bad inode format. 

6.Blocks not accounted for anywhere. 

7.Directory checks: file pointing to unallocated inode, and inode number out of range. 

8.Super Block checks: more than 65536 inodes, and more blocks for inodes than there are in the file system. 

9.Bad free block list format. 

10.Total free block and/or free inode count incorrect. 

Allocated but unreferenced files and directories 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 the directory "lost+found" must preexist in the root of the filesystem being checked and must have empty slots in which entries can be made.  This is accomplished by making "lost+found", copying a number of files to the directory, and then removing them (before fsck is executed). 

Checking the raw device is almost always faster. 

When checking the root file system the block device should be used.  The fsck command will force a reboot if any repairs were done on the root file system. 

OPTIONS

−y Assume a yes response to all questions. 

−n Assume a no response to all questions. 

−p Conducts parallel passes in the order and on the file systems specified in the /etc/fstab file.  This option allows for an efficient, simultaneous check of the file systems named in /etc/fstab. 

−sX Ignore the actual free list and (unconditionally) construct a new one by rewriting the superblock of the file system.  The file system should be unmounted while this is done, or extreme care should be taken that the system is quiescent and that it is rebooted immediately afterwards.  This precaution is necessary so that the old, bad, in-core copy of the superblock will not continue to be used, or written on the file system. 

The free list is created with optimal interleaving according to the specification X:

−s3 optimal for RP03 on PDP11/45 CPU
−s4 optimal for RP04, RP05, RP06 on PDP11/70 CPU
−sc:s space free blocks s blocks apart in cylinders of c blocks each. 

If X is not given, the values used when the filesystem was created are used.  If these values were not specified, then c=400, s=9 is assumed.  The ’-s’ without X is recommended when rebuilding free lists on ULTRIX-11 file systems, because mkfs(8) saves the optimum interleave factors in the super-block when the file system is created. 

−SX Conditionally reconstruct the free list.  This option is like −sX except that the free list is rebuilt only if there were no discrepancies discovered in the file system.  It is useful for forcing free list reorganization on uncontaminated file systems.  −S forces −n. 

−t If fsck cannot obtain enough memory to keep its tables, it uses a scratch file.  If the -t option is specified, the file named in the next argument is used as the scratch file.  Without the −t option, fsck prompts if it needs a scratch file.  The file should not be on the file system being checked, and if it is not a special file or did not already exist, it is removed when fsck completes. 

RESTRICTIONS

Inode numbers for .  and ..  in each directory should be checked for validity. 
The −b option of icheck(8) should be available. 

FILES

/etc/fstab - default file system check list

SEE ALSO

filsys(5), fstab(5), dcheck(8), icheck(8), mkfs(8)
ULTRIX-11 System Management Guide

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