DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Solving filesystem problems

fsck_ufs Phase 2: check pathnames

This phase removes directory entries pointing to bad inodes found in Phases 1 and 1B. It reports error conditions resulting from:

All errors in this phase are fatal if the filesystem is being preened, except for directories not being a multiple of the block size and extraneous hard links.

fsck_ufs Phase 2 error messages


ROOT INODE UNALLOCATED (ALLOCATE)
The root inode (usually inode number 2) has no allocate mode bits. This is very rare. Possible responses to the ALLOCATE prompt are:

YES
Allocate inode 2 as the root inode. The files and directories usually found in the root will be recovered in Phase 3 and put into the lost+found directory. If the attempt to allocate the root fails, fsck exits with the message:
   CANNOT ALLOCATE ROOT INODE

NO
Terminate the program.

ROOT INODE NOT DIRECTORY (REALLOCATE)
The root inode (usually inode number 2) of the filesystem is not a directory inode.

Possible responses to the REALLOCATE prompt are:


YES
Clear the existing contents of the root inode and reallocate it. The files and directories usually found in the root will be recovered in Phase 3 and put into the lost+found directory. If the attempt to allocate the root fails, fsck exits with the message:
   CANNOT ALLOCATE ROOT INODE

NO
fsck prompts with FIX.

Possible responses to the FIX prompt are:


YES
Change the type of the root inode to directory. If the root inode's data blocks are not directory blocks, many error messages are generated.

NO
Terminate the program.

DUPS/BAD IN ROOT INODE (REALLOCATE)
Phase 1 or Phase 1B has found duplicate blocks or bad blocks in the root inode (usually inode number 2) of the filesystem.

Possible responses to the REALLOCATE prompt are:


YES
Clear the existing contents of the root inode and reallocate it. The files and directories usually found in the root will be recovered in Phase 3 and put into the lost+found directory. If the attempt to allocate the root fails, fsck exits with the message:
   CANNOT ALLOCATE ROOT INODE

NO
fsck prompts with CONTINUE.

Possible responses to the CONTINUE prompt are:


YES
Ignore the DUPS/BAD error condition in the root inode and try to continue running the filesystem check. If the root inode is not correct, this can generate many other error messages.

NO
Terminate the program.

NAME TOO LONG F
An excessively long pathname has been found. This usually indicates loops in the filesystem name space. This can occur if a privileged user has made circular links to directories. These links must be removed.

I OUT OF RANGE I=I NAME=F (REMOVE)
A directory entry F has an inode number I that is greater than the end of the inode list.

Possible responses to the REMOVE prompt are:


YES
Remove the directory entry F.

NO
Ignore this error condition.


UNALLOCATED I=I OWNER=O MODE=M SIZE=S MTIME=T TYPE=F
(REMOVE)
A directory or file entry F points to an unallocated inode I. The owner O, mode M, size S, modify time T, and name F are printed.

Possible responses to the REMOVE prompt are:


YES
Remove the directory entry F.

NO
Ignore this error condition.

DUP/BAD I=I OWNER=O MODE=M SIZE=S MTIME=T TYPE=F (REMOVE)
Phase 1 or Phase 1B has found duplicate blocks or bad blocks associated with directory or file entry F, inode I. The owner O, mode M, size S, modify time T, and directory name F are printed.

Possible responses to the REMOVE prompt are:


YES
Remove the directory entry F.

NO
Ignore this error condition.

ZERO LENGTH DIRECTORY I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F
(REMOVE)
A directory entry F has a size S that is zero. The owner O, mode M, size S, modify time T, and directory name F are printed.

Possible responses to the REMOVE prompt are:


YES
Remove the directory entry F; this generates the BAD/DUP error message in Phase 4.

NO
Ignore this error condition.

DIRECTORY TOO SHORT I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F
(FIX)

A directory F has been found whose size S is less than the minimum size directory. The owner O, mode M, size S, modify time T, and directory name F are printed.

Possible responses to the FIX prompt are:


YES
Increase the size of the directory to the minimum directory size.

NO
Ignore this directory.

DIRECTORY F LENGTH S NOT MULTIPLE OF B (ADJUST)
A directory F has been found with size S that is not a multiple of the directory block size B.

Possible responses to the ADJUST prompt are:


YES
Round up the length to the appropriate block size. When the filesystem is being preened, only a warning is printed and the directory is adjusted.

