1 .\" $NetBSD: 4.t,v 1.4 2001/11/21 19:14:25 wiz Exp $
3 .\" Copyright (c) 1982, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)4.t 8.1 (Berkeley) 6/5/93
32 .ds RH Appendix A \- Fsck_ffs Error Conditions
34 Appendix A \- Fsck_ffs Error Conditions
40 a multi-pass file system check program.
41 Each file system pass invokes a different Phase of the
44 After the initial setup,
46 performs successive Phases over each file system,
47 checking blocks and sizes,
51 and the map of free blocks,
52 (possibly rebuilding it),
53 and performs some cleanup.
57 is run non-interactively to
59 the file systems after an unclean halt.
60 While preen'ing a file system,
61 it will only fix corruptions that are expected
62 to occur from an unclean halt.
63 These actions are a proper subset of the actions that
65 will take when it is running interactively.
66 Throughout this appendix many errors have several options
67 that the operator can take.
68 When an inconsistency is detected,
70 reports the error condition to the operator.
71 If a response is required,
73 prints a prompt message and
75 When preen'ing most errors are fatal.
76 For those that are expected,
77 the response taken is noted.
78 This appendix explains the meaning of each error condition,
79 the possible responses, and the related error conditions.
81 The error conditions are organized by the
85 program in which they can occur.
86 The error conditions that may occur
87 in more than one Phase
88 will be discussed in initialization.
92 Before a file system check can be performed, certain
93 tables have to be set up and certain files opened.
94 This section concerns itself with the opening of files and
95 the initialization of tables.
96 This section lists error conditions resulting from
101 file system size checks,
102 and creation of the scratch file.
103 All the initialization errors are fatal
104 when the file system is being preen'ed.
109 \fIC\fP is not a legal option to
111 legal options are \-b, \-c, \-y, \-n, and \-p.
113 terminates on this error condition.
116 manual entry for further detail.
119 .B "cannot alloc NNN bytes for blockmap"
121 .B "cannot alloc NNN bytes for freemap"
123 .B "cannot alloc NNN bytes for statemap"
125 .B "cannot alloc NNN bytes for lncntp"
128 request for memory for its virtual
129 memory tables failed.
130 This should never happen.
132 terminates on this error condition.
136 .B "Can't open checklist file: \fIF\fP"
138 The file system checklist file
141 can not be opened for reading.
143 terminates on this error condition.
144 Check access modes of \fIF\fP.
150 request for statistics about the root directory ``/'' failed.
151 This should never happen.
153 terminates on this error condition.
157 .B "Can't stat \fIF\fP"
159 .B "Can't make sense out of name \fIF\fP"
162 request for statistics about the file system \fIF\fP failed.
163 When running manually,
164 it ignores this file system
165 and continues checking the next file system given.
166 Check access modes of \fIF\fP.
169 .B "Can't open \fIF\fP"
172 request attempt to open the file system \fIF\fP failed.
173 When running manually, it ignores this file system
174 and continues checking the next file system given.
175 Check access modes of \fIF\fP.
178 .B "\fIF\fP: (NO WRITE)"
180 Either the \-n flag was specified or
182 attempt to open the file system \fIF\fP for writing failed.
183 When running manually,
184 all the diagnostics are printed out,
185 but no modifications are attempted to fix them.
188 .B "file is not a block or character device; OK"
192 a regular file name by mistake.
193 Check the type of the file specified.
195 Possible responses to the OK prompt are:
197 ignore this error condition.
199 ignore this file system and continues checking
200 the next file system given.
203 .B "UNDEFINED OPTIMIZATION IN SUPERBLOCK (SET TO DEFAULT)"
205 The superblock optimization parameter is neither OPT_TIME
208 Possible responses to the SET TO DEFAULT prompt are:
210 The superblock is set to request optimization to minimize
211 running time of the system.
212 (If optimization to minimize disk space utilization is
213 desired, it can be set using \fItunefs\fP(8).)
215 ignore this error condition.
218 .B "IMPOSSIBLE MINFREE=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)"
220 The superblock minimum space percentage is greater than 99%
223 Possible responses to the SET TO DEFAULT prompt are:
225 The minfree parameter is set to 10%.
226 (If some other percentage is desired,
227 it can be set using \fItunefs\fP(8).)
229 ignore this error condition.
232 .B "IMPOSSIBLE INTERLEAVE=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)"
234 The file system interleave is less than or equal to zero.
236 Possible responses to the SET TO DEFAULT prompt are:
238 The interleave parameter is set to 1.
240 ignore this error condition.
243 .B "IMPOSSIBLE NPSECT=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)"
245 The number of physical sectors per track is less than the number
246 of usable sectors per track.
248 Possible responses to the SET TO DEFAULT prompt are:
250 The npsect parameter is set to the number of usable sectors per track.
252 ignore this error condition.
255 One of the following messages will appear:
257 .B "MAGIC NUMBER WRONG"
259 .B "NCG OUT OF RANGE"
261 .B "CPG OUT OF RANGE"
263 .B "NCYL DOES NOT JIVE WITH NCG*CPG"
265 .B "SIZE PREPOSTEROUSLY LARGE"
267 .B "TRASHED VALUES IN SUPER BLOCK"
269 and will be followed by the message:
271 .B "\fIF\fP: BAD SUPER BLOCK: \fIB\fP"
273 .B "USE -b OPTION TO FSCK_FFS TO SPECIFY LOCATION OF AN ALTERNATE"
275 .B "SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck_ffs(8)."
277 The super block has been corrupted.
278 An alternative super block must be selected from among those
281 (8) when the file system was created.
282 For file systems with a blocksize less than 32K,
283 specifying \-b 32 is a good first choice.
286 .B "INTERNAL INCONSISTENCY: \fIM\fP"
289 has had an internal panic, whose message is specified as \fIM\fP.
290 This should never happen.
294 .B "CAN NOT SEEK: BLK \fIB\fP (CONTINUE)"
297 request for moving to a specified block number \fIB\fP in
298 the file system failed.
299 This should never happen.
302 Possible responses to the CONTINUE prompt are:
304 attempt to continue to run the file system check.
306 however the problem will persist.
307 This error condition will not allow a complete check of the file system.
310 should be made to re-check this file system.
311 If the block was part of the virtual memory buffer
314 will terminate with the message ``Fatal I/O error''.
316 terminate the program.
319 .B "CAN NOT READ: BLK \fIB\fP (CONTINUE)"
322 request for reading a specified block number \fIB\fP in
323 the file system failed.
324 This should never happen.
327 Possible responses to the CONTINUE prompt are:
329 attempt to continue to run the file system check.
330 It will retry the read and print out the message:
332 .B "THE FOLLOWING SECTORS COULD NOT BE READ: \fIN\fP"
334 where \fIN\fP indicates the sectors that could not be read.
337 ever tries to write back one of the blocks on which the read failed
338 it will print the message:
340 .B "WRITING ZERO'ED BLOCK \fIN\fP TO DISK"
342 where \fIN\fP indicates the sector that was written with zero's.
343 If the disk is experiencing hardware problems, the problem will persist.
344 This error condition will not allow a complete check of the file system.
347 should be made to re-check this file system.
348 If the block was part of the virtual memory buffer
351 will terminate with the message ``Fatal I/O error''.
353 terminate the program.
356 .B "CAN NOT WRITE: BLK \fIB\fP (CONTINUE)"
359 request for writing a specified block number \fIB\fP
360 in the file system failed.
361 The disk is write-protected;
362 check the write protect lock on the drive.
363 If that is not the problem, see a guru.
365 Possible responses to the CONTINUE prompt are:
367 attempt to continue to run the file system check.
368 The write operation will be retried with the failed blocks
369 indicated by the message:
371 .B "THE FOLLOWING SECTORS COULD NOT BE WRITTEN: \fIN\fP"
373 where \fIN\fP indicates the sectors that could not be written.
374 If the disk is experiencing hardware problems, the problem will persist.
375 This error condition will not allow a complete check of the file system.
378 should be made to re-check this file system.
379 If the block was part of the virtual memory buffer
382 will terminate with the message ``Fatal I/O error''.
384 terminate the program.
387 .B "bad inode number DDD to ginode"
389 An internal error has attempted to read non-existent inode \fIDDD\fP.
395 Phase 1 \- Check Blocks and Sizes
397 This phase concerns itself with
399 This section lists error conditions resulting from
400 checking inode types,
401 setting up the zero-link-count table,
402 examining inode block numbers for bad or duplicate blocks,
404 and checking inode format.
405 All errors in this phase except
406 .B "INCORRECT BLOCK COUNT"
408 .B "PARTIALLY TRUNCATED INODE"
409 are fatal if the file system is being preen'ed.
412 .B "UNKNOWN FILE TYPE I=\fII\fP (CLEAR)"
414 The mode word of the inode \fII\fP indicates that the inode is not a
415 special block inode, special character inode, socket inode, regular inode,
416 symbolic link, or directory inode.
418 Possible responses to the CLEAR prompt are:
420 de-allocate inode \fII\fP by zeroing its contents.
421 This will always invoke the UNALLOCATED error condition in Phase 2
422 for each directory entry pointing to this inode.
424 ignore this error condition.
427 .B "PARTIALLY TRUNCATED INODE I=\fII\fP (SALVAGE)"
430 has found inode \fII\fP whose size is shorter than the number of
431 blocks allocated to it.
432 This condition should only occur if the system crashes while in the
433 midst of truncating a file.
434 When preen'ing the file system,
436 completes the truncation to the specified size.
438 Possible responses to SALVAGE are:
440 complete the truncation to the size specified in the inode.
442 ignore this error condition.
445 .B "LINK COUNT TABLE OVERFLOW (CONTINUE)"
447 An internal table for
449 containing allocated inodes with a link count of
450 zero cannot allocate more memory.
451 Increase the virtual memory for
454 Possible responses to the CONTINUE prompt are:
456 continue with the program.
457 This error condition will not allow a complete check of the file system.
460 should be made to re-check this file system.
461 If another allocated inode with a zero link count is found,
462 this error condition is repeated.
464 terminate the program.
467 .B "\fIB\fP BAD I=\fII\fP"
469 Inode \fII\fP contains block number \fIB\fP with a number
470 lower than the number of the first data block in the file system or
471 greater than the number of the last block
473 This error condition may invoke the
474 .B "EXCESSIVE BAD BLKS"
475 error condition in Phase 1 (see next paragraph) if
476 inode \fII\fP has too many block numbers outside the file system range.
477 This error condition will always invoke the
479 error condition in Phase 2 and Phase 4.
482 .B "EXCESSIVE BAD BLKS I=\fII\fP (CONTINUE)"
484 There is more than a tolerable number (usually 10) of blocks with a number
485 lower than the number of the first data block in the file system or greater than
486 the number of last block in the file system associated with inode \fII\fP.
488 Possible responses to the CONTINUE prompt are:
490 ignore the rest of the blocks in this inode
491 and continue checking with the next inode in the file system.
492 This error condition will not allow a complete check of the file system.
495 should be made to re-check this file system.
497 terminate the program.
500 .B "BAD STATE DDD TO BLKERR"
502 An internal error has scrambled
504 state map to have the impossible value \fIDDD\fP.
510 .B "\fIB\fP DUP I=\fII\fP"
512 Inode \fII\fP contains block number \fIB\fP that is already claimed by
514 This error condition may invoke the
515 .B "EXCESSIVE DUP BLKS"
516 error condition in Phase 1 if
517 inode \fII\fP has too many block numbers claimed by other inodes.
518 This error condition will always invoke Phase 1b and the
520 error condition in Phase 2 and Phase 4.
523 .B "EXCESSIVE DUP BLKS I=\fII\fP (CONTINUE)"
525 There is more than a tolerable number (usually 10) of blocks claimed by other
528 Possible responses to the CONTINUE prompt are:
530 ignore the rest of the blocks in this inode
531 and continue checking with the next inode in the file system.
532 This error condition will not allow a complete check of the file system.
535 should be made to re-check this file system.
537 terminate the program.
540 .B "DUP TABLE OVERFLOW (CONTINUE)"
544 containing duplicate block numbers cannot allocate any more space.
545 Increase the amount of virtual memory available to
548 Possible responses to the CONTINUE prompt are:
550 continue with the program.
551 This error condition will not allow a complete check of the file system.
554 should be made to re-check this file system.
555 If another duplicate block is found, this error condition will repeat.
557 terminate the program.
560 .B "PARTIALLY ALLOCATED INODE I=\fII\fP (CLEAR)"
562 Inode \fII\fP is neither allocated nor unallocated.
564 Possible responses to the CLEAR prompt are:
566 de-allocate inode \fII\fP by zeroing its contents.
568 ignore this error condition.
571 .B "INCORRECT BLOCK COUNT I=\fII\fP (\fIX\fP should be \fIY\fP) (CORRECT)"
573 The block count for inode \fII\fP is \fIX\fP blocks,
574 but should be \fIY\fP blocks.
575 When preen'ing the count is corrected.
577 Possible responses to the CORRECT prompt are:
579 replace the block count of inode \fII\fP with \fIY\fP.
581 ignore this error condition.
583 Phase 1B: Rescan for More Dups
585 When a duplicate block is found in the file system, the file system is
586 rescanned to find the inode that previously claimed that block.
587 This section lists the error condition when the duplicate block is found.
590 .B "\fIB\fP DUP I=\fII\fP"
592 Inode \fII\fP contains block number \fIB\fP that
593 is already claimed by another inode.
594 This error condition will always invoke the
596 error condition in Phase 2.
597 You can determine which inodes have overlapping blocks by examining
598 this error condition and the DUP error condition in Phase 1.
600 Phase 2 \- Check Pathnames
602 This phase concerns itself with removing directory entries
604 error conditioned inodes
605 from Phase 1 and Phase 1b.
606 This section lists error conditions resulting from
607 root inode mode and status,
608 directory inode pointers in range,
609 and directory entries pointing to bad inodes,
610 and directory integrity checks.
611 All errors in this phase are fatal if the file system is being preen'ed,
612 except for directories not being a multiple of the blocks size
613 and extraneous hard links.
616 .B "ROOT INODE UNALLOCATED (ALLOCATE)"
618 The root inode (usually inode number 2) has no allocate mode bits.
619 This should never happen.
621 Possible responses to the ALLOCATE prompt are:
623 allocate inode 2 as the root inode.
624 The files and directories usually found in the root will be recovered
625 in Phase 3 and put into
627 If the attempt to allocate the root fails,
629 will exit with the message:
631 .B "CANNOT ALLOCATE ROOT INODE" .
637 .B "ROOT INODE NOT DIRECTORY (REALLOCATE)"
639 The root inode (usually inode number 2)
640 is not directory inode type.
642 Possible responses to the REALLOCATE prompt are:
644 clear the existing contents of the root inode
646 The files and directories usually found in the root will be recovered
647 in Phase 3 and put into
649 If the attempt to allocate the root fails,
651 will exit with the message:
653 .B "CANNOT ALLOCATE ROOT INODE" .
656 will then prompt with
659 Possible responses to the FIX prompt are:
661 replace the root inode's type to be a directory.
662 If the root inode's data blocks are not directory blocks,
663 many error conditions will be produced.
665 terminate the program.
668 .B "DUPS/BAD IN ROOT INODE (REALLOCATE)"
670 Phase 1 or Phase 1b have found duplicate blocks
671 or bad blocks in the root inode (usually inode number 2) for the file system.
673 Possible responses to the REALLOCATE prompt are:
675 clear the existing contents of the root inode
677 The files and directories usually found in the root will be recovered
678 in Phase 3 and put into
680 If the attempt to allocate the root fails,
682 will exit with the message:
684 .B "CANNOT ALLOCATE ROOT INODE" .
687 will then prompt with
690 Possible responses to the CONTINUE prompt are:
694 error condition in the root inode and
695 attempt to continue to run the file system check.
696 If the root inode is not correct,
697 then this may result in many other error conditions.
699 terminate the program.
702 .B "NAME TOO LONG \fIF\fP"
704 An excessively long path name has been found.
705 This usually indicates loops in the file system name space.
706 This can occur if the super user has made circular links to directories.
707 The offending links must be removed (by a guru).
710 .B "I OUT OF RANGE I=\fII\fP NAME=\fIF\fP (REMOVE)"
712 A directory entry \fIF\fP has an inode number \fII\fP that is greater than
713 the end of the inode list.
715 Possible responses to the REMOVE prompt are:
717 the directory entry \fIF\fP is removed.
719 ignore this error condition.
722 .B "UNALLOCATED I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP \fItype\fP=\fIF\fP (REMOVE)"
724 A directory or file entry \fIF\fP points to an unallocated inode \fII\fP.
725 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
726 and name \fIF\fP are printed.
728 Possible responses to the REMOVE prompt are:
730 the directory entry \fIF\fP is removed.
732 ignore this error condition.
735 .B "DUP/BAD I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP \fItype\fP=\fIF\fP (REMOVE)"
737 Phase 1 or Phase 1b have found duplicate blocks or bad blocks
738 associated with directory or file entry \fIF\fP, inode \fII\fP.
739 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
740 and directory name \fIF\fP are printed.
742 Possible responses to the REMOVE prompt are:
744 the directory entry \fIF\fP is removed.
746 ignore this error condition.
749 .B "ZERO LENGTH DIRECTORY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (REMOVE)"
751 A directory entry \fIF\fP has a size \fIS\fP that is zero.
752 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
753 and directory name \fIF\fP are printed.
755 Possible responses to the REMOVE prompt are:
757 the directory entry \fIF\fP is removed;
758 this will always invoke the BAD/DUP error condition in Phase 4.
760 ignore this error condition.
763 .B "DIRECTORY TOO SHORT I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
765 A directory \fIF\fP has been found whose size \fIS\fP
766 is less than the minimum size directory.
767 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
768 and directory name \fIF\fP are printed.
770 Possible responses to the FIX prompt are:
772 increase the size of the directory to the minimum directory size.
774 ignore this directory.
777 .B "DIRECTORY \fIF\fP LENGTH \fIS\fP NOT MULTIPLE OF \fIB\fP (ADJUST)
779 A directory \fIF\fP has been found with size \fIS\fP that is not
780 a multiple of the directory blocksize \fIB\fP.
782 Possible responses to the ADJUST prompt are:
784 the length is rounded up to the appropriate block size.
785 This error can occur on 4.2BSD file systems.
786 Thus when preen'ing the file system only a warning is printed
787 and the directory is adjusted.
789 ignore the error condition.
792 .B "DIRECTORY CORRUPTED I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (SALVAGE)"
794 A directory with an inconsistent internal state has been found.
796 Possible responses to the FIX prompt are:
798 throw away all entries up to the next directory boundary (usually 512-byte)
800 This drastic action can throw away up to 42 entries,
801 and should be taken only after other recovery efforts have failed.
803 skip up to the next directory boundary and resume reading,
804 but do not modify the directory.
807 .B "BAD INODE NUMBER FOR `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
809 A directory \fII\fP has been found whose inode number for `.' does
810 does not equal \fII\fP.
812 Possible responses to the FIX prompt are:
814 change the inode number for `.' to be equal to \fII\fP.
816 leave the inode number for `.' unchanged.
819 .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
821 A directory \fII\fP has been found whose first entry is unallocated.
823 Possible responses to the FIX prompt are:
825 build an entry for `.' with inode number equal to \fII\fP.
827 leave the directory unchanged.
830 .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
832 .B "CANNOT FIX, FIRST ENTRY IN DIRECTORY CONTAINS \fIF\fP"
834 A directory \fII\fP has been found whose first entry is \fIF\fP.
836 cannot resolve this problem.
837 The file system should be mounted and the offending entry \fIF\fP
839 The file system should then be unmounted and
844 .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
846 .B "CANNOT FIX, INSUFFICIENT SPACE TO ADD `.'"
848 A directory \fII\fP has been found whose first entry is not `.'.
850 cannot resolve this problem as it should never happen.
854 .B "EXTRA `.' ENTRY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
856 A directory \fII\fP has been found that has more than one entry for `.'.
858 Possible responses to the FIX prompt are:
860 remove the extra entry for `.'.
862 leave the directory unchanged.
865 .B "BAD INODE NUMBER FOR `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
867 A directory \fII\fP has been found whose inode number for `..' does
868 does not equal the parent of \fII\fP.
870 Possible responses to the FIX prompt are:
872 change the inode number for `..' to be equal to the parent of \fII\fP
873 (``\fB..\fP'' in the root inode points to itself).
875 leave the inode number for `..' unchanged.
878 .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
880 A directory \fII\fP has been found whose second entry is unallocated.
882 Possible responses to the FIX prompt are:
884 build an entry for `..' with inode number equal to the parent of \fII\fP
885 (``\fB..\fP'' in the root inode points to itself).
887 leave the directory unchanged.
890 .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
892 .B "CANNOT FIX, SECOND ENTRY IN DIRECTORY CONTAINS \fIF\fP"
894 A directory \fII\fP has been found whose second entry is \fIF\fP.
896 cannot resolve this problem.
897 The file system should be mounted and the offending entry \fIF\fP
899 The file system should then be unmounted and
904 .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
906 .B "CANNOT FIX, INSUFFICIENT SPACE TO ADD `..'"
908 A directory \fII\fP has been found whose second entry is not `..'.
910 cannot resolve this problem.
911 The file system should be mounted and the second entry in the directory
913 The file system should then be unmounted and
918 .B "EXTRA `..' ENTRY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
920 A directory \fII\fP has been found that has more than one entry for `..'.
922 Possible responses to the FIX prompt are:
924 remove the extra entry for `..'.
926 leave the directory unchanged.
929 .B "\fIN\fP IS AN EXTRANEOUS HARD LINK TO A DIRECTORY \fID\fP (REMOVE)
932 has found a hard link, \fIN\fP, to a directory, \fID\fP.
933 When preen'ing the extraneous links are ignored.
935 Possible responses to the REMOVE prompt are:
937 delete the extraneous entry, \fIN\fP.
939 ignore the error condition.
942 .B "BAD INODE \fIS\fP TO DESCEND"
944 An internal error has caused an impossible state \fIS\fP to be passed to the
945 routine that descends the file system directory structure.
951 .B "BAD RETURN STATE \fIS\fP FROM DESCEND"
953 An internal error has caused an impossible state \fIS\fP to be returned
954 from the routine that descends the file system directory structure.
960 .B "BAD STATE \fIS\fP FOR ROOT INODE"
962 An internal error has caused an impossible state \fIS\fP to be assigned
968 Phase 3 \- Check Connectivity
970 This phase concerns itself with the directory connectivity seen in
972 This section lists error conditions resulting from
973 unreferenced directories,
979 .B "UNREF DIR I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (RECONNECT)"
981 The directory inode \fII\fP was not connected to a directory entry
982 when the file system was traversed.
983 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and
984 modify time \fIT\fP of directory inode \fII\fP are printed.
985 When preen'ing, the directory is reconnected if its size is non-zero,
986 otherwise it is cleared.
988 Possible responses to the RECONNECT prompt are:
990 reconnect directory inode \fII\fP to the file system in the
991 directory for lost files (usually \fIlost+found\fP).
994 error condition in Phase 3
995 if there are problems connecting directory inode \fII\fP to \fIlost+found\fP.
996 This may also invoke the CONNECTED error condition in Phase 3 if the link
999 ignore this error condition.
1000 This will always invoke the UNREF error condition in Phase 4.
1003 .B "NO lost+found DIRECTORY (CREATE)"
1007 directory in the root directory of the file system;
1010 tries to create a \fIlost+found\fP directory.
1012 Possible responses to the CREATE prompt are:
1014 create a \fIlost+found\fP directory in the root of the file system.
1015 This may raise the message:
1017 .B "NO SPACE LEFT IN / (EXPAND)"
1019 See below for the possible responses.
1020 Inability to create a \fIlost+found\fP directory generates the message:
1022 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1024 and aborts the attempt to linkup the lost inode.
1025 This will always invoke the UNREF error condition in Phase 4.
1027 abort the attempt to linkup the lost inode.
1028 This will always invoke the UNREF error condition in Phase 4.
1031 .B "lost+found IS NOT A DIRECTORY (REALLOCATE)"
1037 Possible responses to the REALLOCATE prompt are:
1039 allocate a directory inode, and change \fIlost+found\fP to reference it.
1040 The previous inode reference by the \fIlost+found\fP name is not cleared.
1041 Thus it will either be reclaimed as an UNREF'ed inode or have its
1042 link count ADJUST'ed later in this Phase.
1043 Inability to create a \fIlost+found\fP directory generates the message:
1045 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1047 and aborts the attempt to linkup the lost inode.
1048 This will always invoke the UNREF error condition in Phase 4.
1050 abort the attempt to linkup the lost inode.
1051 This will always invoke the UNREF error condition in Phase 4.
1054 .B "NO SPACE LEFT IN /lost+found (EXPAND)"
1056 There is no space to add another entry to the
1058 directory in the root directory
1062 directory is expanded.
1064 Possible responses to the EXPAND prompt are:
1068 directory is expanded to make room for the new entry.
1069 If the attempted expansion fails
1073 .B "SORRY. NO SPACE IN lost+found DIRECTORY"
1075 and aborts the attempt to linkup the lost inode.
1076 This will always invoke the UNREF error condition in Phase 4.
1077 Clean out unnecessary entries in
1079 This error is fatal if the file system is being preen'ed.
1081 abort the attempt to linkup the lost inode.
1082 This will always invoke the UNREF error condition in Phase 4.
1085 .B "DIR I=\fII1\fP CONNECTED. PARENT WAS I=\fII2\fP"
1087 This is an advisory message indicating a directory inode \fII1\fP was
1088 successfully connected to the
1091 The parent inode \fII2\fP of the directory inode \fII1\fP is
1092 replaced by the inode number of the
1097 .B "DIRECTORY \fIF\fP LENGTH \fIS\fP NOT MULTIPLE OF \fIB\fP (ADJUST)
1099 A directory \fIF\fP has been found with size \fIS\fP that is not
1100 a multiple of the directory blocksize \fIB\fP
1101 (this can reoccur in Phase 3 if it is not adjusted in Phase 2).
1103 Possible responses to the ADJUST prompt are:
1105 the length is rounded up to the appropriate block size.
1106 This error can occur on 4.2BSD file systems.
1107 Thus when preen'ing the file system only a warning is printed
1108 and the directory is adjusted.
1110 ignore the error condition.
1113 .B "BAD INODE \fIS\fP TO DESCEND"
1115 An internal error has caused an impossible state \fIS\fP to be passed to the
1116 routine that descends the file system directory structure.
1121 Phase 4 \- Check Reference Counts
1123 This phase concerns itself with the link count information
1124 seen in Phase 2 and Phase 3.
1125 This section lists error conditions resulting from
1130 incorrect link counts for files, directories, symbolic links, or special files,
1131 unreferenced files, symbolic links, and directories,
1132 and bad or duplicate blocks in files, symbolic links, and directories.
1133 All errors in this phase are correctable if the file system is being preen'ed
1134 except running out of space in the \fIlost+found\fP directory.
1137 .B "UNREF FILE I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (RECONNECT)"
1139 Inode \fII\fP was not connected to a directory entry
1140 when the file system was traversed.
1141 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and
1142 modify time \fIT\fP of inode \fII\fP are printed.
1143 When preen'ing the file is cleared if either its size or its
1145 otherwise it is reconnected.
1147 Possible responses to the RECONNECT prompt are:
1149 reconnect inode \fII\fP to the file system in the directory for
1150 lost files (usually \fIlost+found\fP).
1153 error condition in Phase 4
1154 if there are problems connecting inode \fII\fP to
1157 ignore this error condition.
1158 This will always invoke the CLEAR error condition in Phase 4.
1163 The inode mentioned in the immediately previous error condition can not be
1165 This cannot occur if the file system is being preen'ed,
1166 since lack of space to reconnect files is a fatal error.
1168 Possible responses to the CLEAR prompt are:
1170 de-allocate the inode mentioned in the immediately previous error condition by zeroing its contents.
1172 ignore this error condition.
1175 .B "NO lost+found DIRECTORY (CREATE)"
1179 directory in the root directory of the file system;
1182 tries to create a \fIlost+found\fP directory.
1184 Possible responses to the CREATE prompt are:
1186 create a \fIlost+found\fP directory in the root of the file system.
1187 This may raise the message:
1189 .B "NO SPACE LEFT IN / (EXPAND)"
1191 See below for the possible responses.
1192 Inability to create a \fIlost+found\fP directory generates the message:
1194 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1196 and aborts the attempt to linkup the lost inode.
1197 This will always invoke the UNREF error condition in Phase 4.
1199 abort the attempt to linkup the lost inode.
1200 This will always invoke the UNREF error condition in Phase 4.
1203 .B "lost+found IS NOT A DIRECTORY (REALLOCATE)"
1209 Possible responses to the REALLOCATE prompt are:
1211 allocate a directory inode, and change \fIlost+found\fP to reference it.
1212 The previous inode reference by the \fIlost+found\fP name is not cleared.
1213 Thus it will either be reclaimed as an UNREF'ed inode or have its
1214 link count ADJUST'ed later in this Phase.
1215 Inability to create a \fIlost+found\fP directory generates the message:
1217 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1219 and aborts the attempt to linkup the lost inode.
1220 This will always invoke the UNREF error condition in Phase 4.
1222 abort the attempt to linkup the lost inode.
1223 This will always invoke the UNREF error condition in Phase 4.
1226 .B "NO SPACE LEFT IN /lost+found (EXPAND)"
1228 There is no space to add another entry to the
1230 directory in the root directory
1234 directory is expanded.
1236 Possible responses to the EXPAND prompt are:
1240 directory is expanded to make room for the new entry.
1241 If the attempted expansion fails
1245 .B "SORRY. NO SPACE IN lost+found DIRECTORY"
1247 and aborts the attempt to linkup the lost inode.
1248 This will always invoke the UNREF error condition in Phase 4.
1249 Clean out unnecessary entries in
1251 This error is fatal if the file system is being preen'ed.
1253 abort the attempt to linkup the lost inode.
1254 This will always invoke the UNREF error condition in Phase 4.
1257 .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)"
1259 The link count for inode \fII\fP,
1260 is \fIX\fP but should be \fIY\fP.
1261 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and modify time \fIT\fP
1263 When preen'ing the link count is adjusted unless the number of references
1264 is increasing, a condition that should never occur unless precipitated
1265 by a hardware failure.
1266 When the number of references is increasing under preen mode,
1268 exits with the message:
1270 .B "LINK COUNT INCREASING"
1272 Possible responses to the ADJUST prompt are:
1274 replace the link count of file inode \fII\fP with \fIY\fP.
1276 ignore this error condition.
1279 .B "UNREF \fItype\fP I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (CLEAR)"
1281 Inode \fII\fP, was not connected to a directory entry when the
1282 file system was traversed.
1283 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP,
1284 and modify time \fIT\fP of inode \fII\fP
1287 this is a file that was not connected because its size or link count was zero,
1288 hence it is cleared.
1290 Possible responses to the CLEAR prompt are:
1292 de-allocate inode \fII\fP by zeroing its contents.
1294 ignore this error condition.
1297 .B "BAD/DUP \fItype\fP I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (CLEAR)"
1299 Phase 1 or Phase 1b have found duplicate blocks
1300 or bad blocks associated with
1302 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP,
1303 and modify time \fIT\fP of inode \fII\fP
1305 This error cannot arise when the file system is being preen'ed,
1306 as it would have caused a fatal error earlier.
1308 Possible responses to the CLEAR prompt are:
1310 de-allocate inode \fII\fP by zeroing its contents.
1312 ignore this error condition.
1314 Phase 5 - Check Cyl groups
1316 This phase concerns itself with the free-block and used-inode maps.
1317 This section lists error conditions resulting from
1318 allocated blocks in the free-block maps,
1319 free blocks missing from free-block maps,
1320 and the total free-block count incorrect.
1321 It also lists error conditions resulting from
1322 free inodes in the used-inode maps,
1323 allocated inodes missing from used-inode maps,
1324 and the total used-inode count incorrect.
1327 .B "CG \fIC\fP: BAD MAGIC NUMBER"
1329 The magic number of cylinder group \fIC\fP is wrong.
1330 This usually indicates that the cylinder group maps have been destroyed.
1331 When running manually the cylinder group is marked as needing
1332 to be reconstructed.
1333 This error is fatal if the file system is being preen'ed.
1336 .B "BLK(S) MISSING IN BIT MAPS (SALVAGE)"
1338 A cylinder group block map is missing some free blocks.
1339 During preen'ing the maps are reconstructed.
1341 Possible responses to the SALVAGE prompt are:
1343 reconstruct the free block map.
1345 ignore this error condition.
1348 .B "SUMMARY INFORMATION BAD (SALVAGE)"
1350 The summary information was found to be incorrect.
1352 the summary information is recomputed.
1354 Possible responses to the SALVAGE prompt are:
1356 reconstruct the summary information.
1358 ignore this error condition.
1361 .B "FREE BLK COUNT(S) WRONG IN SUPERBLOCK (SALVAGE)"
1363 The superblock free block information was found to be incorrect.
1365 the superblock free block information is recomputed.
1367 Possible responses to the SALVAGE prompt are:
1369 reconstruct the superblock free block information.
1371 ignore this error condition.
1375 Once a file system has been checked, a few cleanup functions are performed.
1376 This section lists advisory messages about
1378 and modify status of the file system.
1381 .B "\fIV\fP files, \fIW\fP used, \fIX\fP free (\fIY\fP frags, \fIZ\fP blocks)"
1383 This is an advisory message indicating that
1384 the file system checked contained
1386 \fIW\fP fragment sized blocks leaving
1387 \fIX\fP fragment sized blocks free in the file system.
1388 The numbers in parenthesis breaks the free count down into
1389 \fIY\fP free fragments and
1390 \fIZ\fP free full sized blocks.
1393 .B "***** REBOOT UNIX *****"
1395 This is an advisory message indicating that
1396 the root file system has been modified by
1398 If UNIX is not rebooted immediately,
1401 may be undone by the in-core copies of tables
1405 will exit with a code of 4.
1406 The standard auto-reboot script distributed with 4.3BSD
1407 interprets an exit code of 4 by issuing a reboot system call.
1410 .B "***** FILE SYSTEM WAS MODIFIED *****"
1412 This is an advisory message indicating that
1413 the current file system was modified by
1415 If this file system is mounted or is the current root file system,
1417 should be halted and UNIX rebooted.
1418 If UNIX is not rebooted immediately,
1421 may be undone by the in-core copies of tables