Commit | Line | Data |
---|---|---|
5c938adf KB |
1 | .\" Copyright (c) 1982, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
a38b2411 | 3 | .\" |
3edcb7c8 KB |
4 | .\" %sccs.include.redist.roff% |
5 | .\" | |
5c938adf | 6 | .\" @(#)4.t 8.1 (Berkeley) %G% |
a38b2411 KM |
7 | .\" |
8 | .ds RH Appendix A \- Fsck Error Conditions | |
9 | .NH | |
10 | Appendix A \- Fsck Error Conditions | |
11 | .NH 2 | |
12 | Conventions | |
13 | .PP | |
14 | .I Fsck | |
15 | is | |
16 | a multi-pass file system check program. | |
17 | Each file system pass invokes a different Phase of the | |
18 | .I fsck | |
19 | program. | |
20 | After the initial setup, | |
21 | .I fsck | |
22 | performs successive Phases over each file system, | |
23 | checking blocks and sizes, | |
24 | path-names, | |
25 | connectivity, | |
26 | reference counts, | |
27 | and the map of free blocks, | |
28 | (possibly rebuilding it), | |
29 | and performs some cleanup. | |
30 | .LP | |
31 | Normally | |
32 | .I fsck | |
33 | is run non-interactively to | |
34 | .I preen | |
35 | the file systems after an unclean halt. | |
36 | While preen'ing a file system, | |
37 | it will only fix corruptions that are expected | |
38 | to occur from an unclean halt. | |
39 | These actions are a proper subset of the actions that | |
40 | .I fsck | |
41 | will take when it is running interactively. | |
42 | Throughout this appendix many errors have several options | |
43 | that the operator can take. | |
44 | When an inconsistency is detected, | |
45 | .I fsck | |
46 | reports the error condition to the operator. | |
47 | If a response is required, | |
48 | .I fsck | |
49 | prints a prompt message and | |
50 | waits for a response. | |
51 | When preen'ing most errors are fatal. | |
52 | For those that are expected, | |
53 | the response taken is noted. | |
54 | This appendix explains the meaning of each error condition, | |
55 | the possible responses, and the related error conditions. | |
56 | .LP | |
57 | The error conditions are organized by the | |
58 | .I Phase | |
59 | of the | |
60 | .I fsck | |
61 | program in which they can occur. | |
62 | The error conditions that may occur | |
63 | in more than one Phase | |
64 | will be discussed in initialization. | |
65 | .NH 2 | |
66 | Initialization | |
67 | .PP | |
68 | Before a file system check can be performed, certain | |
69 | tables have to be set up and certain files opened. | |
70 | This section concerns itself with the opening of files and | |
71 | the initialization of tables. | |
72 | This section lists error conditions resulting from | |
73 | command line options, | |
74 | memory requests, | |
75 | opening of files, | |
76 | status of files, | |
77 | file system size checks, | |
78 | and creation of the scratch file. | |
6a1194d8 | 79 | All the initialization errors are fatal |
a38b2411 KM |
80 | when the file system is being preen'ed. |
81 | .sp | |
82 | .LP | |
83 | .B "\fIC\fP option?" | |
84 | .br | |
85 | \fIC\fP is not a legal option to | |
86 | .I fsck ; | |
5e9a893c | 87 | legal options are \-b, \-c, \-y, \-n, and \-p. |
a38b2411 KM |
88 | .I Fsck |
89 | terminates on this error condition. | |
90 | See the | |
91 | .I fsck (8) | |
92 | manual entry for further detail. | |
93 | .sp | |
94 | .LP | |
95 | .B "cannot alloc NNN bytes for blockmap" | |
96 | .br | |
97 | .B "cannot alloc NNN bytes for freemap" | |
98 | .br | |
99 | .B "cannot alloc NNN bytes for statemap" | |
100 | .br | |
101 | .B "cannot alloc NNN bytes for lncntp" | |
102 | .br | |
103 | .I Fsck 's | |
104 | request for memory for its virtual | |
105 | memory tables failed. | |
106 | This should never happen. | |
107 | .I Fsck | |
108 | terminates on this error condition. | |
109 | See a guru. | |
110 | .sp | |
111 | .LP | |
112 | .B "Can't open checklist file: \fIF\fP" | |
113 | .br | |
114 | The file system checklist file | |
115 | \fIF\fP (usually | |
116 | .I /etc/fstab ) | |
117 | can not be opened for reading. | |
118 | .I Fsck | |
119 | terminates on this error condition. | |
120 | Check access modes of \fIF\fP. | |
121 | .sp | |
122 | .LP | |
123 | .B "Can't stat root" | |
124 | .br | |
125 | .I Fsck 's | |
126 | request for statistics about the root directory ``/'' failed. | |
127 | This should never happen. | |
128 | .I Fsck | |
129 | terminates on this error condition. | |
130 | See a guru. | |
131 | .sp | |
132 | .LP | |
133 | .B "Can't stat \fIF\fP" | |
134 | .br | |
135 | .B "Can't make sense out of name \fIF\fP" | |
136 | .br | |
137 | .I Fsck 's | |
138 | request for statistics about the file system \fIF\fP failed. | |
139 | When running manually, | |
140 | it ignores this file system | |
141 | and continues checking the next file system given. | |
142 | Check access modes of \fIF\fP. | |
143 | .sp | |
144 | .LP | |
145 | .B "Can't open \fIF\fP" | |
146 | .br | |
147 | .I Fsck 's | |
148 | request attempt to open the file system \fIF\fP failed. | |
149 | When running manually, it ignores this file system | |
150 | and continues checking the next file system given. | |
151 | Check access modes of \fIF\fP. | |
152 | .sp | |
153 | .LP | |
154 | .B "\fIF\fP: (NO WRITE)" | |
155 | .br | |
156 | Either the \-n flag was specified or | |
157 | .I fsck 's | |
158 | attempt to open the file system \fIF\fP for writing failed. | |
159 | When running manually, | |
160 | all the diagnostics are printed out, | |
161 | but no modifications are attempted to fix them. | |
162 | .sp | |
163 | .LP | |
164 | .B "file is not a block or character device; OK" | |
165 | .br | |
166 | You have given | |
167 | .I fsck | |
168 | a regular file name by mistake. | |
169 | Check the type of the file specified. | |
170 | .LP | |
171 | Possible responses to the OK prompt are: | |
172 | .IP YES | |
6a1194d8 | 173 | ignore this error condition. |
a38b2411 KM |
174 | .IP NO |
175 | ignore this file system and continues checking | |
176 | the next file system given. | |
177 | .sp | |
178 | .LP | |
d9f38d60 KM |
179 | .B "UNDEFINED OPTIMIZATION IN SUPERBLOCK (SET TO DEFAULT)" |
180 | .br | |
181 | The superblock optimization parameter is neither OPT_TIME | |
182 | nor OPT_SPACE. | |
183 | .LP | |
184 | Possible responses to the SET TO DEFAULT prompt are: | |
185 | .IP YES | |
186 | The superblock is set to request optimization to minimize | |
187 | running time of the system. | |
188 | (If optimization to minimize disk space utilization is | |
189 | desired, it can be set using \fItunefs\fP(8).) | |
190 | .IP NO | |
191 | ignore this error condition. | |
192 | .sp | |
193 | .LP | |
194 | .B "IMPOSSIBLE MINFREE=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)" | |
195 | .br | |
196 | The superblock minimum space percentage is greater than 99% | |
197 | or less then 0%. | |
198 | .LP | |
199 | Possible responses to the SET TO DEFAULT prompt are: | |
200 | .IP YES | |
201 | The minfree parameter is set to 10%. | |
202 | (If some other percentage is desired, | |
203 | it can be set using \fItunefs\fP(8).) | |
204 | .IP NO | |
205 | ignore this error condition. | |
206 | .sp | |
207 | .LP | |
5e9a893c KM |
208 | .B "IMPOSSIBLE INTERLEAVE=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)" |
209 | .br | |
210 | The file system interleave is less than or equal to zero. | |
211 | .LP | |
212 | Possible responses to the SET TO DEFAULT prompt are: | |
213 | .IP YES | |
214 | The interleave parameter is set to 1. | |
215 | .IP NO | |
216 | ignore this error condition. | |
217 | .sp | |
218 | .LP | |
219 | .B "IMPOSSIBLE NPSECT=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)" | |
220 | .br | |
221 | The number of physical sectors per track is less than the number | |
222 | of usable sectors per track. | |
223 | .LP | |
224 | Possible responses to the SET TO DEFAULT prompt are: | |
225 | .IP YES | |
226 | The npsect parameter is set to the number of usable sectors per track. | |
227 | .IP NO | |
228 | ignore this error condition. | |
229 | .sp | |
230 | .LP | |
a38b2411 KM |
231 | One of the following messages will appear: |
232 | .br | |
233 | .B "MAGIC NUMBER WRONG" | |
234 | .br | |
235 | .B "NCG OUT OF RANGE" | |
236 | .br | |
237 | .B "CPG OUT OF RANGE" | |
238 | .br | |
239 | .B "NCYL DOES NOT JIVE WITH NCG*CPG" | |
240 | .br | |
241 | .B "SIZE PREPOSTEROUSLY LARGE" | |
242 | .br | |
243 | .B "TRASHED VALUES IN SUPER BLOCK" | |
6a1194d8 | 244 | .br |
a38b2411 KM |
245 | and will be followed by the message: |
246 | .br | |
247 | .B "\fIF\fP: BAD SUPER BLOCK: \fIB\fP" | |
248 | .br | |
249 | .B "USE -b OPTION TO FSCK TO SPECIFY LOCATION OF AN ALTERNATE" | |
250 | .br | |
251 | .B "SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8)." | |
252 | .br | |
253 | The super block has been corrupted. | |
254 | An alternative super block must be selected from among those | |
255 | listed by | |
256 | .I newfs | |
257 | (8) when the file system was created. | |
258 | For file systems with a blocksize less than 32K, | |
259 | specifying \-b 32 is a good first choice. | |
260 | .sp | |
261 | .LP | |
262 | .B "INTERNAL INCONSISTENCY: \fIM\fP" | |
263 | .br | |
264 | .I Fsck 's | |
265 | has had an internal panic, whose message is specified as \fIM\fP. | |
266 | This should never happen. | |
267 | See a guru. | |
268 | .sp | |
269 | .LP | |
270 | .B "CAN NOT SEEK: BLK \fIB\fP (CONTINUE)" | |
271 | .br | |
272 | .I Fsck 's | |
273 | request for moving to a specified block number \fIB\fP in | |
274 | the file system failed. | |
275 | This should never happen. | |
276 | See a guru. | |
277 | .LP | |
278 | Possible responses to the CONTINUE prompt are: | |
279 | .IP YES | |
280 | attempt to continue to run the file system check. | |
281 | Often, | |
282 | however the problem will persist. | |
283 | This error condition will not allow a complete check of the file system. | |
284 | A second run of | |
285 | .I fsck | |
286 | should be made to re-check this file system. | |
287 | If the block was part of the virtual memory buffer | |
288 | cache, | |
289 | .I fsck | |
290 | will terminate with the message ``Fatal I/O error''. | |
291 | .IP NO | |
292 | terminate the program. | |
293 | .sp | |
294 | .LP | |
295 | .B "CAN NOT READ: BLK \fIB\fP (CONTINUE)" | |
296 | .br | |
297 | .I Fsck 's | |
298 | request for reading a specified block number \fIB\fP in | |
299 | the file system failed. | |
300 | This should never happen. | |
301 | See a guru. | |
302 | .LP | |
303 | Possible responses to the CONTINUE prompt are: | |
304 | .IP YES | |
305 | attempt to continue to run the file system check. | |
6a1194d8 KM |
306 | It will retry the read and print out the message: |
307 | .br | |
308 | .B "THE FOLLOWING SECTORS COULD NOT BE READ: \fIN\fP" | |
309 | .br | |
310 | where \fIN\fP indicates the sectors that could not be read. | |
311 | If | |
312 | .I fsck | |
313 | ever tries to write back one of the blocks on which the read failed | |
314 | it will print the message: | |
315 | .br | |
316 | .B "WRITING ZERO'ED BLOCK \fIN\fP TO DISK" | |
317 | .br | |
318 | where \fIN\fP indicates the sector that was written with zero's. | |
319 | If the disk is experiencing hardware problems, the problem will persist. | |
a38b2411 KM |
320 | This error condition will not allow a complete check of the file system. |
321 | A second run of | |
322 | .I fsck | |
323 | should be made to re-check this file system. | |
324 | If the block was part of the virtual memory buffer | |
325 | cache, | |
326 | .I fsck | |
327 | will terminate with the message ``Fatal I/O error''. | |
328 | .IP NO | |
329 | terminate the program. | |
330 | .sp | |
331 | .LP | |
332 | .B "CAN NOT WRITE: BLK \fIB\fP (CONTINUE)" | |
333 | .br | |
334 | .I Fsck 's | |
335 | request for writing a specified block number \fIB\fP | |
336 | in the file system failed. | |
145bc69d KM |
337 | The disk is write-protected; |
338 | check the write protect lock on the drive. | |
339 | If that is not the problem, see a guru. | |
a38b2411 KM |
340 | .LP |
341 | Possible responses to the CONTINUE prompt are: | |
342 | .IP YES | |
343 | attempt to continue to run the file system check. | |
6a1194d8 KM |
344 | The write operation will be retried with the failed blocks |
345 | indicated by the message: | |
346 | .br | |
347 | .B "THE FOLLOWING SECTORS COULD NOT BE WRITTEN: \fIN\fP" | |
348 | .br | |
349 | where \fIN\fP indicates the sectors that could not be written. | |
350 | If the disk is experiencing hardware problems, the problem will persist. | |
a38b2411 KM |
351 | This error condition will not allow a complete check of the file system. |
352 | A second run of | |
353 | .I fsck | |
354 | should be made to re-check this file system. | |
355 | If the block was part of the virtual memory buffer | |
356 | cache, | |
357 | .I fsck | |
358 | will terminate with the message ``Fatal I/O error''. | |
359 | .IP NO | |
360 | terminate the program. | |
6a1194d8 KM |
361 | .sp |
362 | .LP | |
363 | .B "bad inode number DDD to ginode" | |
364 | .br | |
365 | An internal error has attempted to read non-existent inode \fIDDD\fP. | |
366 | This error causes | |
367 | .I fsck | |
368 | to exit. | |
369 | See a guru. | |
a38b2411 KM |
370 | .NH 2 |
371 | Phase 1 \- Check Blocks and Sizes | |
372 | .PP | |
373 | This phase concerns itself with | |
374 | the inode list. | |
375 | This section lists error conditions resulting from | |
376 | checking inode types, | |
377 | setting up the zero-link-count table, | |
378 | examining inode block numbers for bad or duplicate blocks, | |
379 | checking inode size, | |
380 | and checking inode format. | |
381 | All errors in this phase except | |
382 | .B "INCORRECT BLOCK COUNT" | |
6a1194d8 KM |
383 | and |
384 | .B "PARTIALLY TRUNCATED INODE" | |
385 | are fatal if the file system is being preen'ed. | |
a38b2411 KM |
386 | .sp |
387 | .LP | |
388 | .B "UNKNOWN FILE TYPE I=\fII\fP (CLEAR)" | |
6a1194d8 | 389 | .br |
a38b2411 KM |
390 | The mode word of the inode \fII\fP indicates that the inode is not a |
391 | special block inode, special character inode, socket inode, regular inode, | |
392 | symbolic link, or directory inode. | |
393 | .LP | |
394 | Possible responses to the CLEAR prompt are: | |
395 | .IP YES | |
396 | de-allocate inode \fII\fP by zeroing its contents. | |
397 | This will always invoke the UNALLOCATED error condition in Phase 2 | |
398 | for each directory entry pointing to this inode. | |
399 | .IP NO | |
400 | ignore this error condition. | |
401 | .sp | |
402 | .LP | |
6a1194d8 KM |
403 | .B "PARTIALLY TRUNCATED INODE I=\fII\fP (SALVAGE)" |
404 | .br | |
405 | .I Fsck | |
406 | has found inode \fII\fP whose size is shorter than the number of | |
407 | blocks allocated to it. | |
408 | This condition should only occur if the system crashes while in the | |
409 | midst of truncating a file. | |
410 | When preen'ing the file system, | |
411 | .I fsck | |
412 | completes the truncation to the specified size. | |
413 | .LP | |
414 | Possible responses to SALVAGE are: | |
415 | .IP YES | |
416 | complete the truncation to the size specified in the inode. | |
417 | .IP NO | |
418 | ignore this error condition. | |
419 | .sp | |
420 | .LP | |
a38b2411 KM |
421 | .B "LINK COUNT TABLE OVERFLOW (CONTINUE)" |
422 | .br | |
423 | An internal table for | |
424 | .I fsck | |
425 | containing allocated inodes with a link count of | |
6a1194d8 KM |
426 | zero cannot allocate more memory. |
427 | Increase the virtual memory for | |
428 | .I fsck . | |
a38b2411 | 429 | .LP |
6a1194d8 | 430 | Possible responses to the CONTINUE prompt are: |
a38b2411 KM |
431 | .IP YES |
432 | continue with the program. | |
433 | This error condition will not allow a complete check of the file system. | |
434 | A second run of | |
435 | .I fsck | |
436 | should be made to re-check this file system. | |
437 | If another allocated inode with a zero link count is found, | |
438 | this error condition is repeated. | |
439 | .IP NO | |
440 | terminate the program. | |
441 | .sp | |
442 | .LP | |
443 | .B "\fIB\fP BAD I=\fII\fP" | |
444 | .br | |
445 | Inode \fII\fP contains block number \fIB\fP with a number | |
446 | lower than the number of the first data block in the file system or | |
447 | greater than the number of the last block | |
448 | in the file system. | |
449 | This error condition may invoke the | |
450 | .B "EXCESSIVE BAD BLKS" | |
145bc69d | 451 | error condition in Phase 1 (see next paragraph) if |
a38b2411 KM |
452 | inode \fII\fP has too many block numbers outside the file system range. |
453 | This error condition will always invoke the | |
454 | .B "BAD/DUP" | |
455 | error condition in Phase 2 and Phase 4. | |
456 | .sp | |
457 | .LP | |
458 | .B "EXCESSIVE BAD BLKS I=\fII\fP (CONTINUE)" | |
459 | .br | |
460 | There is more than a tolerable number (usually 10) of blocks with a number | |
461 | lower than the number of the first data block in the file system or greater than | |
462 | the number of last block in the file system associated with inode \fII\fP. | |
463 | .LP | |
464 | Possible responses to the CONTINUE prompt are: | |
465 | .IP YES | |
466 | ignore the rest of the blocks in this inode | |
467 | and continue checking with the next inode in the file system. | |
468 | This error condition will not allow a complete check of the file system. | |
469 | A second run of | |
470 | .I fsck | |
471 | should be made to re-check this file system. | |
472 | .IP NO | |
473 | terminate the program. | |
474 | .sp | |
475 | .LP | |
6a1194d8 KM |
476 | .B "BAD STATE DDD TO BLKERR" |
477 | .br | |
478 | An internal error has scrambled | |
479 | .I fsck 's | |
480 | state map to have the impossible value \fIDDD\fP. | |
481 | .I Fsck | |
482 | exits immediately. | |
483 | See a guru. | |
484 | .sp | |
485 | .LP | |
a38b2411 KM |
486 | .B "\fIB\fP DUP I=\fII\fP" |
487 | .br | |
6a1194d8 | 488 | Inode \fII\fP contains block number \fIB\fP that is already claimed by |
a38b2411 KM |
489 | another inode. |
490 | This error condition may invoke the | |
491 | .B "EXCESSIVE DUP BLKS" | |
492 | error condition in Phase 1 if | |
493 | inode \fII\fP has too many block numbers claimed by other inodes. | |
494 | This error condition will always invoke Phase 1b and the | |
495 | .B "BAD/DUP" | |
496 | error condition in Phase 2 and Phase 4. | |
497 | .sp | |
498 | .LP | |
499 | .B "EXCESSIVE DUP BLKS I=\fII\fP (CONTINUE)" | |
500 | .br | |
501 | There is more than a tolerable number (usually 10) of blocks claimed by other | |
502 | inodes. | |
503 | .LP | |
504 | Possible responses to the CONTINUE prompt are: | |
505 | .IP YES | |
506 | ignore the rest of the blocks in this inode | |
507 | and continue checking with the next inode in the file system. | |
508 | This error condition will not allow a complete check of the file system. | |
509 | A second run of | |
510 | .I fsck | |
511 | should be made to re-check this file system. | |
512 | .IP NO | |
513 | terminate the program. | |
514 | .sp | |
515 | .LP | |
516 | .B "DUP TABLE OVERFLOW (CONTINUE)" | |
517 | .br | |
518 | An internal table in | |
519 | .I fsck | |
6a1194d8 KM |
520 | containing duplicate block numbers cannot allocate any more space. |
521 | Increase the amount of virtual memory available to | |
522 | .I fsck . | |
a38b2411 KM |
523 | .LP |
524 | Possible responses to the CONTINUE prompt are: | |
525 | .IP YES | |
526 | continue with the program. | |
527 | This error condition will not allow a complete check of the file system. | |
528 | A second run of | |
529 | .I fsck | |
530 | should be made to re-check this file system. | |
531 | If another duplicate block is found, this error condition will repeat. | |
532 | .IP NO | |
533 | terminate the program. | |
534 | .sp | |
535 | .LP | |
536 | .B "PARTIALLY ALLOCATED INODE I=\fII\fP (CLEAR)" | |
537 | .br | |
538 | Inode \fII\fP is neither allocated nor unallocated. | |
539 | .LP | |
540 | Possible responses to the CLEAR prompt are: | |
541 | .IP YES | |
542 | de-allocate inode \fII\fP by zeroing its contents. | |
543 | .IP NO | |
544 | ignore this error condition. | |
545 | .sp | |
546 | .LP | |
547 | .B "INCORRECT BLOCK COUNT I=\fII\fP (\fIX\fP should be \fIY\fP) (CORRECT)" | |
548 | .br | |
549 | The block count for inode \fII\fP is \fIX\fP blocks, | |
550 | but should be \fIY\fP blocks. | |
551 | When preen'ing the count is corrected. | |
552 | .LP | |
553 | Possible responses to the CORRECT prompt are: | |
554 | .IP YES | |
555 | replace the block count of inode \fII\fP with \fIY\fP. | |
556 | .IP NO | |
557 | ignore this error condition. | |
558 | .NH 2 | |
559 | Phase 1B: Rescan for More Dups | |
560 | .PP | |
561 | When a duplicate block is found in the file system, the file system is | |
6a1194d8 | 562 | rescanned to find the inode that previously claimed that block. |
a38b2411 KM |
563 | This section lists the error condition when the duplicate block is found. |
564 | .sp | |
565 | .LP | |
566 | .B "\fIB\fP DUP I=\fII\fP" | |
567 | .br | |
568 | Inode \fII\fP contains block number \fIB\fP that | |
569 | is already claimed by another inode. | |
570 | This error condition will always invoke the | |
571 | .B "BAD/DUP" | |
572 | error condition in Phase 2. | |
573 | You can determine which inodes have overlapping blocks by examining | |
574 | this error condition and the DUP error condition in Phase 1. | |
575 | .NH 2 | |
576 | Phase 2 \- Check Pathnames | |
577 | .PP | |
578 | This phase concerns itself with removing directory entries | |
579 | pointing to | |
580 | error conditioned inodes | |
581 | from Phase 1 and Phase 1b. | |
582 | This section lists error conditions resulting from | |
583 | root inode mode and status, | |
584 | directory inode pointers in range, | |
145bc69d KM |
585 | and directory entries pointing to bad inodes, |
586 | and directory integrity checks. | |
587 | All errors in this phase are fatal if the file system is being preen'ed, | |
588 | except for directories not being a multiple of the blocks size | |
589 | and extraneous hard links. | |
a38b2411 KM |
590 | .sp |
591 | .LP | |
6a1194d8 | 592 | .B "ROOT INODE UNALLOCATED (ALLOCATE)" |
a38b2411 KM |
593 | .br |
594 | The root inode (usually inode number 2) has no allocate mode bits. | |
595 | This should never happen. | |
a38b2411 | 596 | .LP |
6a1194d8 KM |
597 | Possible responses to the ALLOCATE prompt are: |
598 | .IP YES | |
599 | allocate inode 2 as the root inode. | |
600 | The files and directories usually found in the root will be recovered | |
601 | in Phase 3 and put into | |
602 | .I lost+found . | |
603 | If the attempt to allocate the root fails, | |
604 | .I fsck | |
605 | will exit with the message: | |
a38b2411 | 606 | .br |
6a1194d8 KM |
607 | .B "CANNOT ALLOCATE ROOT INODE" . |
608 | .IP NO | |
609 | .I fsck | |
610 | will exit. | |
a38b2411 KM |
611 | .sp |
612 | .LP | |
6a1194d8 | 613 | .B "ROOT INODE NOT DIRECTORY (REALLOCATE)" |
a38b2411 KM |
614 | .br |
615 | The root inode (usually inode number 2) | |
616 | is not directory inode type. | |
617 | .LP | |
6a1194d8 KM |
618 | Possible responses to the REALLOCATE prompt are: |
619 | .IP YES | |
620 | clear the existing contents of the root inode | |
621 | and reallocate it. | |
622 | The files and directories usually found in the root will be recovered | |
623 | in Phase 3 and put into | |
624 | .I lost+found . | |
625 | If the attempt to allocate the root fails, | |
626 | .I fsck | |
627 | will exit with the message: | |
628 | .br | |
629 | .B "CANNOT ALLOCATE ROOT INODE" . | |
630 | .IP NO | |
631 | .I fsck | |
632 | will then prompt with | |
633 | .B "FIX" | |
634 | .LP | |
a38b2411 KM |
635 | Possible responses to the FIX prompt are: |
636 | .IP YES | |
637 | replace the root inode's type to be a directory. | |
638 | If the root inode's data blocks are not directory blocks, | |
6a1194d8 | 639 | many error conditions will be produced. |
a38b2411 KM |
640 | .IP NO |
641 | terminate the program. | |
642 | .sp | |
643 | .LP | |
6a1194d8 | 644 | .B "DUPS/BAD IN ROOT INODE (REALLOCATE)" |
a38b2411 KM |
645 | .br |
646 | Phase 1 or Phase 1b have found duplicate blocks | |
647 | or bad blocks in the root inode (usually inode number 2) for the file system. | |
648 | .LP | |
6a1194d8 KM |
649 | Possible responses to the REALLOCATE prompt are: |
650 | .IP YES | |
651 | clear the existing contents of the root inode | |
652 | and reallocate it. | |
653 | The files and directories usually found in the root will be recovered | |
654 | in Phase 3 and put into | |
655 | .I lost+found . | |
656 | If the attempt to allocate the root fails, | |
657 | .I fsck | |
658 | will exit with the message: | |
659 | .br | |
660 | .B "CANNOT ALLOCATE ROOT INODE" . | |
661 | .IP NO | |
662 | .I fsck | |
663 | will then prompt with | |
664 | .B "CONTINUE" . | |
665 | .LP | |
a38b2411 KM |
666 | Possible responses to the CONTINUE prompt are: |
667 | .IP YES | |
668 | ignore the | |
669 | .B "DUPS/BAD" | |
670 | error condition in the root inode and | |
671 | attempt to continue to run the file system check. | |
672 | If the root inode is not correct, | |
6a1194d8 | 673 | then this may result in many other error conditions. |
a38b2411 KM |
674 | .IP NO |
675 | terminate the program. | |
676 | .sp | |
677 | .LP | |
6a1194d8 KM |
678 | .B "NAME TOO LONG \fIF\fP" |
679 | .br | |
680 | An excessively long path name has been found. | |
681 | This usually indicates loops in the file system name space. | |
682 | This can occur if the super user has made circular links to directories. | |
683 | The offending links must be removed (by a guru). | |
684 | .sp | |
685 | .LP | |
a38b2411 KM |
686 | .B "I OUT OF RANGE I=\fII\fP NAME=\fIF\fP (REMOVE)" |
687 | .br | |
6a1194d8 | 688 | A directory entry \fIF\fP has an inode number \fII\fP that is greater than |
a38b2411 KM |
689 | the end of the inode list. |
690 | .LP | |
691 | Possible responses to the REMOVE prompt are: | |
692 | .IP YES | |
693 | the directory entry \fIF\fP is removed. | |
694 | .IP NO | |
695 | ignore this error condition. | |
696 | .sp | |
697 | .LP | |
145bc69d | 698 | .B "UNALLOCATED I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP \fItype\fP=\fIF\fP (REMOVE)" |
a38b2411 | 699 | .br |
145bc69d | 700 | A directory or file entry \fIF\fP points to an unallocated inode \fII\fP. |
a38b2411 | 701 | The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP, |
145bc69d | 702 | and name \fIF\fP are printed. |
a38b2411 KM |
703 | .LP |
704 | Possible responses to the REMOVE prompt are: | |
705 | .IP YES | |
706 | the directory entry \fIF\fP is removed. | |
707 | .IP NO | |
708 | ignore this error condition. | |
709 | .sp | |
710 | .LP | |
145bc69d | 711 | .B "DUP/BAD I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP \fItype\fP=\fIF\fP (REMOVE)" |
a38b2411 KM |
712 | .br |
713 | Phase 1 or Phase 1b have found duplicate blocks or bad blocks | |
145bc69d KM |
714 | associated with directory or file entry \fIF\fP, inode \fII\fP. |
715 | The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP, | |
716 | and directory name \fIF\fP are printed. | |
a38b2411 KM |
717 | .LP |
718 | Possible responses to the REMOVE prompt are: | |
719 | .IP YES | |
720 | the directory entry \fIF\fP is removed. | |
721 | .IP NO | |
722 | ignore this error condition. | |
723 | .sp | |
724 | .LP | |
725 | .B "ZERO LENGTH DIRECTORY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (REMOVE)" | |
726 | .br | |
727 | A directory entry \fIF\fP has a size \fIS\fP that is zero. | |
728 | The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP, | |
729 | and directory name \fIF\fP are printed. | |
730 | .LP | |
731 | Possible responses to the REMOVE prompt are: | |
732 | .IP YES | |
733 | the directory entry \fIF\fP is removed; | |
734 | this will always invoke the BAD/DUP error condition in Phase 4. | |
735 | .IP NO | |
736 | ignore this error condition. | |
737 | .sp | |
738 | .LP | |
739 | .B "DIRECTORY TOO SHORT I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)" | |
740 | .br | |
741 | A directory \fIF\fP has been found whose size \fIS\fP | |
742 | is less than the minimum size directory. | |
743 | The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP, | |
744 | and directory name \fIF\fP are printed. | |
745 | .LP | |
746 | Possible responses to the FIX prompt are: | |
747 | .IP YES | |
748 | increase the size of the directory to the minimum directory size. | |
749 | .IP NO | |
750 | ignore this directory. | |
751 | .sp | |
752 | .LP | |
6a1194d8 KM |
753 | .B "DIRECTORY \fIF\fP LENGTH \fIS\fP NOT MULTIPLE OF \fIB\fP (ADJUST) |
754 | .br | |
755 | A directory \fIF\fP has been found with size \fIS\fP that is not | |
756 | a multiple of the directory blocksize \fIB\fP. | |
757 | .LP | |
758 | Possible responses to the ADJUST prompt are: | |
759 | .IP YES | |
760 | the length is rounded up to the appropriate block size. | |
761 | This error can occur on 4.2BSD file systems. | |
762 | Thus when preen'ing the file system only a warning is printed | |
763 | and the directory is adjusted. | |
764 | .IP NO | |
765 | ignore the error condition. | |
766 | .sp | |
767 | .LP | |
a38b2411 KM |
768 | .B "DIRECTORY CORRUPTED I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (SALVAGE)" |
769 | .br | |
770 | A directory with an inconsistent internal state has been found. | |
771 | .LP | |
772 | Possible responses to the FIX prompt are: | |
773 | .IP YES | |
6a1194d8 KM |
774 | throw away all entries up to the next directory boundary (usually 512-byte) |
775 | boundary. | |
776 | This drastic action can throw away up to 42 entries, | |
a38b2411 KM |
777 | and should be taken only after other recovery efforts have failed. |
778 | .IP NO | |
6a1194d8 | 779 | skip up to the next directory boundary and resume reading, |
a38b2411 KM |
780 | but do not modify the directory. |
781 | .sp | |
782 | .LP | |
783 | .B "BAD INODE NUMBER FOR `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)" | |
784 | .br | |
785 | A directory \fII\fP has been found whose inode number for `.' does | |
786 | does not equal \fII\fP. | |
787 | .LP | |
788 | Possible responses to the FIX prompt are: | |
789 | .IP YES | |
790 | change the inode number for `.' to be equal to \fII\fP. | |
791 | .IP NO | |
792 | leave the inode number for `.' unchanged. | |
793 | .sp | |
794 | .LP | |
795 | .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)" | |
796 | .br | |
797 | A directory \fII\fP has been found whose first entry is unallocated. | |
798 | .LP | |
799 | Possible responses to the FIX prompt are: | |
800 | .IP YES | |
6a1194d8 | 801 | build an entry for `.' with inode number equal to \fII\fP. |
a38b2411 KM |
802 | .IP NO |
803 | leave the directory unchanged. | |
804 | .sp | |
805 | .LP | |
806 | .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP" | |
807 | .br | |
808 | .B "CANNOT FIX, FIRST ENTRY IN DIRECTORY CONTAINS \fIF\fP" | |
809 | .br | |
810 | A directory \fII\fP has been found whose first entry is \fIF\fP. | |
811 | .I Fsck | |
812 | cannot resolve this problem. | |
813 | The file system should be mounted and the offending entry \fIF\fP | |
814 | moved elsewhere. | |
815 | The file system should then be unmounted and | |
816 | .I fsck | |
817 | should be run again. | |
818 | .sp | |
819 | .LP | |
820 | .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP" | |
821 | .br | |
822 | .B "CANNOT FIX, INSUFFICIENT SPACE TO ADD `.'" | |
823 | .br | |
824 | A directory \fII\fP has been found whose first entry is not `.'. | |
825 | .I Fsck | |
826 | cannot resolve this problem as it should never happen. | |
827 | See a guru. | |
828 | .sp | |
829 | .LP | |
830 | .B "EXTRA `.' ENTRY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)" | |
831 | .br | |
832 | A directory \fII\fP has been found that has more than one entry for `.'. | |
833 | .LP | |
834 | Possible responses to the FIX prompt are: | |
835 | .IP YES | |
836 | remove the extra entry for `.'. | |
837 | .IP NO | |
838 | leave the directory unchanged. | |
839 | .sp | |
840 | .LP | |
841 | .B "BAD INODE NUMBER FOR `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)" | |
842 | .br | |
843 | A directory \fII\fP has been found whose inode number for `..' does | |
844 | does not equal the parent of \fII\fP. | |
845 | .LP | |
846 | Possible responses to the FIX prompt are: | |
847 | .IP YES | |
145bc69d KM |
848 | change the inode number for `..' to be equal to the parent of \fII\fP |
849 | (``\fB..\fP'' in the root inode points to itself). | |
a38b2411 KM |
850 | .IP NO |
851 | leave the inode number for `..' unchanged. | |
852 | .sp | |
853 | .LP | |
854 | .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)" | |
855 | .br | |
856 | A directory \fII\fP has been found whose second entry is unallocated. | |
857 | .LP | |
858 | Possible responses to the FIX prompt are: | |
859 | .IP YES | |
145bc69d KM |
860 | build an entry for `..' with inode number equal to the parent of \fII\fP |
861 | (``\fB..\fP'' in the root inode points to itself). | |
a38b2411 KM |
862 | .IP NO |
863 | leave the directory unchanged. | |
864 | .sp | |
865 | .LP | |
866 | .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP" | |
867 | .br | |
868 | .B "CANNOT FIX, SECOND ENTRY IN DIRECTORY CONTAINS \fIF\fP" | |
869 | .br | |
870 | A directory \fII\fP has been found whose second entry is \fIF\fP. | |
871 | .I Fsck | |
872 | cannot resolve this problem. | |
873 | The file system should be mounted and the offending entry \fIF\fP | |
874 | moved elsewhere. | |
875 | The file system should then be unmounted and | |
876 | .I fsck | |
877 | should be run again. | |
878 | .sp | |
879 | .LP | |
880 | .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP" | |
881 | .br | |
882 | .B "CANNOT FIX, INSUFFICIENT SPACE TO ADD `..'" | |
883 | .br | |
884 | A directory \fII\fP has been found whose second entry is not `..'. | |
885 | .I Fsck | |
6a1194d8 KM |
886 | cannot resolve this problem. |
887 | The file system should be mounted and the second entry in the directory | |
888 | moved elsewhere. | |
889 | The file system should then be unmounted and | |
890 | .I fsck | |
891 | should be run again. | |
a38b2411 KM |
892 | .sp |
893 | .LP | |
894 | .B "EXTRA `..' ENTRY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)" | |
895 | .br | |
896 | A directory \fII\fP has been found that has more than one entry for `..'. | |
897 | .LP | |
898 | Possible responses to the FIX prompt are: | |
899 | .IP YES | |
900 | remove the extra entry for `..'. | |
901 | .IP NO | |
902 | leave the directory unchanged. | |
6a1194d8 KM |
903 | .sp |
904 | .LP | |
905 | .B "\fIN\fP IS AN EXTRANEOUS HARD LINK TO A DIRECTORY \fID\fP (REMOVE) | |
906 | .br | |
907 | .I Fsck | |
908 | has found a hard link, \fIN\fP, to a directory, \fID\fP. | |
909 | When preen'ing the extraneous links are ignored. | |
910 | .LP | |
911 | Possible responses to the REMOVE prompt are: | |
912 | .IP YES | |
913 | delete the extraneous entry, \fIN\fP. | |
914 | .IP NO | |
915 | ignore the error condition. | |
916 | .sp | |
917 | .LP | |
918 | .B "BAD INODE \fIS\fP TO DESCEND" | |
919 | .br | |
920 | An internal error has caused an impossible state \fIS\fP to be passed to the | |
921 | routine that descends the file system directory structure. | |
922 | .I Fsck | |
923 | exits. | |
924 | See a guru. | |
925 | .sp | |
926 | .LP | |
927 | .B "BAD RETURN STATE \fIS\fP FROM DESCEND" | |
928 | .br | |
929 | An internal error has caused an impossible state \fIS\fP to be returned | |
930 | from the routine that descends the file system directory structure. | |
931 | .I Fsck | |
932 | exits. | |
933 | See a guru. | |
934 | .sp | |
935 | .LP | |
936 | .B "BAD STATE \fIS\fP FOR ROOT INODE" | |
937 | .br | |
938 | An internal error has caused an impossible state \fIS\fP to be assigned | |
939 | to the root inode. | |
940 | .I Fsck | |
941 | exits. | |
942 | See a guru. | |
a38b2411 KM |
943 | .NH 2 |
944 | Phase 3 \- Check Connectivity | |
945 | .PP | |
946 | This phase concerns itself with the directory connectivity seen in | |
947 | Phase 2. | |
948 | This section lists error conditions resulting from | |
949 | unreferenced directories, | |
950 | and missing or full | |
951 | .I lost+found | |
952 | directories. | |
953 | .sp | |
954 | .LP | |
955 | .B "UNREF DIR I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (RECONNECT)" | |
956 | .br | |
957 | The directory inode \fII\fP was not connected to a directory entry | |
958 | when the file system was traversed. | |
6a1194d8 KM |
959 | The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and |
960 | modify time \fIT\fP of directory inode \fII\fP are printed. | |
a38b2411 KM |
961 | When preen'ing, the directory is reconnected if its size is non-zero, |
962 | otherwise it is cleared. | |
963 | .LP | |
964 | Possible responses to the RECONNECT prompt are: | |
965 | .IP YES | |
966 | reconnect directory inode \fII\fP to the file system in the | |
967 | directory for lost files (usually \fIlost+found\fP). | |
968 | This may invoke the | |
969 | .I lost+found | |
970 | error condition in Phase 3 | |
971 | if there are problems connecting directory inode \fII\fP to \fIlost+found\fP. | |
972 | This may also invoke the CONNECTED error condition in Phase 3 if the link | |
973 | was successful. | |
974 | .IP NO | |
975 | ignore this error condition. | |
976 | This will always invoke the UNREF error condition in Phase 4. | |
977 | .sp | |
978 | .LP | |
6a1194d8 | 979 | .B "NO lost+found DIRECTORY (CREATE)" |
a38b2411 KM |
980 | .br |
981 | There is no | |
982 | .I lost+found | |
983 | directory in the root directory of the file system; | |
6a1194d8 | 984 | When preen'ing |
a38b2411 | 985 | .I fsck |
6a1194d8 KM |
986 | tries to create a \fIlost+found\fP directory. |
987 | .LP | |
988 | Possible responses to the CREATE prompt are: | |
989 | .IP YES | |
990 | create a \fIlost+found\fP directory in the root of the file system. | |
991 | This may raise the message: | |
992 | .br | |
993 | .B "NO SPACE LEFT IN / (EXPAND)" | |
994 | .br | |
995 | See below for the possible responses. | |
996 | Inability to create a \fIlost+found\fP directory generates the message: | |
997 | .br | |
998 | .B "SORRY. CANNOT CREATE lost+found DIRECTORY" | |
999 | .br | |
1000 | and aborts the attempt to linkup the lost inode. | |
1001 | This will always invoke the UNREF error condition in Phase 4. | |
1002 | .IP NO | |
1003 | abort the attempt to linkup the lost inode. | |
a38b2411 | 1004 | This will always invoke the UNREF error condition in Phase 4. |
a38b2411 KM |
1005 | .sp |
1006 | .LP | |
6a1194d8 KM |
1007 | .B "lost+found IS NOT A DIRECTORY (REALLOCATE)" |
1008 | .br | |
1009 | The entry for | |
1010 | .I lost+found | |
1011 | is not a directory. | |
1012 | .LP | |
1013 | Possible responses to the REALLOCATE prompt are: | |
1014 | .IP YES | |
1015 | allocate a directory inode, and change \fIlost+found\fP to reference it. | |
1016 | The previous inode reference by the \fIlost+found\fP name is not cleared. | |
1017 | Thus it will either be reclaimed as an UNREF'ed inode or have its | |
1018 | link count ADJUST'ed later in this Phase. | |
1019 | Inability to create a \fIlost+found\fP directory generates the message: | |
1020 | .br | |
1021 | .B "SORRY. CANNOT CREATE lost+found DIRECTORY" | |
1022 | .br | |
1023 | and aborts the attempt to linkup the lost inode. | |
1024 | This will always invoke the UNREF error condition in Phase 4. | |
1025 | .IP NO | |
1026 | abort the attempt to linkup the lost inode. | |
1027 | This will always invoke the UNREF error condition in Phase 4. | |
1028 | .sp | |
1029 | .LP | |
1030 | .B "NO SPACE LEFT IN /lost+found (EXPAND)" | |
a38b2411 KM |
1031 | .br |
1032 | There is no space to add another entry to the | |
1033 | .I lost+found | |
1034 | directory in the root directory | |
6a1194d8 KM |
1035 | of the file system. |
1036 | When preen'ing the | |
1037 | .I lost+found | |
1038 | directory is expanded. | |
1039 | .LP | |
1040 | Possible responses to the EXPAND prompt are: | |
1041 | .IP YES | |
1042 | the | |
1043 | .I lost+found | |
1044 | directory is expanded to make room for the new entry. | |
1045 | If the attempted expansion fails | |
a38b2411 | 1046 | .I fsck |
6a1194d8 KM |
1047 | prints the message: |
1048 | .br | |
1049 | .B "SORRY. NO SPACE IN lost+found DIRECTORY" | |
1050 | .br | |
1051 | and aborts the attempt to linkup the lost inode. | |
a38b2411 KM |
1052 | This will always invoke the UNREF error condition in Phase 4. |
1053 | Clean out unnecessary entries in | |
6a1194d8 | 1054 | .I lost+found . |
a38b2411 | 1055 | This error is fatal if the file system is being preen'ed. |
6a1194d8 KM |
1056 | .IP NO |
1057 | abort the attempt to linkup the lost inode. | |
1058 | This will always invoke the UNREF error condition in Phase 4. | |
a38b2411 KM |
1059 | .sp |
1060 | .LP | |
1061 | .B "DIR I=\fII1\fP CONNECTED. PARENT WAS I=\fII2\fP" | |
1062 | .br | |
1063 | This is an advisory message indicating a directory inode \fII1\fP was | |
1064 | successfully connected to the | |
1065 | .I lost+found | |
1066 | directory. | |
1067 | The parent inode \fII2\fP of the directory inode \fII1\fP is | |
1068 | replaced by the inode number of the | |
1069 | .I lost+found | |
1070 | directory. | |
6a1194d8 KM |
1071 | .sp |
1072 | .LP | |
1073 | .B "DIRECTORY \fIF\fP LENGTH \fIS\fP NOT MULTIPLE OF \fIB\fP (ADJUST) | |
1074 | .br | |
1075 | A directory \fIF\fP has been found with size \fIS\fP that is not | |
145bc69d KM |
1076 | a multiple of the directory blocksize \fIB\fP |
1077 | (this can reoccur in Phase 3 if it is not adjusted in Phase 2). | |
6a1194d8 KM |
1078 | .LP |
1079 | Possible responses to the ADJUST prompt are: | |
1080 | .IP YES | |
1081 | the length is rounded up to the appropriate block size. | |
1082 | This error can occur on 4.2BSD file systems. | |
1083 | Thus when preen'ing the file system only a warning is printed | |
1084 | and the directory is adjusted. | |
1085 | .IP NO | |
1086 | ignore the error condition. | |
1087 | .sp | |
1088 | .LP | |
1089 | .B "BAD INODE \fIS\fP TO DESCEND" | |
1090 | .br | |
1091 | An internal error has caused an impossible state \fIS\fP to be passed to the | |
1092 | routine that descends the file system directory structure. | |
1093 | .I Fsck | |
1094 | exits. | |
1095 | See a guru. | |
a38b2411 KM |
1096 | .NH 2 |
1097 | Phase 4 \- Check Reference Counts | |
1098 | .PP | |
1099 | This phase concerns itself with the link count information | |
1100 | seen in Phase 2 and Phase 3. | |
1101 | This section lists error conditions resulting from | |
1102 | unreferenced files, | |
1103 | missing or full | |
1104 | .I lost+found | |
1105 | directory, | |
1106 | incorrect link counts for files, directories, symbolic links, or special files, | |
1107 | unreferenced files, symbolic links, and directories, | |
6a1194d8 | 1108 | and bad or duplicate blocks in files, symbolic links, and directories. |
a38b2411 | 1109 | All errors in this phase are correctable if the file system is being preen'ed |
6a1194d8 | 1110 | except running out of space in the \fIlost+found\fP directory. |
a38b2411 KM |
1111 | .sp |
1112 | .LP | |
1113 | .B "UNREF FILE I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (RECONNECT)" | |
1114 | .br | |
1115 | Inode \fII\fP was not connected to a directory entry | |
1116 | when the file system was traversed. | |
1117 | The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and | |
1118 | modify time \fIT\fP of inode \fII\fP are printed. | |
1119 | When preen'ing the file is cleared if either its size or its | |
1120 | link count is zero, | |
1121 | otherwise it is reconnected. | |
1122 | .LP | |
1123 | Possible responses to the RECONNECT prompt are: | |
1124 | .IP YES | |
1125 | reconnect inode \fII\fP to the file system in the directory for | |
1126 | lost files (usually \fIlost+found\fP). | |
1127 | This may invoke the | |
1128 | .I lost+found | |
1129 | error condition in Phase 4 | |
1130 | if there are problems connecting inode \fII\fP to | |
6a1194d8 | 1131 | .I lost+found . |
a38b2411 KM |
1132 | .IP NO |
1133 | ignore this error condition. | |
1134 | This will always invoke the CLEAR error condition in Phase 4. | |
1135 | .sp | |
1136 | .LP | |
1137 | .B "(CLEAR)" | |
1138 | .br | |
1139 | The inode mentioned in the immediately previous error condition can not be | |
1140 | reconnected. | |
1141 | This cannot occur if the file system is being preen'ed, | |
1142 | since lack of space to reconnect files is a fatal error. | |
1143 | .LP | |
1144 | Possible responses to the CLEAR prompt are: | |
1145 | .IP YES | |
1146 | de-allocate the inode mentioned in the immediately previous error condition by zeroing its contents. | |
1147 | .IP NO | |
1148 | ignore this error condition. | |
1149 | .sp | |
1150 | .LP | |
6a1194d8 | 1151 | .B "NO lost+found DIRECTORY (CREATE)" |
a38b2411 KM |
1152 | .br |
1153 | There is no | |
1154 | .I lost+found | |
1155 | directory in the root directory of the file system; | |
6a1194d8 | 1156 | When preen'ing |
a38b2411 | 1157 | .I fsck |
6a1194d8 KM |
1158 | tries to create a \fIlost+found\fP directory. |
1159 | .LP | |
1160 | Possible responses to the CREATE prompt are: | |
1161 | .IP YES | |
1162 | create a \fIlost+found\fP directory in the root of the file system. | |
1163 | This may raise the message: | |
1164 | .br | |
1165 | .B "NO SPACE LEFT IN / (EXPAND)" | |
1166 | .br | |
1167 | See below for the possible responses. | |
1168 | Inability to create a \fIlost+found\fP directory generates the message: | |
1169 | .br | |
1170 | .B "SORRY. CANNOT CREATE lost+found DIRECTORY" | |
1171 | .br | |
1172 | and aborts the attempt to linkup the lost inode. | |
1173 | This will always invoke the UNREF error condition in Phase 4. | |
1174 | .IP NO | |
1175 | abort the attempt to linkup the lost inode. | |
1176 | This will always invoke the UNREF error condition in Phase 4. | |
a38b2411 KM |
1177 | .sp |
1178 | .LP | |
6a1194d8 KM |
1179 | .B "lost+found IS NOT A DIRECTORY (REALLOCATE)" |
1180 | .br | |
1181 | The entry for | |
1182 | .I lost+found | |
1183 | is not a directory. | |
1184 | .LP | |
1185 | Possible responses to the REALLOCATE prompt are: | |
1186 | .IP YES | |
1187 | allocate a directory inode, and change \fIlost+found\fP to reference it. | |
1188 | The previous inode reference by the \fIlost+found\fP name is not cleared. | |
1189 | Thus it will either be reclaimed as an UNREF'ed inode or have its | |
1190 | link count ADJUST'ed later in this Phase. | |
1191 | Inability to create a \fIlost+found\fP directory generates the message: | |
1192 | .br | |
1193 | .B "SORRY. CANNOT CREATE lost+found DIRECTORY" | |
1194 | .br | |
1195 | and aborts the attempt to linkup the lost inode. | |
1196 | This will always invoke the UNREF error condition in Phase 4. | |
1197 | .IP NO | |
1198 | abort the attempt to linkup the lost inode. | |
1199 | This will always invoke the UNREF error condition in Phase 4. | |
1200 | .sp | |
1201 | .LP | |
1202 | .B "NO SPACE LEFT IN /lost+found (EXPAND)" | |
a38b2411 KM |
1203 | .br |
1204 | There is no space to add another entry to the | |
1205 | .I lost+found | |
6a1194d8 KM |
1206 | directory in the root directory |
1207 | of the file system. | |
1208 | When preen'ing the | |
1209 | .I lost+found | |
1210 | directory is expanded. | |
1211 | .LP | |
1212 | Possible responses to the EXPAND prompt are: | |
1213 | .IP YES | |
1214 | the | |
1215 | .I lost+found | |
1216 | directory is expanded to make room for the new entry. | |
1217 | If the attempted expansion fails | |
a38b2411 | 1218 | .I fsck |
6a1194d8 KM |
1219 | prints the message: |
1220 | .br | |
1221 | .B "SORRY. NO SPACE IN lost+found DIRECTORY" | |
1222 | .br | |
1223 | and aborts the attempt to linkup the lost inode. | |
1224 | This will always invoke the UNREF error condition in Phase 4. | |
1225 | Clean out unnecessary entries in | |
1226 | .I lost+found . | |
a38b2411 | 1227 | This error is fatal if the file system is being preen'ed. |
6a1194d8 KM |
1228 | .IP NO |
1229 | abort the attempt to linkup the lost inode. | |
1230 | This will always invoke the UNREF error condition in Phase 4. | |
a38b2411 KM |
1231 | .sp |
1232 | .LP | |
145bc69d | 1233 | .B "LINK COUNT \fItype\fP I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP COUNT=\fIX\fP SHOULD BE \fIY\fP (ADJUST)" |
a38b2411 | 1234 | .br |
145bc69d | 1235 | The link count for inode \fII\fP, |
a38b2411 KM |
1236 | is \fIX\fP but should be \fIY\fP. |
1237 | The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and modify time \fIT\fP | |
1238 | are printed. | |
6a1194d8 KM |
1239 | When preen'ing the link count is adjusted unless the number of references |
1240 | is increasing, a condition that should never occur unless precipitated | |
1241 | by a hardware failure. | |
1242 | When the number of references is increasing under preen mode, | |
1243 | .I fsck | |
1244 | exits with the message: | |
1245 | .br | |
1246 | .B "LINK COUNT INCREASING" | |
a38b2411 KM |
1247 | .LP |
1248 | Possible responses to the ADJUST prompt are: | |
1249 | .IP YES | |
1250 | replace the link count of file inode \fII\fP with \fIY\fP. | |
1251 | .IP NO | |
1252 | ignore this error condition. | |
1253 | .sp | |
1254 | .LP | |
145bc69d | 1255 | .B "UNREF \fItype\fP I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (CLEAR)" |
a38b2411 | 1256 | .br |
145bc69d | 1257 | Inode \fII\fP, was not connected to a directory entry when the |
a38b2411 KM |
1258 | file system was traversed. |
1259 | The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, | |
1260 | and modify time \fIT\fP of inode \fII\fP | |
1261 | are printed. | |
1262 | When preen'ing, | |
1263 | this is a file that was not connected because its size or link count was zero, | |
1264 | hence it is cleared. | |
1265 | .LP | |
1266 | Possible responses to the CLEAR prompt are: | |
1267 | .IP YES | |
1268 | de-allocate inode \fII\fP by zeroing its contents. | |
1269 | .IP NO | |
1270 | ignore this error condition. | |
1271 | .sp | |
1272 | .LP | |
145bc69d | 1273 | .B "BAD/DUP \fItype\fP I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (CLEAR)" |
a38b2411 KM |
1274 | .br |
1275 | Phase 1 or Phase 1b have found duplicate blocks | |
1276 | or bad blocks associated with | |
145bc69d | 1277 | inode \fII\fP. |
a38b2411 KM |
1278 | The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, |
1279 | and modify time \fIT\fP of inode \fII\fP | |
1280 | are printed. | |
1281 | This error cannot arise when the file system is being preen'ed, | |
1282 | as it would have caused a fatal error earlier. | |
1283 | .LP | |
1284 | Possible responses to the CLEAR prompt are: | |
1285 | .IP YES | |
1286 | de-allocate inode \fII\fP by zeroing its contents. | |
1287 | .IP NO | |
1288 | ignore this error condition. | |
a38b2411 KM |
1289 | .NH 2 |
1290 | Phase 5 - Check Cyl groups | |
1291 | .PP | |
6a1194d8 | 1292 | This phase concerns itself with the free-block and used-inode maps. |
a38b2411 KM |
1293 | This section lists error conditions resulting from |
1294 | allocated blocks in the free-block maps, | |
1295 | free blocks missing from free-block maps, | |
1296 | and the total free-block count incorrect. | |
6a1194d8 KM |
1297 | It also lists error conditions resulting from |
1298 | free inodes in the used-inode maps, | |
1299 | allocated inodes missing from used-inode maps, | |
1300 | and the total used-inode count incorrect. | |
a38b2411 KM |
1301 | .sp |
1302 | .LP | |
1303 | .B "CG \fIC\fP: BAD MAGIC NUMBER" | |
1304 | .br | |
1305 | The magic number of cylinder group \fIC\fP is wrong. | |
1306 | This usually indicates that the cylinder group maps have been destroyed. | |
1307 | When running manually the cylinder group is marked as needing | |
1308 | to be reconstructed. | |
1309 | This error is fatal if the file system is being preen'ed. | |
1310 | .sp | |
1311 | .LP | |
6a1194d8 | 1312 | .B "BLK(S) MISSING IN BIT MAPS (SALVAGE)" |
a38b2411 | 1313 | .br |
6a1194d8 KM |
1314 | A cylinder group block map is missing some free blocks. |
1315 | During preen'ing the maps are reconstructed. | |
a38b2411 | 1316 | .LP |
6a1194d8 | 1317 | Possible responses to the SALVAGE prompt are: |
a38b2411 | 1318 | .IP YES |
6a1194d8 | 1319 | reconstruct the free block map. |
a38b2411 | 1320 | .IP NO |
6a1194d8 | 1321 | ignore this error condition. |
a38b2411 KM |
1322 | .sp |
1323 | .LP | |
6a1194d8 | 1324 | .B "SUMMARY INFORMATION BAD (SALVAGE)" |
a38b2411 | 1325 | .br |
6a1194d8 | 1326 | The summary information was found to be incorrect. |
a38b2411 KM |
1327 | When preen'ing, |
1328 | the summary information is recomputed. | |
a38b2411 KM |
1329 | .LP |
1330 | Possible responses to the SALVAGE prompt are: | |
1331 | .IP YES | |
6a1194d8 | 1332 | reconstruct the summary information. |
a38b2411 KM |
1333 | .IP NO |
1334 | ignore this error condition. | |
1335 | .sp | |
1336 | .LP | |
6a1194d8 | 1337 | .B "FREE BLK COUNT(S) WRONG IN SUPERBLOCK (SALVAGE)" |
a38b2411 | 1338 | .br |
6a1194d8 | 1339 | The superblock free block information was found to be incorrect. |
a38b2411 | 1340 | When preen'ing, |
6a1194d8 | 1341 | the superblock free block information is recomputed. |
a38b2411 | 1342 | .LP |
6a1194d8 | 1343 | Possible responses to the SALVAGE prompt are: |
a38b2411 | 1344 | .IP YES |
6a1194d8 | 1345 | reconstruct the superblock free block information. |
a38b2411 KM |
1346 | .IP NO |
1347 | ignore this error condition. | |
1348 | .NH 2 | |
a38b2411 KM |
1349 | Cleanup |
1350 | .PP | |
1351 | Once a file system has been checked, a few cleanup functions are performed. | |
1352 | This section lists advisory messages about | |
1353 | the file system | |
1354 | and modify status of the file system. | |
1355 | .sp | |
1356 | .LP | |
1357 | .B "\fIV\fP files, \fIW\fP used, \fIX\fP free (\fIY\fP frags, \fIZ\fP blocks)" | |
1358 | .br | |
1359 | This is an advisory message indicating that | |
1360 | the file system checked contained | |
1361 | \fIV\fP files using | |
1362 | \fIW\fP fragment sized blocks leaving | |
1363 | \fIX\fP fragment sized blocks free in the file system. | |
1364 | The numbers in parenthesis breaks the free count down into | |
1365 | \fIY\fP free fragments and | |
1366 | \fIZ\fP free full sized blocks. | |
1367 | .sp | |
1368 | .LP | |
1369 | .B "***** REBOOT UNIX *****" | |
1370 | .br | |
1371 | This is an advisory message indicating that | |
1372 | the root file system has been modified by | |
1373 | .I fsck. | |
1374 | If UNIX is not rebooted immediately, | |
1375 | the work done by | |
1376 | .I fsck | |
1377 | may be undone by the in-core copies of tables | |
1378 | UNIX keeps. | |
1379 | When preen'ing, | |
1380 | .I fsck | |
1381 | will exit with a code of 4. | |
145bc69d KM |
1382 | The standard auto-reboot script distributed with 4.3BSD |
1383 | interprets an exit code of 4 by issuing a reboot system call. | |
a38b2411 KM |
1384 | .sp |
1385 | .LP | |
1386 | .B "***** FILE SYSTEM WAS MODIFIED *****" | |
1387 | .br | |
1388 | This is an advisory message indicating that | |
1389 | the current file system was modified by | |
1390 | .I fsck. | |
1391 | If this file system is mounted or is the current root file system, | |
1392 | .I fsck | |
1393 | should be halted and UNIX rebooted. | |
1394 | If UNIX is not rebooted immediately, | |
1395 | the work done by | |
1396 | .I fsck | |
1397 | may be undone by the in-core copies of tables | |
1398 | UNIX keeps. |