Research V7 development
[unix-history] / usr / man / man1 / icheck.1m
CommitLineData
ab7d1648
KT
1.TH ICHECK 1M
2.SH NAME
3icheck \- file system storage consistency check
4.SH SYNOPSIS
5.B icheck
6[
7.B \-s
8] [
9.B \-b
10numbers ]
11[ filesystem ]
12.SH DESCRIPTION
13.I Icheck
14examines a file system,
15builds a bit map of used blocks,
16and compares this bit map against
17the free list maintained on the file system.
18If the file system is not specified,
19a set of default file systems
20is checked.
21The normal output of
22.I icheck
23includes a report of
24.IP ""
25The total number of files and the numbers of
26regular, directory, block special and character special files.
27.IP ""
28The total number of blocks in use and the numbers of
29single-, double-, and triple-indirect blocks and directory blocks.
30.IP ""
31The number of free blocks.
32.IP ""
33The number of blocks missing; i.e. not in any file
34nor in the free list.
35.PP
36The
37.B \-s
38option causes
39.I icheck
40to ignore the actual free list and reconstruct a new one
41by rewriting the super-block of the file system.
42The file system should be dismounted while this is done;
43if this is not possible (for example if
44the root file system has to be salvaged)
45care should be taken that the system is quiescent and that
46it is rebooted immediately afterwards so that the old, bad in-core
47copy of the super-block will not continue to be used.
48Notice also that
49the words in the super-block
50which indicate the size of the free list and of the
51i-list are believed.
52If the super-block has been curdled
53these words will have to be patched.
54The
55.B \-s
56option
57causes the normal output reports to be suppressed.
58.PP
59Following the
60.B \-b
61option is a list of block numbers;
62whenever any of the named blocks turns up in a file,
63a diagnostic is produced.
64.PP
65.I Icheck
66is faster if the raw version of the special file is used,
67since it reads the i-list many blocks at a time.
68.SH FILES
69Default file systems vary with installation.
70.SH "SEE ALSO"
71dcheck(1), ncheck(1),
72filsys(5), clri(1)
73.SH DIAGNOSTICS
74For duplicate blocks
75and bad blocks (which lie outside the file system)
76.I icheck
77announces the difficulty, the i-number, and the kind of block involved.
78If a read error is encountered,
79the block number of the bad block is printed and
80.I icheck
81considers it to contain 0.
82`Bad freeblock' means that
83a block number outside the available space was encountered in the free list.
84`\fIn\fR dups in free'
85means that
86.IR n ""
87blocks were found in the free list which
88duplicate blocks either in some file or in the earlier part of the free list.
89.SH BUGS
90Since
91.I icheck
92is inherently two-pass in nature, extraneous diagnostics
93may be produced if applied to active file systems.
94.br
95It believes even preposterous super-blocks and
96consequently can get core images.