1 .\" Copyright (c) 1982, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 4. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" @(#)4.t 8.1 (Berkeley) 6/5/93
31 .ds RH Appendix A \- Fsck_ffs Error Conditions
33 Appendix A \- Fsck_ffs Error Conditions
39 a multi-pass file system check program.
40 Each file system pass invokes a different Phase of the
43 After the initial setup,
45 performs successive Phases over each file system,
46 checking blocks and sizes,
50 and the map of free blocks,
51 (possibly rebuilding it),
52 and performs some cleanup.
56 is run non-interactively to
58 the file systems after an unclean halt.
59 While preen'ing a file system,
60 it will only fix corruptions that are expected
61 to occur from an unclean halt.
62 These actions are a proper subset of the actions that
64 will take when it is running interactively.
65 Throughout this appendix many errors have several options
66 that the operator can take.
67 When an inconsistency is detected,
69 reports the error condition to the operator.
70 If a response is required,
72 prints a prompt message and
74 When preen'ing most errors are fatal.
75 For those that are expected,
76 the response taken is noted.
77 This appendix explains the meaning of each error condition,
78 the possible responses, and the related error conditions.
80 The error conditions are organized by the
84 program in which they can occur.
85 The error conditions that may occur
86 in more than one Phase
87 will be discussed in initialization.
91 Before a file system check can be performed, certain
92 tables have to be set up and certain files opened.
93 This section concerns itself with the opening of files and
94 the initialization of tables.
95 This section lists error conditions resulting from
100 file system size checks,
101 and creation of the scratch file.
102 All the initialization errors are fatal
103 when the file system is being preen'ed.
108 \fIC\fP is not a legal option to
110 legal options are \-b, \-c, \-y, \-n, and \-p.
112 terminates on this error condition.
115 manual entry for further detail.
118 .B "cannot alloc NNN bytes for blockmap"
120 .B "cannot alloc NNN bytes for freemap"
122 .B "cannot alloc NNN bytes for statemap"
124 .B "cannot alloc NNN bytes for lncntp"
127 request for memory for its virtual
128 memory tables failed.
129 This should never happen.
131 terminates on this error condition.
135 .B "Can't open checklist file: \fIF\fP"
137 The file system checklist file
140 can not be opened for reading.
142 terminates on this error condition.
143 Check access modes of \fIF\fP.
149 request for statistics about the root directory ``/'' failed.
150 This should never happen.
152 terminates on this error condition.
156 .B "Can't stat \fIF\fP"
158 .B "Can't make sense out of name \fIF\fP"
161 request for statistics about the file system \fIF\fP failed.
162 When running manually,
163 it ignores this file system
164 and continues checking the next file system given.
165 Check access modes of \fIF\fP.
168 .B "Can't open \fIF\fP"
171 request attempt to open the file system \fIF\fP failed.
172 When running manually, it ignores this file system
173 and continues checking the next file system given.
174 Check access modes of \fIF\fP.
177 .B "\fIF\fP: (NO WRITE)"
179 Either the \-n flag was specified or
181 attempt to open the file system \fIF\fP for writing failed.
182 When running manually,
183 all the diagnostics are printed out,
184 but no modifications are attempted to fix them.
187 .B "file is not a block or character device; OK"
191 a regular file name by mistake.
192 Check the type of the file specified.
194 Possible responses to the OK prompt are:
196 ignore this error condition.
198 ignore this file system and continues checking
199 the next file system given.
202 .B "UNDEFINED OPTIMIZATION IN SUPERBLOCK (SET TO DEFAULT)"
204 The superblock optimization parameter is neither OPT_TIME
207 Possible responses to the SET TO DEFAULT prompt are:
209 The superblock is set to request optimization to minimize
210 running time of the system.
211 (If optimization to minimize disk space utilization is
212 desired, it can be set using \fItunefs\fP(8).)
214 ignore this error condition.
217 .B "IMPOSSIBLE MINFREE=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)"
219 The superblock minimum space percentage is greater than 99%
222 Possible responses to the SET TO DEFAULT prompt are:
224 The minfree parameter is set to 10%.
225 (If some other percentage is desired,
226 it can be set using \fItunefs\fP(8).)
228 ignore this error condition.
231 .B "IMPOSSIBLE INTERLEAVE=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)"
233 The file system interleave is less than or equal to zero.
235 Possible responses to the SET TO DEFAULT prompt are:
237 The interleave parameter is set to 1.
239 ignore this error condition.
242 .B "IMPOSSIBLE NPSECT=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)"
244 The number of physical sectors per track is less than the number
245 of usable sectors per track.
247 Possible responses to the SET TO DEFAULT prompt are:
249 The npsect parameter is set to the number of usable sectors per track.
251 ignore this error condition.
254 One of the following messages will appear:
256 .B "MAGIC NUMBER WRONG"
258 .B "NCG OUT OF RANGE"
260 .B "CPG OUT OF RANGE"
262 .B "NCYL DOES NOT JIVE WITH NCG*CPG"
264 .B "SIZE PREPOSTEROUSLY LARGE"
266 .B "TRASHED VALUES IN SUPER BLOCK"
268 and will be followed by the message:
270 .B "\fIF\fP: BAD SUPER BLOCK: \fIB\fP"
272 .B "USE -b OPTION TO FSCK_FFS TO SPECIFY LOCATION OF AN ALTERNATE"
274 .B "SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck_ffs(8)."
276 The super block has been corrupted.
277 An alternative super block must be selected from among those
280 (8) when the file system was created.
281 For file systems with a blocksize less than 32K,
282 specifying \-b 32 is a good first choice.
285 .B "INTERNAL INCONSISTENCY: \fIM\fP"
288 has had an internal panic, whose message is specified as \fIM\fP.
289 This should never happen.
293 .B "CAN NOT SEEK: BLK \fIB\fP (CONTINUE)"
296 request for moving to a specified block number \fIB\fP in
297 the file system failed.
298 This should never happen.
301 Possible responses to the CONTINUE prompt are:
303 attempt to continue to run the file system check.
305 however the problem will persist.
306 This error condition will not allow a complete check of the file system.
309 should be made to re-check this file system.
310 If the block was part of the virtual memory buffer
313 will terminate with the message ``Fatal I/O error''.
315 terminate the program.
318 .B "CAN NOT READ: BLK \fIB\fP (CONTINUE)"
321 request for reading a specified block number \fIB\fP in
322 the file system failed.
323 This should never happen.
326 Possible responses to the CONTINUE prompt are:
328 attempt to continue to run the file system check.
329 It will retry the read and print out the message:
331 .B "THE FOLLOWING SECTORS COULD NOT BE READ: \fIN\fP"
333 where \fIN\fP indicates the sectors that could not be read.
336 ever tries to write back one of the blocks on which the read failed
337 it will print the message:
339 .B "WRITING ZERO'ED BLOCK \fIN\fP TO DISK"
341 where \fIN\fP indicates the sector that was written with zero's.
342 If the disk is experiencing hardware problems, the problem will persist.
343 This error condition will not allow a complete check of the file system.
346 should be made to re-check this file system.
347 If the block was part of the virtual memory buffer
350 will terminate with the message ``Fatal I/O error''.
352 terminate the program.
355 .B "CAN NOT WRITE: BLK \fIB\fP (CONTINUE)"
358 request for writing a specified block number \fIB\fP
359 in the file system failed.
360 The disk is write-protected;
361 check the write protect lock on the drive.
362 If that is not the problem, see a guru.
364 Possible responses to the CONTINUE prompt are:
366 attempt to continue to run the file system check.
367 The write operation will be retried with the failed blocks
368 indicated by the message:
370 .B "THE FOLLOWING SECTORS COULD NOT BE WRITTEN: \fIN\fP"
372 where \fIN\fP indicates the sectors that could not be written.
373 If the disk is experiencing hardware problems, the problem will persist.
374 This error condition will not allow a complete check of the file system.
377 should be made to re-check this file system.
378 If the block was part of the virtual memory buffer
381 will terminate with the message ``Fatal I/O error''.
383 terminate the program.
386 .B "bad inode number DDD to ginode"
388 An internal error has attempted to read non-existent inode \fIDDD\fP.
394 Phase 1 \- Check Blocks and Sizes
396 This phase concerns itself with
398 This section lists error conditions resulting from
399 checking inode types,
400 setting up the zero-link-count table,
401 examining inode block numbers for bad or duplicate blocks,
403 and checking inode format.
404 All errors in this phase except
405 .B "INCORRECT BLOCK COUNT"
407 .B "PARTIALLY TRUNCATED INODE"
408 are fatal if the file system is being preen'ed.
411 .B "UNKNOWN FILE TYPE I=\fII\fP (CLEAR)"
413 The mode word of the inode \fII\fP indicates that the inode is not a
414 special block inode, special character inode, socket inode, regular inode,
415 symbolic link, or directory inode.
417 Possible responses to the CLEAR prompt are:
419 de-allocate inode \fII\fP by zeroing its contents.
420 This will always invoke the UNALLOCATED error condition in Phase 2
421 for each directory entry pointing to this inode.
423 ignore this error condition.
426 .B "PARTIALLY TRUNCATED INODE I=\fII\fP (SALVAGE)"
429 has found inode \fII\fP whose size is shorter than the number of
430 blocks allocated to it.
431 This condition should only occur if the system crashes while in the
432 midst of truncating a file.
433 When preen'ing the file system,
435 completes the truncation to the specified size.
437 Possible responses to SALVAGE are:
439 complete the truncation to the size specified in the inode.
441 ignore this error condition.
444 .B "LINK COUNT TABLE OVERFLOW (CONTINUE)"
446 An internal table for
448 containing allocated inodes with a link count of
449 zero cannot allocate more memory.
450 Increase the virtual memory for
453 Possible responses to the CONTINUE prompt are:
455 continue with the program.
456 This error condition will not allow a complete check of the file system.
459 should be made to re-check this file system.
460 If another allocated inode with a zero link count is found,
461 this error condition is repeated.
463 terminate the program.
466 .B "\fIB\fP BAD I=\fII\fP"
468 Inode \fII\fP contains block number \fIB\fP with a number
469 lower than the number of the first data block in the file system or
470 greater than the number of the last block
472 This error condition may invoke the
473 .B "EXCESSIVE BAD BLKS"
474 error condition in Phase 1 (see next paragraph) if
475 inode \fII\fP has too many block numbers outside the file system range.
476 This error condition will always invoke the
478 error condition in Phase 2 and Phase 4.
481 .B "EXCESSIVE BAD BLKS I=\fII\fP (CONTINUE)"
483 There is more than a tolerable number (usually 10) of blocks with a number
484 lower than the number of the first data block in the file system or greater than
485 the number of last block in the file system associated with inode \fII\fP.
487 Possible responses to the CONTINUE prompt are:
489 ignore the rest of the blocks in this inode
490 and continue checking with the next inode in the file system.
491 This error condition will not allow a complete check of the file system.
494 should be made to re-check this file system.
496 terminate the program.
499 .B "BAD STATE DDD TO BLKERR"
501 An internal error has scrambled
503 state map to have the impossible value \fIDDD\fP.
509 .B "\fIB\fP DUP I=\fII\fP"
511 Inode \fII\fP contains block number \fIB\fP that is already claimed by
513 This error condition may invoke the
514 .B "EXCESSIVE DUP BLKS"
515 error condition in Phase 1 if
516 inode \fII\fP has too many block numbers claimed by other inodes.
517 This error condition will always invoke Phase 1b and the
519 error condition in Phase 2 and Phase 4.
522 .B "EXCESSIVE DUP BLKS I=\fII\fP (CONTINUE)"
524 There is more than a tolerable number (usually 10) of blocks claimed by other
527 Possible responses to the CONTINUE prompt are:
529 ignore the rest of the blocks in this inode
530 and continue checking with the next inode in the file system.
531 This error condition will not allow a complete check of the file system.
534 should be made to re-check this file system.
536 terminate the program.
539 .B "DUP TABLE OVERFLOW (CONTINUE)"
543 containing duplicate block numbers cannot allocate any more space.
544 Increase the amount of virtual memory available to
547 Possible responses to the CONTINUE prompt are:
549 continue with the program.
550 This error condition will not allow a complete check of the file system.
553 should be made to re-check this file system.
554 If another duplicate block is found, this error condition will repeat.
556 terminate the program.
559 .B "PARTIALLY ALLOCATED INODE I=\fII\fP (CLEAR)"
561 Inode \fII\fP is neither allocated nor unallocated.
563 Possible responses to the CLEAR prompt are:
565 de-allocate inode \fII\fP by zeroing its contents.
567 ignore this error condition.
570 .B "INCORRECT BLOCK COUNT I=\fII\fP (\fIX\fP should be \fIY\fP) (CORRECT)"
572 The block count for inode \fII\fP is \fIX\fP blocks,
573 but should be \fIY\fP blocks.
574 When preen'ing the count is corrected.
576 Possible responses to the CORRECT prompt are:
578 replace the block count of inode \fII\fP with \fIY\fP.
580 ignore this error condition.
582 Phase 1B: Rescan for More Dups
584 When a duplicate block is found in the file system, the file system is
585 rescanned to find the inode that previously claimed that block.
586 This section lists the error condition when the duplicate block is found.
589 .B "\fIB\fP DUP I=\fII\fP"
591 Inode \fII\fP contains block number \fIB\fP that
592 is already claimed by another inode.
593 This error condition will always invoke the
595 error condition in Phase 2.
596 You can determine which inodes have overlapping blocks by examining
597 this error condition and the DUP error condition in Phase 1.
599 Phase 2 \- Check Pathnames
601 This phase concerns itself with removing directory entries
603 error conditioned inodes
604 from Phase 1 and Phase 1b.
605 This section lists error conditions resulting from
606 root inode mode and status,
607 directory inode pointers in range,
608 and directory entries pointing to bad inodes,
609 and directory integrity checks.
610 All errors in this phase are fatal if the file system is being preen'ed,
611 except for directories not being a multiple of the blocks size
612 and extraneous hard links.
615 .B "ROOT INODE UNALLOCATED (ALLOCATE)"
617 The root inode (usually inode number 2) has no allocate mode bits.
618 This should never happen.
620 Possible responses to the ALLOCATE prompt are:
622 allocate inode 2 as the root inode.
623 The files and directories usually found in the root will be recovered
624 in Phase 3 and put into
626 If the attempt to allocate the root fails,
628 will exit with the message:
630 .B "CANNOT ALLOCATE ROOT INODE" .
636 .B "ROOT INODE NOT DIRECTORY (REALLOCATE)"
638 The root inode (usually inode number 2)
639 is not directory inode type.
641 Possible responses to the REALLOCATE prompt are:
643 clear the existing contents of the root inode
645 The files and directories usually found in the root will be recovered
646 in Phase 3 and put into
648 If the attempt to allocate the root fails,
650 will exit with the message:
652 .B "CANNOT ALLOCATE ROOT INODE" .
655 will then prompt with
658 Possible responses to the FIX prompt are:
660 replace the root inode's type to be a directory.
661 If the root inode's data blocks are not directory blocks,
662 many error conditions will be produced.
664 terminate the program.
667 .B "DUPS/BAD IN ROOT INODE (REALLOCATE)"
669 Phase 1 or Phase 1b have found duplicate blocks
670 or bad blocks in the root inode (usually inode number 2) for the file system.
672 Possible responses to the REALLOCATE prompt are:
674 clear the existing contents of the root inode
676 The files and directories usually found in the root will be recovered
677 in Phase 3 and put into
679 If the attempt to allocate the root fails,
681 will exit with the message:
683 .B "CANNOT ALLOCATE ROOT INODE" .
686 will then prompt with
689 Possible responses to the CONTINUE prompt are:
693 error condition in the root inode and
694 attempt to continue to run the file system check.
695 If the root inode is not correct,
696 then this may result in many other error conditions.
698 terminate the program.
701 .B "NAME TOO LONG \fIF\fP"
703 An excessively long path name has been found.
704 This usually indicates loops in the file system name space.
705 This can occur if the super user has made circular links to directories.
706 The offending links must be removed (by a guru).
709 .B "I OUT OF RANGE I=\fII\fP NAME=\fIF\fP (REMOVE)"
711 A directory entry \fIF\fP has an inode number \fII\fP that is greater than
712 the end of the inode list.
714 Possible responses to the REMOVE prompt are:
716 the directory entry \fIF\fP is removed.
718 ignore this error condition.
721 .B "UNALLOCATED I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP \fItype\fP=\fIF\fP (REMOVE)"
723 A directory or file entry \fIF\fP points to an unallocated inode \fII\fP.
724 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
725 and name \fIF\fP are printed.
727 Possible responses to the REMOVE prompt are:
729 the directory entry \fIF\fP is removed.
731 ignore this error condition.
734 .B "DUP/BAD I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP \fItype\fP=\fIF\fP (REMOVE)"
736 Phase 1 or Phase 1b have found duplicate blocks or bad blocks
737 associated with directory or file entry \fIF\fP, inode \fII\fP.
738 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
739 and directory name \fIF\fP are printed.
741 Possible responses to the REMOVE prompt are:
743 the directory entry \fIF\fP is removed.
745 ignore this error condition.
748 .B "ZERO LENGTH DIRECTORY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (REMOVE)"
750 A directory entry \fIF\fP has a size \fIS\fP that is zero.
751 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
752 and directory name \fIF\fP are printed.
754 Possible responses to the REMOVE prompt are:
756 the directory entry \fIF\fP is removed;
757 this will always invoke the BAD/DUP error condition in Phase 4.
759 ignore this error condition.
762 .B "DIRECTORY TOO SHORT I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
764 A directory \fIF\fP has been found whose size \fIS\fP
765 is less than the minimum size directory.
766 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
767 and directory name \fIF\fP are printed.
769 Possible responses to the FIX prompt are:
771 increase the size of the directory to the minimum directory size.
773 ignore this directory.
776 .B "DIRECTORY \fIF\fP LENGTH \fIS\fP NOT MULTIPLE OF \fIB\fP (ADJUST)
778 A directory \fIF\fP has been found with size \fIS\fP that is not
779 a multiple of the directory blocksize \fIB\fP.
781 Possible responses to the ADJUST prompt are:
783 the length is rounded up to the appropriate block size.
784 This error can occur on 4.2BSD file systems.
785 Thus when preen'ing the file system only a warning is printed
786 and the directory is adjusted.
788 ignore the error condition.
791 .B "DIRECTORY CORRUPTED I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (SALVAGE)"
793 A directory with an inconsistent internal state has been found.
795 Possible responses to the FIX prompt are:
797 throw away all entries up to the next directory boundary (usually 512-byte)
799 This drastic action can throw away up to 42 entries,
800 and should be taken only after other recovery efforts have failed.
802 skip up to the next directory boundary and resume reading,
803 but do not modify the directory.
806 .B "BAD INODE NUMBER FOR `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
808 A directory \fII\fP has been found whose inode number for `.' does
809 does not equal \fII\fP.
811 Possible responses to the FIX prompt are:
813 change the inode number for `.' to be equal to \fII\fP.
815 leave the inode number for `.' unchanged.
818 .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
820 A directory \fII\fP has been found whose first entry is unallocated.
822 Possible responses to the FIX prompt are:
824 build an entry for `.' with inode number equal to \fII\fP.
826 leave the directory unchanged.
829 .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
831 .B "CANNOT FIX, FIRST ENTRY IN DIRECTORY CONTAINS \fIF\fP"
833 A directory \fII\fP has been found whose first entry is \fIF\fP.
835 cannot resolve this problem.
836 The file system should be mounted and the offending entry \fIF\fP
838 The file system should then be unmounted and
843 .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
845 .B "CANNOT FIX, INSUFFICIENT SPACE TO ADD `.'"
847 A directory \fII\fP has been found whose first entry is not `.'.
849 cannot resolve this problem as it should never happen.
853 .B "EXTRA `.' ENTRY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
855 A directory \fII\fP has been found that has more than one entry for `.'.
857 Possible responses to the FIX prompt are:
859 remove the extra entry for `.'.
861 leave the directory unchanged.
864 .B "BAD INODE NUMBER FOR `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
866 A directory \fII\fP has been found whose inode number for `..' does
867 does not equal the parent of \fII\fP.
869 Possible responses to the FIX prompt are:
871 change the inode number for `..' to be equal to the parent of \fII\fP
872 (``\fB..\fP'' in the root inode points to itself).
874 leave the inode number for `..' unchanged.
877 .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
879 A directory \fII\fP has been found whose second entry is unallocated.
881 Possible responses to the FIX prompt are:
883 build an entry for `..' with inode number equal to the parent of \fII\fP
884 (``\fB..\fP'' in the root inode points to itself).
886 leave the directory unchanged.
889 .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
891 .B "CANNOT FIX, SECOND ENTRY IN DIRECTORY CONTAINS \fIF\fP"
893 A directory \fII\fP has been found whose second entry is \fIF\fP.
895 cannot resolve this problem.
896 The file system should be mounted and the offending entry \fIF\fP
898 The file system should then be unmounted and
903 .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
905 .B "CANNOT FIX, INSUFFICIENT SPACE TO ADD `..'"
907 A directory \fII\fP has been found whose second entry is not `..'.
909 cannot resolve this problem.
910 The file system should be mounted and the second entry in the directory
912 The file system should then be unmounted and
917 .B "EXTRA `..' ENTRY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
919 A directory \fII\fP has been found that has more than one entry for `..'.
921 Possible responses to the FIX prompt are:
923 remove the extra entry for `..'.
925 leave the directory unchanged.
928 .B "\fIN\fP IS AN EXTRANEOUS HARD LINK TO A DIRECTORY \fID\fP (REMOVE)
931 has found a hard link, \fIN\fP, to a directory, \fID\fP.
932 When preen'ing the extraneous links are ignored.
934 Possible responses to the REMOVE prompt are:
936 delete the extraneous entry, \fIN\fP.
938 ignore the error condition.
941 .B "BAD INODE \fIS\fP TO DESCEND"
943 An internal error has caused an impossible state \fIS\fP to be passed to the
944 routine that descends the file system directory structure.
950 .B "BAD RETURN STATE \fIS\fP FROM DESCEND"
952 An internal error has caused an impossible state \fIS\fP to be returned
953 from the routine that descends the file system directory structure.
959 .B "BAD STATE \fIS\fP FOR ROOT INODE"
961 An internal error has caused an impossible state \fIS\fP to be assigned
967 Phase 3 \- Check Connectivity
969 This phase concerns itself with the directory connectivity seen in
971 This section lists error conditions resulting from
972 unreferenced directories,
978 .B "UNREF DIR I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (RECONNECT)"
980 The directory inode \fII\fP was not connected to a directory entry
981 when the file system was traversed.
982 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and
983 modify time \fIT\fP of directory inode \fII\fP are printed.
984 When preen'ing, the directory is reconnected if its size is non-zero,
985 otherwise it is cleared.
987 Possible responses to the RECONNECT prompt are:
989 reconnect directory inode \fII\fP to the file system in the
990 directory for lost files (usually \fIlost+found\fP).
993 error condition in Phase 3
994 if there are problems connecting directory inode \fII\fP to \fIlost+found\fP.
995 This may also invoke the CONNECTED error condition in Phase 3 if the link
998 ignore this error condition.
999 This will always invoke the UNREF error condition in Phase 4.
1002 .B "NO lost+found DIRECTORY (CREATE)"
1006 directory in the root directory of the file system;
1009 tries to create a \fIlost+found\fP directory.
1011 Possible responses to the CREATE prompt are:
1013 create a \fIlost+found\fP directory in the root of the file system.
1014 This may raise the message:
1016 .B "NO SPACE LEFT IN / (EXPAND)"
1018 See below for the possible responses.
1019 Inability to create a \fIlost+found\fP directory generates the message:
1021 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1023 and aborts the attempt to linkup the lost inode.
1024 This will always invoke the UNREF error condition in Phase 4.
1026 abort the attempt to linkup the lost inode.
1027 This will always invoke the UNREF error condition in Phase 4.
1030 .B "lost+found IS NOT A DIRECTORY (REALLOCATE)"
1036 Possible responses to the REALLOCATE prompt are:
1038 allocate a directory inode, and change \fIlost+found\fP to reference it.
1039 The previous inode reference by the \fIlost+found\fP name is not cleared.
1040 Thus it will either be reclaimed as an UNREF'ed inode or have its
1041 link count ADJUST'ed later in this Phase.
1042 Inability to create a \fIlost+found\fP directory generates the message:
1044 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1046 and aborts the attempt to linkup the lost inode.
1047 This will always invoke the UNREF error condition in Phase 4.
1049 abort the attempt to linkup the lost inode.
1050 This will always invoke the UNREF error condition in Phase 4.
1053 .B "NO SPACE LEFT IN /lost+found (EXPAND)"
1055 There is no space to add another entry to the
1057 directory in the root directory
1061 directory is expanded.
1063 Possible responses to the EXPAND prompt are:
1067 directory is expanded to make room for the new entry.
1068 If the attempted expansion fails
1072 .B "SORRY. NO SPACE IN lost+found DIRECTORY"
1074 and aborts the attempt to linkup the lost inode.
1075 This will always invoke the UNREF error condition in Phase 4.
1076 Clean out unnecessary entries in
1078 This error is fatal if the file system is being preen'ed.
1080 abort the attempt to linkup the lost inode.
1081 This will always invoke the UNREF error condition in Phase 4.
1084 .B "DIR I=\fII1\fP CONNECTED. PARENT WAS I=\fII2\fP"
1086 This is an advisory message indicating a directory inode \fII1\fP was
1087 successfully connected to the
1090 The parent inode \fII2\fP of the directory inode \fII1\fP is
1091 replaced by the inode number of the
1096 .B "DIRECTORY \fIF\fP LENGTH \fIS\fP NOT MULTIPLE OF \fIB\fP (ADJUST)
1098 A directory \fIF\fP has been found with size \fIS\fP that is not
1099 a multiple of the directory blocksize \fIB\fP
1100 (this can reoccur in Phase 3 if it is not adjusted in Phase 2).
1102 Possible responses to the ADJUST prompt are:
1104 the length is rounded up to the appropriate block size.
1105 This error can occur on 4.2BSD file systems.
1106 Thus when preen'ing the file system only a warning is printed
1107 and the directory is adjusted.
1109 ignore the error condition.
1112 .B "BAD INODE \fIS\fP TO DESCEND"
1114 An internal error has caused an impossible state \fIS\fP to be passed to the
1115 routine that descends the file system directory structure.
1120 Phase 4 \- Check Reference Counts
1122 This phase concerns itself with the link count information
1123 seen in Phase 2 and Phase 3.
1124 This section lists error conditions resulting from
1129 incorrect link counts for files, directories, symbolic links, or special files,
1130 unreferenced files, symbolic links, and directories,
1131 and bad or duplicate blocks in files, symbolic links, and directories.
1132 All errors in this phase are correctable if the file system is being preen'ed
1133 except running out of space in the \fIlost+found\fP directory.
1136 .B "UNREF FILE I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (RECONNECT)"
1138 Inode \fII\fP was not connected to a directory entry
1139 when the file system was traversed.
1140 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and
1141 modify time \fIT\fP of inode \fII\fP are printed.
1142 When preen'ing the file is cleared if either its size or its
1144 otherwise it is reconnected.
1146 Possible responses to the RECONNECT prompt are:
1148 reconnect inode \fII\fP to the file system in the directory for
1149 lost files (usually \fIlost+found\fP).
1152 error condition in Phase 4
1153 if there are problems connecting inode \fII\fP to
1156 ignore this error condition.
1157 This will always invoke the CLEAR error condition in Phase 4.
1162 The inode mentioned in the immediately previous error condition can not be
1164 This cannot occur if the file system is being preen'ed,
1165 since lack of space to reconnect files is a fatal error.
1167 Possible responses to the CLEAR prompt are:
1169 de-allocate the inode mentioned in the immediately previous error condition by zeroing its contents.
1171 ignore this error condition.
1174 .B "NO lost+found DIRECTORY (CREATE)"
1178 directory in the root directory of the file system;
1181 tries to create a \fIlost+found\fP directory.
1183 Possible responses to the CREATE prompt are:
1185 create a \fIlost+found\fP directory in the root of the file system.
1186 This may raise the message:
1188 .B "NO SPACE LEFT IN / (EXPAND)"
1190 See below for the possible responses.
1191 Inability to create a \fIlost+found\fP directory generates the message:
1193 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1195 and aborts the attempt to linkup the lost inode.
1196 This will always invoke the UNREF error condition in Phase 4.
1198 abort the attempt to linkup the lost inode.
1199 This will always invoke the UNREF error condition in Phase 4.
1202 .B "lost+found IS NOT A DIRECTORY (REALLOCATE)"
1208 Possible responses to the REALLOCATE prompt are:
1210 allocate a directory inode, and change \fIlost+found\fP to reference it.
1211 The previous inode reference by the \fIlost+found\fP name is not cleared.
1212 Thus it will either be reclaimed as an UNREF'ed inode or have its
1213 link count ADJUST'ed later in this Phase.
1214 Inability to create a \fIlost+found\fP directory generates the message:
1216 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1218 and aborts the attempt to linkup the lost inode.
1219 This will always invoke the UNREF error condition in Phase 4.
1221 abort the attempt to linkup the lost inode.
1222 This will always invoke the UNREF error condition in Phase 4.
1225 .B "NO SPACE LEFT IN /lost+found (EXPAND)"
1227 There is no space to add another entry to the
1229 directory in the root directory
1233 directory is expanded.
1235 Possible responses to the EXPAND prompt are:
1239 directory is expanded to make room for the new entry.
1240 If the attempted expansion fails
1244 .B "SORRY. NO SPACE IN lost+found DIRECTORY"
1246 and aborts the attempt to linkup the lost inode.
1247 This will always invoke the UNREF error condition in Phase 4.
1248 Clean out unnecessary entries in
1250 This error is fatal if the file system is being preen'ed.
1252 abort the attempt to linkup the lost inode.
1253 This will always invoke the UNREF error condition in Phase 4.
1256 .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)"
1258 The link count for inode \fII\fP,
1259 is \fIX\fP but should be \fIY\fP.
1260 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and modify time \fIT\fP
1262 When preen'ing the link count is adjusted unless the number of references
1263 is increasing, a condition that should never occur unless precipitated
1264 by a hardware failure.
1265 When the number of references is increasing under preen mode,
1267 exits with the message:
1269 .B "LINK COUNT INCREASING"
1271 Possible responses to the ADJUST prompt are:
1273 replace the link count of file inode \fII\fP with \fIY\fP.
1275 ignore this error condition.
1278 .B "UNREF \fItype\fP I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (CLEAR)"
1280 Inode \fII\fP, was not connected to a directory entry when the
1281 file system was traversed.
1282 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP,
1283 and modify time \fIT\fP of inode \fII\fP
1286 this is a file that was not connected because its size or link count was zero,
1287 hence it is cleared.
1289 Possible responses to the CLEAR prompt are:
1291 de-allocate inode \fII\fP by zeroing its contents.
1293 ignore this error condition.
1296 .B "BAD/DUP \fItype\fP I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (CLEAR)"
1298 Phase 1 or Phase 1b have found duplicate blocks
1299 or bad blocks associated with
1301 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP,
1302 and modify time \fIT\fP of inode \fII\fP
1304 This error cannot arise when the file system is being preen'ed,
1305 as it would have caused a fatal error earlier.
1307 Possible responses to the CLEAR prompt are:
1309 de-allocate inode \fII\fP by zeroing its contents.
1311 ignore this error condition.
1313 Phase 5 - Check Cyl groups
1315 This phase concerns itself with the free-block and used-inode maps.
1316 This section lists error conditions resulting from
1317 allocated blocks in the free-block maps,
1318 free blocks missing from free-block maps,
1319 and the total free-block count incorrect.
1320 It also lists error conditions resulting from
1321 free inodes in the used-inode maps,
1322 allocated inodes missing from used-inode maps,
1323 and the total used-inode count incorrect.
1326 .B "CG \fIC\fP: BAD MAGIC NUMBER"
1328 The magic number of cylinder group \fIC\fP is wrong.
1329 This usually indicates that the cylinder group maps have been destroyed.
1330 When running manually the cylinder group is marked as needing
1331 to be reconstructed.
1332 This error is fatal if the file system is being preen'ed.
1335 .B "BLK(S) MISSING IN BIT MAPS (SALVAGE)"
1337 A cylinder group block map is missing some free blocks.
1338 During preen'ing the maps are reconstructed.
1340 Possible responses to the SALVAGE prompt are:
1342 reconstruct the free block map.
1344 ignore this error condition.
1347 .B "SUMMARY INFORMATION BAD (SALVAGE)"
1349 The summary information was found to be incorrect.
1351 the summary information is recomputed.
1353 Possible responses to the SALVAGE prompt are:
1355 reconstruct the summary information.
1357 ignore this error condition.
1360 .B "FREE BLK COUNT(S) WRONG IN SUPERBLOCK (SALVAGE)"
1362 The superblock free block information was found to be incorrect.
1364 the superblock free block information is recomputed.
1366 Possible responses to the SALVAGE prompt are:
1368 reconstruct the superblock free block information.
1370 ignore this error condition.
1374 Once a file system has been checked, a few cleanup functions are performed.
1375 This section lists advisory messages about
1377 and modify status of the file system.
1380 .B "\fIV\fP files, \fIW\fP used, \fIX\fP free (\fIY\fP frags, \fIZ\fP blocks)"
1382 This is an advisory message indicating that
1383 the file system checked contained
1385 \fIW\fP fragment sized blocks leaving
1386 \fIX\fP fragment sized blocks free in the file system.
1387 The numbers in parenthesis breaks the free count down into
1388 \fIY\fP free fragments and
1389 \fIZ\fP free full sized blocks.
1392 .B "***** REBOOT UNIX *****"
1394 This is an advisory message indicating that
1395 the root file system has been modified by
1397 If UNIX is not rebooted immediately,
1400 may be undone by the in-core copies of tables
1404 will exit with a code of 4.
1405 The standard auto-reboot script distributed with 4.3BSD
1406 interprets an exit code of 4 by issuing a reboot system call.
1409 .B "***** FILE SYSTEM WAS MODIFIED *****"
1411 This is an advisory message indicating that
1412 the current file system was modified by
1414 If this file system is mounted or is the current root file system,
1416 should be halted and UNIX rebooted.
1417 If UNIX is not rebooted immediately,
1420 may be undone by the in-core copies of tables