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