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 .\" 3. 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
28 .\" @(#)4.t 8.1 (Berkeley) 6/5/93
30 .ds RH Appendix A \- Fsck Error Conditions
32 Appendix A \- Fsck Error Conditions
38 a multi-pass file system check program.
39 Each file system pass invokes a different Phase of the
42 After the initial setup,
44 performs successive Phases over each file system,
45 checking blocks and sizes,
49 and the map of free blocks,
50 (possibly rebuilding it),
51 and performs some cleanup.
55 is run non-interactively to
57 the file systems after an unclean halt.
58 While preen'ing a file system,
59 it will only fix corruptions that are expected
60 to occur from an unclean halt.
61 These actions are a proper subset of the actions that
63 will take when it is running interactively.
64 Throughout this appendix many errors have several options
65 that the operator can take.
66 When an inconsistency is detected,
68 reports the error condition to the operator.
69 If a response is required,
71 prints a prompt message and
73 When preen'ing most errors are fatal.
74 For those that are expected,
75 the response taken is noted.
76 This appendix explains the meaning of each error condition,
77 the possible responses, and the related error conditions.
79 The error conditions are organized by the
83 program in which they can occur.
84 The error conditions that may occur
85 in more than one Phase
86 will be discussed in initialization.
90 Before a file system check can be performed, certain
91 tables have to be set up and certain files opened.
92 This section concerns itself with the opening of files and
93 the initialization of tables.
94 This section lists error conditions resulting from
99 file system size checks,
100 and creation of the scratch file.
101 All the initialization errors are fatal
102 when the file system is being preen'ed.
107 \fIC\fP is not a legal option to
109 legal options are \-b, \-c, \-y, \-n, and \-p.
111 terminates on this error condition.
114 manual entry for further detail.
117 .B "cannot alloc NNN bytes for blockmap"
119 .B "cannot alloc NNN bytes for freemap"
121 .B "cannot alloc NNN bytes for statemap"
123 .B "cannot alloc NNN bytes for lncntp"
126 request for memory for its virtual
127 memory tables failed.
128 This should never happen.
130 terminates on this error condition.
134 .B "Can't open checklist file: \fIF\fP"
136 The file system checklist file
139 can not be opened for reading.
141 terminates on this error condition.
142 Check access modes of \fIF\fP.
148 request for statistics about the root directory ``/'' failed.
149 This should never happen.
151 terminates on this error condition.
155 .B "Can't stat \fIF\fP"
157 .B "Can't make sense out of name \fIF\fP"
160 request for statistics about the file system \fIF\fP failed.
161 When running manually,
162 it ignores this file system
163 and continues checking the next file system given.
164 Check access modes of \fIF\fP.
167 .B "Can't open \fIF\fP"
170 request attempt to open the file system \fIF\fP failed.
171 When running manually, it ignores this file system
172 and continues checking the next file system given.
173 Check access modes of \fIF\fP.
176 .B "\fIF\fP: (NO WRITE)"
178 Either the \-n flag was specified or
180 attempt to open the file system \fIF\fP for writing failed.
181 When running manually,
182 all the diagnostics are printed out,
183 but no modifications are attempted to fix them.
186 .B "file is not a block or character device; OK"
190 a regular file name by mistake.
191 Check the type of the file specified.
193 Possible responses to the OK prompt are:
195 ignore this error condition.
197 ignore this file system and continues checking
198 the next file system given.
201 .B "UNDEFINED OPTIMIZATION IN SUPERBLOCK (SET TO DEFAULT)"
203 The superblock optimization parameter is neither OPT_TIME
206 Possible responses to the SET TO DEFAULT prompt are:
208 The superblock is set to request optimization to minimize
209 running time of the system.
210 (If optimization to minimize disk space utilization is
211 desired, it can be set using \fItunefs\fP(8).)
213 ignore this error condition.
216 .B "IMPOSSIBLE MINFREE=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)"
218 The superblock minimum space percentage is greater than 99%
221 Possible responses to the SET TO DEFAULT prompt are:
223 The minfree parameter is set to 10%.
224 (If some other percentage is desired,
225 it can be set using \fItunefs\fP(8).)
227 ignore this error condition.
230 .B "IMPOSSIBLE INTERLEAVE=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)"
232 The file system interleave is less than or equal to zero.
234 Possible responses to the SET TO DEFAULT prompt are:
236 The interleave parameter is set to 1.
238 ignore this error condition.
241 .B "IMPOSSIBLE NPSECT=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)"
243 The number of physical sectors per track is less than the number
244 of usable sectors per track.
246 Possible responses to the SET TO DEFAULT prompt are:
248 The npsect parameter is set to the number of usable sectors per track.
250 ignore this error condition.
253 One of the following messages will appear:
255 .B "MAGIC NUMBER WRONG"
257 .B "NCG OUT OF RANGE"
259 .B "CPG OUT OF RANGE"
261 .B "NCYL DOES NOT JIVE WITH NCG*CPG"
263 .B "SIZE PREPOSTEROUSLY LARGE"
265 .B "TRASHED VALUES IN SUPER BLOCK"
267 and will be followed by the message:
269 .B "\fIF\fP: BAD SUPER BLOCK: \fIB\fP"
271 .B "USE -b OPTION TO FSCK TO SPECIFY LOCATION OF AN ALTERNATE"
273 .B "SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8)."
275 The super block has been corrupted.
276 An alternative super block must be selected from among those
279 (8) when the file system was created.
280 For file systems with a blocksize less than 32K,
281 specifying \-b 32 is a good first choice.
284 .B "INTERNAL INCONSISTENCY: \fIM\fP"
287 has had an internal panic, whose message is specified as \fIM\fP.
288 This should never happen.
292 .B "CAN NOT SEEK: BLK \fIB\fP (CONTINUE)"
295 request for moving to a specified block number \fIB\fP in
296 the file system failed.
297 This should never happen.
300 Possible responses to the CONTINUE prompt are:
302 attempt to continue to run the file system check.
304 however the problem will persist.
305 This error condition will not allow a complete check of the file system.
308 should be made to re-check this file system.
309 If the block was part of the virtual memory buffer
312 will terminate with the message ``Fatal I/O error''.
314 terminate the program.
317 .B "CAN NOT READ: BLK \fIB\fP (CONTINUE)"
320 request for reading a specified block number \fIB\fP in
321 the file system failed.
322 This should never happen.
325 Possible responses to the CONTINUE prompt are:
327 attempt to continue to run the file system check.
328 It will retry the read and print out the message:
330 .B "THE FOLLOWING SECTORS COULD NOT BE READ: \fIN\fP"
332 where \fIN\fP indicates the sectors that could not be read.
335 ever tries to write back one of the blocks on which the read failed
336 it will print the message:
338 .B "WRITING ZERO'ED BLOCK \fIN\fP TO DISK"
340 where \fIN\fP indicates the sector that was written with zero's.
341 If the disk is experiencing hardware problems, the problem will persist.
342 This error condition will not allow a complete check of the file system.
345 should be made to re-check this file system.
346 If the block was part of the virtual memory buffer
349 will terminate with the message ``Fatal I/O error''.
351 terminate the program.
354 .B "CAN NOT WRITE: BLK \fIB\fP (CONTINUE)"
357 request for writing a specified block number \fIB\fP
358 in the file system failed.
359 The disk is write-protected;
360 check the write protect lock on the drive.
361 If that is not the problem, see a guru.
363 Possible responses to the CONTINUE prompt are:
365 attempt to continue to run the file system check.
366 The write operation will be retried with the failed blocks
367 indicated by the message:
369 .B "THE FOLLOWING SECTORS COULD NOT BE WRITTEN: \fIN\fP"
371 where \fIN\fP indicates the sectors that could not be written.
372 If the disk is experiencing hardware problems, the problem will persist.
373 This error condition will not allow a complete check of the file system.
376 should be made to re-check this file system.
377 If the block was part of the virtual memory buffer
380 will terminate with the message ``Fatal I/O error''.
382 terminate the program.
385 .B "bad inode number DDD to ginode"
387 An internal error has attempted to read non-existent inode \fIDDD\fP.
393 Phase 1 \- Check Blocks and Sizes
395 This phase concerns itself with
397 This section lists error conditions resulting from
398 checking inode types,
399 setting up the zero-link-count table,
400 examining inode block numbers for bad or duplicate blocks,
402 and checking inode format.
403 All errors in this phase except
404 .B "INCORRECT BLOCK COUNT"
406 .B "PARTIALLY TRUNCATED INODE"
407 are fatal if the file system is being preen'ed.
410 .B "UNKNOWN FILE TYPE I=\fII\fP (CLEAR)"
412 The mode word of the inode \fII\fP indicates that the inode is not a
413 special block inode, special character inode, socket inode, regular inode,
414 symbolic link, or directory inode.
416 Possible responses to the CLEAR prompt are:
418 de-allocate inode \fII\fP by zeroing its contents.
419 This will always invoke the UNALLOCATED error condition in Phase 2
420 for each directory entry pointing to this inode.
422 ignore this error condition.
425 .B "PARTIALLY TRUNCATED INODE I=\fII\fP (SALVAGE)"
428 has found inode \fII\fP whose size is shorter than the number of
429 blocks allocated to it.
430 This condition should only occur if the system crashes while in the
431 midst of truncating a file.
432 When preen'ing the file system,
434 completes the truncation to the specified size.
436 Possible responses to SALVAGE are:
438 complete the truncation to the size specified in the inode.
440 ignore this error condition.
443 .B "LINK COUNT TABLE OVERFLOW (CONTINUE)"
445 An internal table for
447 containing allocated inodes with a link count of
448 zero cannot allocate more memory.
449 Increase the virtual memory for
452 Possible responses to the CONTINUE prompt are:
454 continue with the program.
455 This error condition will not allow a complete check of the file system.
458 should be made to re-check this file system.
459 If another allocated inode with a zero link count is found,
460 this error condition is repeated.
462 terminate the program.
465 .B "\fIB\fP BAD I=\fII\fP"
467 Inode \fII\fP contains block number \fIB\fP with a number
468 lower than the number of the first data block in the file system or
469 greater than the number of the last block
471 This error condition may invoke the
472 .B "EXCESSIVE BAD BLKS"
473 error condition in Phase 1 (see next paragraph) if
474 inode \fII\fP has too many block numbers outside the file system range.
475 This error condition will always invoke the
477 error condition in Phase 2 and Phase 4.
480 .B "EXCESSIVE BAD BLKS I=\fII\fP (CONTINUE)"
482 There is more than a tolerable number (usually 10) of blocks with a number
483 lower than the number of the first data block in the file system or greater than
484 the number of last block in the file system associated with inode \fII\fP.
486 Possible responses to the CONTINUE prompt are:
488 ignore the rest of the blocks in this inode
489 and continue checking with the next inode in the file system.
490 This error condition will not allow a complete check of the file system.
493 should be made to re-check this file system.
495 terminate the program.
498 .B "BAD STATE DDD TO BLKERR"
500 An internal error has scrambled
502 state map to have the impossible value \fIDDD\fP.
508 .B "\fIB\fP DUP I=\fII\fP"
510 Inode \fII\fP contains block number \fIB\fP that is already claimed by
512 This error condition may invoke the
513 .B "EXCESSIVE DUP BLKS"
514 error condition in Phase 1 if
515 inode \fII\fP has too many block numbers claimed by other inodes.
516 This error condition will always invoke Phase 1b and the
518 error condition in Phase 2 and Phase 4.
521 .B "EXCESSIVE DUP BLKS I=\fII\fP (CONTINUE)"
523 There is more than a tolerable number (usually 10) of blocks claimed by other
526 Possible responses to the CONTINUE prompt are:
528 ignore the rest of the blocks in this inode
529 and continue checking with the next inode in the file system.
530 This error condition will not allow a complete check of the file system.
533 should be made to re-check this file system.
535 terminate the program.
538 .B "DUP TABLE OVERFLOW (CONTINUE)"
542 containing duplicate block numbers cannot allocate any more space.
543 Increase the amount of virtual memory available to
546 Possible responses to the CONTINUE prompt are:
548 continue with the program.
549 This error condition will not allow a complete check of the file system.
552 should be made to re-check this file system.
553 If another duplicate block is found, this error condition will repeat.
555 terminate the program.
558 .B "PARTIALLY ALLOCATED INODE I=\fII\fP (CLEAR)"
560 Inode \fII\fP is neither allocated nor unallocated.
562 Possible responses to the CLEAR prompt are:
564 de-allocate inode \fII\fP by zeroing its contents.
566 ignore this error condition.
569 .B "INCORRECT BLOCK COUNT I=\fII\fP (\fIX\fP should be \fIY\fP) (CORRECT)"
571 The block count for inode \fII\fP is \fIX\fP blocks,
572 but should be \fIY\fP blocks.
573 When preen'ing the count is corrected.
575 Possible responses to the CORRECT prompt are:
577 replace the block count of inode \fII\fP with \fIY\fP.
579 ignore this error condition.
581 Phase 1B: Rescan for More Dups
583 When a duplicate block is found in the file system, the file system is
584 rescanned to find the inode that previously claimed that block.
585 This section lists the error condition when the duplicate block is found.
588 .B "\fIB\fP DUP I=\fII\fP"
590 Inode \fII\fP contains block number \fIB\fP that
591 is already claimed by another inode.
592 This error condition will always invoke the
594 error condition in Phase 2.
595 You can determine which inodes have overlapping blocks by examining
596 this error condition and the DUP error condition in Phase 1.
598 Phase 2 \- Check Pathnames
600 This phase concerns itself with removing directory entries
602 error conditioned inodes
603 from Phase 1 and Phase 1b.
604 This section lists error conditions resulting from
605 root inode mode and status,
606 directory inode pointers in range,
607 and directory entries pointing to bad inodes,
608 and directory integrity checks.
609 All errors in this phase are fatal if the file system is being preen'ed,
610 except for directories not being a multiple of the blocks size
611 and extraneous hard links.
614 .B "ROOT INODE UNALLOCATED (ALLOCATE)"
616 The root inode (usually inode number 2) has no allocate mode bits.
617 This should never happen.
619 Possible responses to the ALLOCATE prompt are:
621 allocate inode 2 as the root inode.
622 The files and directories usually found in the root will be recovered
623 in Phase 3 and put into
625 If the attempt to allocate the root fails,
627 will exit with the message:
629 .B "CANNOT ALLOCATE ROOT INODE" .
635 .B "ROOT INODE NOT DIRECTORY (REALLOCATE)"
637 The root inode (usually inode number 2)
638 is not directory inode type.
640 Possible responses to the REALLOCATE prompt are:
642 clear the existing contents of the root inode
644 The files and directories usually found in the root will be recovered
645 in Phase 3 and put into
647 If the attempt to allocate the root fails,
649 will exit with the message:
651 .B "CANNOT ALLOCATE ROOT INODE" .
654 will then prompt with
657 Possible responses to the FIX prompt are:
659 replace the root inode's type to be a directory.
660 If the root inode's data blocks are not directory blocks,
661 many error conditions will be produced.
663 terminate the program.
666 .B "DUPS/BAD IN ROOT INODE (REALLOCATE)"
668 Phase 1 or Phase 1b have found duplicate blocks
669 or bad blocks in the root inode (usually inode number 2) for the file system.
671 Possible responses to the REALLOCATE prompt are:
673 clear the existing contents of the root inode
675 The files and directories usually found in the root will be recovered
676 in Phase 3 and put into
678 If the attempt to allocate the root fails,
680 will exit with the message:
682 .B "CANNOT ALLOCATE ROOT INODE" .
685 will then prompt with
688 Possible responses to the CONTINUE prompt are:
692 error condition in the root inode and
693 attempt to continue to run the file system check.
694 If the root inode is not correct,
695 then this may result in many other error conditions.
697 terminate the program.
700 .B "NAME TOO LONG \fIF\fP"
702 An excessively long path name has been found.
703 This usually indicates loops in the file system name space.
704 This can occur if the super user has made circular links to directories.
705 The offending links must be removed (by a guru).
708 .B "I OUT OF RANGE I=\fII\fP NAME=\fIF\fP (REMOVE)"
710 A directory entry \fIF\fP has an inode number \fII\fP that is greater than
711 the end of the inode list.
713 Possible responses to the REMOVE prompt are:
715 the directory entry \fIF\fP is removed.
717 ignore this error condition.
720 .B "UNALLOCATED I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP \fItype\fP=\fIF\fP (REMOVE)"
722 A directory or file entry \fIF\fP points to an unallocated inode \fII\fP.
723 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
724 and name \fIF\fP are printed.
726 Possible responses to the REMOVE prompt are:
728 the directory entry \fIF\fP is removed.
730 ignore this error condition.
733 .B "DUP/BAD I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP \fItype\fP=\fIF\fP (REMOVE)"
735 Phase 1 or Phase 1b have found duplicate blocks or bad blocks
736 associated with directory or file entry \fIF\fP, inode \fII\fP.
737 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
738 and directory name \fIF\fP are printed.
740 Possible responses to the REMOVE prompt are:
742 the directory entry \fIF\fP is removed.
744 ignore this error condition.
747 .B "ZERO LENGTH DIRECTORY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (REMOVE)"
749 A directory entry \fIF\fP has a size \fIS\fP that is zero.
750 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
751 and directory name \fIF\fP are printed.
753 Possible responses to the REMOVE prompt are:
755 the directory entry \fIF\fP is removed;
756 this will always invoke the BAD/DUP error condition in Phase 4.
758 ignore this error condition.
761 .B "DIRECTORY TOO SHORT I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
763 A directory \fIF\fP has been found whose size \fIS\fP
764 is less than the minimum size directory.
765 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, modify time \fIT\fP,
766 and directory name \fIF\fP are printed.
768 Possible responses to the FIX prompt are:
770 increase the size of the directory to the minimum directory size.
772 ignore this directory.
775 .B "DIRECTORY \fIF\fP LENGTH \fIS\fP NOT MULTIPLE OF \fIB\fP (ADJUST)
777 A directory \fIF\fP has been found with size \fIS\fP that is not
778 a multiple of the directory blocksize \fIB\fP.
780 Possible responses to the ADJUST prompt are:
782 the length is rounded up to the appropriate block size.
783 This error can occur on 4.2BSD file systems.
784 Thus when preen'ing the file system only a warning is printed
785 and the directory is adjusted.
787 ignore the error condition.
790 .B "DIRECTORY CORRUPTED I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (SALVAGE)"
792 A directory with an inconsistent internal state has been found.
794 Possible responses to the FIX prompt are:
796 throw away all entries up to the next directory boundary (usually 512-byte)
798 This drastic action can throw away up to 42 entries,
799 and should be taken only after other recovery efforts have failed.
801 skip up to the next directory boundary and resume reading,
802 but do not modify the directory.
805 .B "BAD INODE NUMBER FOR `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
807 A directory \fII\fP has been found whose inode number for `.' does
808 does not equal \fII\fP.
810 Possible responses to the FIX prompt are:
812 change the inode number for `.' to be equal to \fII\fP.
814 leave the inode number for `.' unchanged.
817 .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
819 A directory \fII\fP has been found whose first entry is unallocated.
821 Possible responses to the FIX prompt are:
823 build an entry for `.' with inode number equal to \fII\fP.
825 leave the directory unchanged.
828 .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
830 .B "CANNOT FIX, FIRST ENTRY IN DIRECTORY CONTAINS \fIF\fP"
832 A directory \fII\fP has been found whose first entry is \fIF\fP.
834 cannot resolve this problem.
835 The file system should be mounted and the offending entry \fIF\fP
837 The file system should then be unmounted and
842 .B "MISSING `.' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
844 .B "CANNOT FIX, INSUFFICIENT SPACE TO ADD `.'"
846 A directory \fII\fP has been found whose first entry is not `.'.
848 cannot resolve this problem as it should never happen.
852 .B "EXTRA `.' ENTRY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
854 A directory \fII\fP has been found that has more than one entry for `.'.
856 Possible responses to the FIX prompt are:
858 remove the extra entry for `.'.
860 leave the directory unchanged.
863 .B "BAD INODE NUMBER FOR `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
865 A directory \fII\fP has been found whose inode number for `..' does
866 does not equal the parent of \fII\fP.
868 Possible responses to the FIX prompt are:
870 change the inode number for `..' to be equal to the parent of \fII\fP
871 (``\fB..\fP'' in the root inode points to itself).
873 leave the inode number for `..' unchanged.
876 .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
878 A directory \fII\fP has been found whose second entry is unallocated.
880 Possible responses to the FIX prompt are:
882 build an entry for `..' with inode number equal to the parent of \fII\fP
883 (``\fB..\fP'' in the root inode points to itself).
885 leave the directory unchanged.
888 .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
890 .B "CANNOT FIX, SECOND ENTRY IN DIRECTORY CONTAINS \fIF\fP"
892 A directory \fII\fP has been found whose second entry is \fIF\fP.
894 cannot resolve this problem.
895 The file system should be mounted and the offending entry \fIF\fP
897 The file system should then be unmounted and
902 .B "MISSING `..' I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP"
904 .B "CANNOT FIX, INSUFFICIENT SPACE TO ADD `..'"
906 A directory \fII\fP has been found whose second entry is not `..'.
908 cannot resolve this problem.
909 The file system should be mounted and the second entry in the directory
911 The file system should then be unmounted and
916 .B "EXTRA `..' ENTRY I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP DIR=\fIF\fP (FIX)"
918 A directory \fII\fP has been found that has more than one entry for `..'.
920 Possible responses to the FIX prompt are:
922 remove the extra entry for `..'.
924 leave the directory unchanged.
927 .B "\fIN\fP IS AN EXTRANEOUS HARD LINK TO A DIRECTORY \fID\fP (REMOVE)
930 has found a hard link, \fIN\fP, to a directory, \fID\fP.
931 When preen'ing the extraneous links are ignored.
933 Possible responses to the REMOVE prompt are:
935 delete the extraneous entry, \fIN\fP.
937 ignore the error condition.
940 .B "BAD INODE \fIS\fP TO DESCEND"
942 An internal error has caused an impossible state \fIS\fP to be passed to the
943 routine that descends the file system directory structure.
949 .B "BAD RETURN STATE \fIS\fP FROM DESCEND"
951 An internal error has caused an impossible state \fIS\fP to be returned
952 from the routine that descends the file system directory structure.
958 .B "BAD STATE \fIS\fP FOR ROOT INODE"
960 An internal error has caused an impossible state \fIS\fP to be assigned
966 Phase 3 \- Check Connectivity
968 This phase concerns itself with the directory connectivity seen in
970 This section lists error conditions resulting from
971 unreferenced directories,
977 .B "UNREF DIR I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (RECONNECT)"
979 The directory inode \fII\fP was not connected to a directory entry
980 when the file system was traversed.
981 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and
982 modify time \fIT\fP of directory inode \fII\fP are printed.
983 When preen'ing, the directory is reconnected if its size is non-zero,
984 otherwise it is cleared.
986 Possible responses to the RECONNECT prompt are:
988 reconnect directory inode \fII\fP to the file system in the
989 directory for lost files (usually \fIlost+found\fP).
992 error condition in Phase 3
993 if there are problems connecting directory inode \fII\fP to \fIlost+found\fP.
994 This may also invoke the CONNECTED error condition in Phase 3 if the link
997 ignore this error condition.
998 This will always invoke the UNREF error condition in Phase 4.
1001 .B "NO lost+found DIRECTORY (CREATE)"
1005 directory in the root directory of the file system;
1008 tries to create a \fIlost+found\fP directory.
1010 Possible responses to the CREATE prompt are:
1012 create a \fIlost+found\fP directory in the root of the file system.
1013 This may raise the message:
1015 .B "NO SPACE LEFT IN / (EXPAND)"
1017 See below for the possible responses.
1018 Inability to create a \fIlost+found\fP directory generates the message:
1020 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1022 and aborts the attempt to linkup the lost inode.
1023 This will always invoke the UNREF error condition in Phase 4.
1025 abort the attempt to linkup the lost inode.
1026 This will always invoke the UNREF error condition in Phase 4.
1029 .B "lost+found IS NOT A DIRECTORY (REALLOCATE)"
1035 Possible responses to the REALLOCATE prompt are:
1037 allocate a directory inode, and change \fIlost+found\fP to reference it.
1038 The previous inode reference by the \fIlost+found\fP name is not cleared.
1039 Thus it will either be reclaimed as an UNREF'ed inode or have its
1040 link count ADJUST'ed later in this Phase.
1041 Inability to create a \fIlost+found\fP directory generates the message:
1043 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1045 and aborts the attempt to linkup the lost inode.
1046 This will always invoke the UNREF error condition in Phase 4.
1048 abort the attempt to linkup the lost inode.
1049 This will always invoke the UNREF error condition in Phase 4.
1052 .B "NO SPACE LEFT IN /lost+found (EXPAND)"
1054 There is no space to add another entry to the
1056 directory in the root directory
1060 directory is expanded.
1062 Possible responses to the EXPAND prompt are:
1066 directory is expanded to make room for the new entry.
1067 If the attempted expansion fails
1071 .B "SORRY. NO SPACE IN lost+found DIRECTORY"
1073 and aborts the attempt to linkup the lost inode.
1074 This will always invoke the UNREF error condition in Phase 4.
1075 Clean out unnecessary entries in
1077 This error is fatal if the file system is being preen'ed.
1079 abort the attempt to linkup the lost inode.
1080 This will always invoke the UNREF error condition in Phase 4.
1083 .B "DIR I=\fII1\fP CONNECTED. PARENT WAS I=\fII2\fP"
1085 This is an advisory message indicating a directory inode \fII1\fP was
1086 successfully connected to the
1089 The parent inode \fII2\fP of the directory inode \fII1\fP is
1090 replaced by the inode number of the
1095 .B "DIRECTORY \fIF\fP LENGTH \fIS\fP NOT MULTIPLE OF \fIB\fP (ADJUST)
1097 A directory \fIF\fP has been found with size \fIS\fP that is not
1098 a multiple of the directory blocksize \fIB\fP
1099 (this can reoccur in Phase 3 if it is not adjusted in Phase 2).
1101 Possible responses to the ADJUST prompt are:
1103 the length is rounded up to the appropriate block size.
1104 This error can occur on 4.2BSD file systems.
1105 Thus when preen'ing the file system only a warning is printed
1106 and the directory is adjusted.
1108 ignore the error condition.
1111 .B "BAD INODE \fIS\fP TO DESCEND"
1113 An internal error has caused an impossible state \fIS\fP to be passed to the
1114 routine that descends the file system directory structure.
1119 Phase 4 \- Check Reference Counts
1121 This phase concerns itself with the link count information
1122 seen in Phase 2 and Phase 3.
1123 This section lists error conditions resulting from
1128 incorrect link counts for files, directories, symbolic links, or special files,
1129 unreferenced files, symbolic links, and directories,
1130 and bad or duplicate blocks in files, symbolic links, and directories.
1131 All errors in this phase are correctable if the file system is being preen'ed
1132 except running out of space in the \fIlost+found\fP directory.
1135 .B "UNREF FILE I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (RECONNECT)"
1137 Inode \fII\fP was not connected to a directory entry
1138 when the file system was traversed.
1139 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and
1140 modify time \fIT\fP of inode \fII\fP are printed.
1141 When preen'ing the file is cleared if either its size or its
1143 otherwise it is reconnected.
1145 Possible responses to the RECONNECT prompt are:
1147 reconnect inode \fII\fP to the file system in the directory for
1148 lost files (usually \fIlost+found\fP).
1151 error condition in Phase 4
1152 if there are problems connecting inode \fII\fP to
1155 ignore this error condition.
1156 This will always invoke the CLEAR error condition in Phase 4.
1161 The inode mentioned in the immediately previous error condition can not be
1163 This cannot occur if the file system is being preen'ed,
1164 since lack of space to reconnect files is a fatal error.
1166 Possible responses to the CLEAR prompt are:
1168 de-allocate the inode mentioned in the immediately previous error condition by zeroing its contents.
1170 ignore this error condition.
1173 .B "NO lost+found DIRECTORY (CREATE)"
1177 directory in the root directory of the file system;
1180 tries to create a \fIlost+found\fP directory.
1182 Possible responses to the CREATE prompt are:
1184 create a \fIlost+found\fP directory in the root of the file system.
1185 This may raise the message:
1187 .B "NO SPACE LEFT IN / (EXPAND)"
1189 See below for the possible responses.
1190 Inability to create a \fIlost+found\fP directory generates the message:
1192 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1194 and aborts the attempt to linkup the lost inode.
1195 This will always invoke the UNREF error condition in Phase 4.
1197 abort the attempt to linkup the lost inode.
1198 This will always invoke the UNREF error condition in Phase 4.
1201 .B "lost+found IS NOT A DIRECTORY (REALLOCATE)"
1207 Possible responses to the REALLOCATE prompt are:
1209 allocate a directory inode, and change \fIlost+found\fP to reference it.
1210 The previous inode reference by the \fIlost+found\fP name is not cleared.
1211 Thus it will either be reclaimed as an UNREF'ed inode or have its
1212 link count ADJUST'ed later in this Phase.
1213 Inability to create a \fIlost+found\fP directory generates the message:
1215 .B "SORRY. CANNOT CREATE lost+found DIRECTORY"
1217 and aborts the attempt to linkup the lost inode.
1218 This will always invoke the UNREF error condition in Phase 4.
1220 abort the attempt to linkup the lost inode.
1221 This will always invoke the UNREF error condition in Phase 4.
1224 .B "NO SPACE LEFT IN /lost+found (EXPAND)"
1226 There is no space to add another entry to the
1228 directory in the root directory
1232 directory is expanded.
1234 Possible responses to the EXPAND prompt are:
1238 directory is expanded to make room for the new entry.
1239 If the attempted expansion fails
1243 .B "SORRY. NO SPACE IN lost+found DIRECTORY"
1245 and aborts the attempt to linkup the lost inode.
1246 This will always invoke the UNREF error condition in Phase 4.
1247 Clean out unnecessary entries in
1249 This error is fatal if the file system is being preen'ed.
1251 abort the attempt to linkup the lost inode.
1252 This will always invoke the UNREF error condition in Phase 4.
1255 .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)"
1257 The link count for inode \fII\fP,
1258 is \fIX\fP but should be \fIY\fP.
1259 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and modify time \fIT\fP
1261 When preen'ing the link count is adjusted unless the number of references
1262 is increasing, a condition that should never occur unless precipitated
1263 by a hardware failure.
1264 When the number of references is increasing under preen mode,
1266 exits with the message:
1268 .B "LINK COUNT INCREASING"
1270 Possible responses to the ADJUST prompt are:
1272 replace the link count of file inode \fII\fP with \fIY\fP.
1274 ignore this error condition.
1277 .B "UNREF \fItype\fP I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (CLEAR)"
1279 Inode \fII\fP, was not connected to a directory entry when the
1280 file system was traversed.
1281 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP,
1282 and modify time \fIT\fP of inode \fII\fP
1285 this is a file that was not connected because its size or link count was zero,
1286 hence it is cleared.
1288 Possible responses to the CLEAR prompt are:
1290 de-allocate inode \fII\fP by zeroing its contents.
1292 ignore this error condition.
1295 .B "BAD/DUP \fItype\fP I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (CLEAR)"
1297 Phase 1 or Phase 1b have found duplicate blocks
1298 or bad blocks associated with
1300 The owner \fIO\fP, mode \fIM\fP, size \fIS\fP,
1301 and modify time \fIT\fP of inode \fII\fP
1303 This error cannot arise when the file system is being preen'ed,
1304 as it would have caused a fatal error earlier.
1306 Possible responses to the CLEAR prompt are:
1308 de-allocate inode \fII\fP by zeroing its contents.
1310 ignore this error condition.
1312 Phase 5 - Check Cyl groups
1314 This phase concerns itself with the free-block and used-inode maps.
1315 This section lists error conditions resulting from
1316 allocated blocks in the free-block maps,
1317 free blocks missing from free-block maps,
1318 and the total free-block count incorrect.
1319 It also lists error conditions resulting from
1320 free inodes in the used-inode maps,
1321 allocated inodes missing from used-inode maps,
1322 and the total used-inode count incorrect.
1325 .B "CG \fIC\fP: BAD MAGIC NUMBER"
1327 The magic number of cylinder group \fIC\fP is wrong.
1328 This usually indicates that the cylinder group maps have been destroyed.
1329 When running manually the cylinder group is marked as needing
1330 to be reconstructed.
1331 This error is fatal if the file system is being preen'ed.
1334 .B "BLK(S) MISSING IN BIT MAPS (SALVAGE)"
1336 A cylinder group block map is missing some free blocks.
1337 During preen'ing the maps are reconstructed.
1339 Possible responses to the SALVAGE prompt are:
1341 reconstruct the free block map.
1343 ignore this error condition.
1346 .B "SUMMARY INFORMATION BAD (SALVAGE)"
1348 The summary information was found to be incorrect.
1350 the summary information is recomputed.
1352 Possible responses to the SALVAGE prompt are:
1354 reconstruct the summary information.
1356 ignore this error condition.
1359 .B "FREE BLK COUNT(S) WRONG IN SUPERBLOCK (SALVAGE)"
1361 The superblock free block information was found to be incorrect.
1363 the superblock free block information is recomputed.
1365 Possible responses to the SALVAGE prompt are:
1367 reconstruct the superblock free block information.
1369 ignore this error condition.
1373 Once a file system has been checked, a few cleanup functions are performed.
1374 This section lists advisory messages about
1376 and modify status of the file system.
1379 .B "\fIV\fP files, \fIW\fP used, \fIX\fP free (\fIY\fP frags, \fIZ\fP blocks)"
1381 This is an advisory message indicating that
1382 the file system checked contained
1384 \fIW\fP fragment sized blocks leaving
1385 \fIX\fP fragment sized blocks free in the file system.
1386 The numbers in parenthesis breaks the free count down into
1387 \fIY\fP free fragments and
1388 \fIZ\fP free full sized blocks.
1391 .B "***** REBOOT UNIX *****"
1393 This is an advisory message indicating that
1394 the root file system has been modified by
1396 If UNIX is not rebooted immediately,
1399 may be undone by the in-core copies of tables
1403 will exit with a code of 4.
1404 The standard auto-reboot script distributed with 4.3BSD
1405 interprets an exit code of 4 by issuing a reboot system call.
1408 .B "***** FILE SYSTEM WAS MODIFIED *****"
1410 This is an advisory message indicating that
1411 the current file system was modified by
1413 If this file system is mounted or is the current root file system,
1415 should be halted and UNIX rebooted.
1416 If UNIX is not rebooted immediately,
1419 may be undone by the in-core copies of tables