NO
Ignore the error condition.


DIRECTORY CORRUPTED I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F
(SALVAGE)
A directory with an inconsistent internal state has been found.

Possible responses to the SALVAGE prompt are:


YES
Throw away all entries up to the next directory boundary (usually a 512-byte boundary). This drastic action can throw away up to 42 entries, and should be taken only after other recovery efforts have failed.

NO
Skip to the next directory boundary and resume reading, but do not modify the directory.

BAD INODE NUMBER FOR `.' I=I OWNER=O MODE=M SIZE=S MTIME=T
DIR=F (FIX)
A directory I has been found whose inode number for ``.'' does not equal I.

Possible responses to the FIX prompt are:


YES
Change the inode number for ``.'' to be equal to I.

NO
Leave the inode number for ``.'' unchanged.

MISSING `.' I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F (FIX)
A directory I has been found whose first entry is unallocated.

Possible responses to the FIX prompt are:


YES
Build an entry for ``.'' with inode number equal to I.

NO
Leave the directory unchanged.

MISSING `.' I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F
CANNOT FIX, FIRST ENTRY IN DIRECTORY CONTAINS F
A directory I has been found whose first entry is F. fsck cannot resolve this problem. The filesystem should be mounted and entry F moved elsewhere. The filesystem should then be unmounted and fsck should be run again.

MISSING `.' I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F
CANNOT FIX, INSUFFICIENT SPACE TO ADD `.'
A directory I has been found whose first entry is not ``.''. This is very rare. fsck cannot resolve the problem. If this occurs, contact your service representative or another qualified person.

EXTRA `.' ENTRY I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F
(FIX)
A directory I has been found that has more than one entry for ``.''.

Possible responses to the FIX prompt are:


YES
Remove the extra entry for ``.''.

NO
Leave the directory unchanged.

BAD INODE NUMBER FOR `..' I=I OWNER=O MODE=M SIZE=S
MTIME=T DIR=F (FIX)
A directory I has been found whose inode number for ``..'' does not equal the parent of I.

Possible responses to the FIX prompt are:


YES
Change the inode number for ``..'' to be equal to the parent of I. (Note that ``..'' in the root inode points to itself.)

NO
Leave the inode number for ``..'' unchanged.

MISSING `..' I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F (FIX)
A directory I has been found whose second entry is unallocated.

Possible responses to the FIX prompt are:


YES
Build an entry for ``..'' with inode number equal to the parent of I. (Note that ``..'' in the root inode points to itself.)

NO
Leave the directory unchanged.

MISSING `..' I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F
CANNOT FIX, SECOND ENTRY IN DIRECTORY CONTAINS F
A directory I has been found whose second entry is F. fsck cannot resolve this problem. The filesystem should be mounted and entry F moved elsewhere. The filesystem should then be unmounted and fsck should be run again.

MISSING `..' I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F
CANNOT FIX, INSUFFICIENT SPACE TO ADD `..'
A directory I has been found whose second entry is not ``..'' (the parent directory). fsck cannot resolve this problem. The filesystem should be mounted and the second entry in the directory moved elsewhere. The filesystem should then be unmounted and fsck should be run again.

EXTRA `..' ENTRY I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F
(FIX)
A directory I has been found that has more than one entry for ``..'' (the parent directory).

Possible responses to the FIX prompt are:


YES
Remove the extra entry for ``..'' (the parent directory).

NO
Leave the directory unchanged.

N IS AN EXTRANEOUS HARD LINK TO A DIRECTORY D (REMOVE)
fsck has found a hard link N to a directory D. When preening, the extraneous links are ignored.

Possible responses to the REMOVE prompt are:


YES
Delete the extraneous entry N.

NO
Ignore the error condition.

BAD INODE S TO DESCEND
An internal error has caused an impossible state S to be passed to the routine that descends the filesystem directory structure. fsck exits. If this occurs, contact your service representative or another qualified person.

BAD ENTER STATE S FROM DESCEND
An internal error has caused an impossible state S to be returned from the routine that descends the filesystem directory structure. fsck exits. If you encounter this error, contact your service representative or another qualified person.

BAD STATE S FOR ROOT INODE
An internal error has caused an impossible state S to be assigned to the root inode. fsck exits. If this occurs, contact your service representative or another qualified person.

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004