The fsck command checks EFS filesystem consistency and sometimes repairs problems that are found. It is not used on XFS filesystems. This appendix describes the messages that are produced by each phase of fsck, what they mean, and what you should do about each one.
The sections in this appendix are:
The following abbreviations are used in fsck error messages:
| BLK | block number | |
| DUP | duplicate block number | |
| DIR | directory name | |
| MTIME | time file was last modified | |
| UNREF | unreferenced |
The following sections use these single-letter abbreviations:
| B | block number | |
| F | file (or directory) name | |
| I | inode number | |
| M | file mode | |
| O | user ID of a file's owner | |
| S | file size | |
| T | time file was last modified | |
| X | link count, or number of BAD, DUP, or MISSING blocks, or number of files (depending on context) | |
| Y | corrected link count number, or number of blocks in filesystem (depending on context) | |
| Z | number of free blocks |
In actual fsck output, these abbreviations are replaced by the appropriate numbers.
The command line syntax is checked. Before the filesystem check can be performed, fsck sets up some tables and opens some files. The fsck command terminates if there are initialization errors.
Two error messages may appear in any phase. Although fsck prompts for you to continue checking the filesystem, it is generally best to regard these errors as fatal. Stop the command and investigate what may have caused the problem.
| CAN NOT READ: BLK B (CONTINUE?) |
| |
| CAN NOT WRITE: BLK B (CONTINUE?) |
|
This phase checks the inode list. It reports error conditions resulting from:
checking inode types
setting up the zero-link-count table
examining inode block numbers for bad or duplicate blocks
checking inode size
checking inode format
Phase 1 has three types of error messages: information messages, messages with a CONTINUE? prompt, and messages with a CLEAR? prompt. The responses that you give to phase 1 prompts affect fsck functions. The possible responses are discussed in the next section, “Phase 1 Responses.” Typically, the right answer is yes, except as noted.
| UNKNOWN FILE TYPE I=I (CLEAR?) |
| |
| LINK COUNT TABLE OVERFLOW (CONTINUE?) |
| |
| B BAD I=I | Inode I contains block number B with a number lower than the number of the first data block in the filesystem or greater than the number of the last block in the filesystem. This error condition may invoke the EXCESSIVE BAD BLKS error condition in Phase 1 if inode I has too many block numbers outside the filesystem range. This error condition invokes the BAD/DUP error condition in Phase 2 and Phase 4. | |
| EXCESSIVE BAD BLOCKS I=I (CONTINUE?) |
| |
| B DUP I=I | Inode I contains block number B, which is already claimed by another inode. This error condition may invoke the EXCESSIVE DUP BLKS error condition in Phase 1 if inode I has too many block numbers claimed by other inodes. This error condition invokes Phase 1B and the BAD/DUP error condition in Phase 2 and Phase 4. Typically, you should answer no the first time this error appears and yes the second time if you know the files claimed by the other inode. | |
| EXCESSIVE DUP BLKS I=I (CONTINUE?) |
| |
| DUP TABLE OVERFLOW (CONTINUE?) |
| |
| PARTIALLY ALLOCATED INODE I=I (CLEAR?) |
| |
| RIDICULOUS NUMBER OF EXTENTS (n) (max allowed n) |
| |
| ILLEGAL NUMBER OF INDIRECT EXTENTS (n) |
| |
| BAD MAGIC IN EXTENT |
| |
| EXTENT OUT OF ORDER |
| |
| ZERO LENGTH EXTENT |
| |
| ZERO SIZE DIRECTORY |
| |
| DIRECTORY SIZE ERROR |
| |
| DIRECTORY EXTENTS CORRUPTED |
| |
| NUMBER OF EXTENTS TOO LARGE |
| |
| POSSIBLE DIRECTORY SIZE ERROR |
| |
| POSSIBLE FILE SIZE ERROR |
|
Table A-1 explains the significance of responses to Phase 1 prompts:
Table A-1. Meaning of fsck Phase 1 Responses
Prompt | Response | Meaning |
|---|---|---|
CONTINUE? | n | Terminate the command. |
CONTINUE? | y | Continue with the command. This error condition means that a complete check of the filesystem is not possible. A second run of fsck should be made to recheck this filesystem. |
CLEAR? | n | Ignore the error condition. A “no” response is appropriate only if the user intends to take other measures to fix the problem. |
CLEAR? | y | Deallocate inode I by zeroing its contents. This may invoke the UNALLOCATED error condition in Phase 2 for each directory entry pointing to this inode. |
When a duplicate block is found in the filesystem, the filesystem is rescanned to find the inode that previously claimed that block. When the duplicate block is found, the following information message is printed:
| B DUP I=I | Inode I contains block number B, which is already claimed by another inode. This error condition invokes the BAD/DUP error condition in Phase 2. Inodes with overlapping blocks may be determined by examining this error condition and the DUP error condition in Phase 1. |
This phase traverses the pathname tree, starting at the root directory. fsck examines each inode that is being used by a file in a directory of the filesystem being checked.
Referenced files are marked in order to detect unreferenced files later on. The command also accumulates a count of all links, which it checks against the link counts found in Phase 4.
Phase 2 reports error conditions resulting from the following:
root inode mode and status incorrect
directory inode pointers out of range
directory entries pointing to bad inodes
fsck examines the root directory inode first, since this directory is where the search for all pathnames must start.
If the root directory inode is corrupted, or if its type is not directory, fsck prints error messages. Generally, if a severe problem exists with the root directory it is impossible to salvage the filesystem. fsck allows attempts to continue under some circumstances.
Possible error messages caused by problems with the root directory inode are shown below. The possible responses are discussed in the next section, “Phase 2 Responses.”
| ROOT INODE UNALLOCATED. TERMINATING |
If this problem occurs on the Root filesystem, you must reinstall IRIX. If it occurs on another filesystem, you must recreate the filesystem using mkfs and recover files and data from backups. | |
| ROOT INODE NOT A DIRECTORY. FIX? |
| |
| DUPS/BAD IN ROOT INODE. CONTINUE? |
|
Other Phase 2 messages have a REMOVE? prompt. These messages are:
| I OUT OF RANGE I=I NAME=F (REMOVE?) |
| |
| UNALLOCATED I=I OWNER=O MODE=M SIZE=S MTIME=T NAME=F(REMOVE?) |
| |
| DUP/BAD I=I OWNER=O MODE=M SIZE=S MTIME=T DIR=F (REMOVE?) |
| |
| DUP/BAD I=I OWNER=O MODE=M SIZE=S MTIME=T FILE=F (REMOVE?) |
|
Table A-2 describes the significance of responses to Phase 2 prompts:
Table A-2. Meaning of Phase 2 fsck Responses
Prompt | Response | Meaning |
|---|---|---|
FIX? | n | fsck terminates. |
FIX? | y | fsck treats the contents of the inode as a directory, even though the inode mode indicates otherwise. If the directory is actually intact, and only the inode mode is incorrectly set, this may recover the directory. |
CONTINUE? | n | fsck terminates. |
CONTINUE? | y | fsck attempts to continue with the check. If some of the root directory is still readable, pieces of the files system may be salvaged. |
REMOVE? | n | Ignore the error condition. A “no” response is appropriate only if the user intends to take other action to fix the problem. |
REMOVE? | y | Remove a bad directory entry. |
Phase 3 of fsck locates any unreferenced directories detected in Phase 2 and attempts to reconnect them. It reports error conditions resulting from:
unreferenced directories
missing or full lost+found directories
Phase 3 has two types of error messages: information messages and messages with a RECONNECT? prompt. The possible responses are discussed in the next section, “Phase 3 Responses.”
| UNREF DIR I=I OWNER=O MODE=M SIZE=S MTIME=T (RECONNECT?) |
| |
| SORRY. NO lost+found DIRECTORY |
Use fsck -l to recover and remake the lost+found directory as soon as possible. | |
| SORRY. NO SPACE IN lost+found DIRECTORY |
Use fsck -l to recover and clean out the lost+found directory as soon as possible. | |
| DIR I=I1 CONNECTED. PARENT WAS I=I2 |
|
Table A-3 explains the significance of responses to Phase 3 prompts:
Table A-3. Meaning of fsck Phase 3 Responses
Prompt | Response | Meaning |
|---|---|---|
RECONNECT? | n | Ignore the error condition. This invokes the UNREF error condition in Phase 4. A “no” response is appropriate only if the user intends to take other action to fix the problem. |
RECONNECT? | y | Reconnect directory inode I to the filesystem in the directory for lost files (lost+found). This may invoke a lost+found error condition if there are problems connecting directory inode I to lost+found. If the link was successful, this invokes a CONNECTED information message. |
This phase checks the link count information seen in Phases 2 and 3 and locates any unreferenced regular files. It reports error conditions resulting from:
unreferenced files
a missing or full lost+found directory
incorrect link counts for files, directories, or special files
unreferenced files and directories
bad and duplicate blocks in files and directories
incorrect counts of total free inodes
Phase 4 has five types of error messages:
information messages
messages with a RECONNECT? prompt
messages with a CLEAR? prompt
messages with an ADJUST? prompt
messages with a FIX? prompt
The possible responses are discussed in the next section, “Phase 4 Responses.” The typical answer is yes, except as noted.
Table A-4 describes the significance of responses to Phase 4 prompts:
Table A-4. Meaning of fsck Phase 4 Responses
Prompt | Response | Meaning |
|---|---|---|
RECONNECT? | n | Ignore this error condition. This invokes a CLEAR error condition later in Phase 4. |
RECONNECT? | y | Reconnect inode I to filesystem in the directory for lost files (lost+found). This can cause a lost+found error condition in this phase if there are problems connecting inode I to lost+found. |
CLEAR? | n | Ignore the error condition. A “no” response is appropriate only if the user intends to take other action to fix the problem. |
CLEAR? | y | Deallocate the inode by zeroing its contents. |
ADJUST? | n | Ignore the error condition. A”no” response is appropriate only if the user intends to take other action to fix the problem. |
ADJUST? | y | Replace link count of file inode I with the link counted computed in Phase 2. |
FIX? | n | Ignore the error condition. A “no” response is appropriate only if the user intends to take other action to fix the problem. |
FIX? | y | Fix the problem. |
Phase 5 checks the free-block list. It reports error conditions resulting from:
bad blocks in the free-block list
bad free-block count
duplicate blocks in the free-block list
unused blocks from the filesystem not in the free-block list
total free-block count incorrect
Phase 5 has four types of error messages:
information messages
messages that have a CONTINUE? prompt
messages that have a FIX? prompt
messages that have a SALVAGE? prompt
The possible responses are discussed in the next section, “Phase 5 Responses.” The typical answer is yes.
| FREE BLK COUNT WRONG IN SUPERBLOCK (FIX?) |
| |
| BAD FREE LIST (SALVAGE?) |
|
Table A-5 describes the significance of responses to Phase 5 prompts:
Table A-5. Meanings of Phase 5 fsck Responses
Prompt | Response | Meaning |
|---|---|---|
CONTINUE? | n | Terminate the command. |
CONTINUE? | y | Ignore the rest of the free-block list and continue execution of fsck. This error condition always invokes a BAD BLKS IN FREE LIST error condition later in Phase 5. |
FIX? | n | Ignore the error condition. A “no” response is appropriate only if the user intends to take other action to fix the problem. |
FIX? | y | Replace count in superblock by actual count. |
SALVAGE? | n | Ignore the error condition. A “no” response is appropriate only if the user intends to take other action to fix the problem. |
SALVAGE? | y | Replace actual free-block bitmap with a new free-block bitmap. |
This phase reconstructs the free-block bitmap. There are no error messages that can be generated in this phase and no responses are required.
Once a filesystem has been checked, a few cleanup functions are performed. The cleanup phase displays advisory messages about the filesystem and status of the filesystem.
| X files Y blocks Z free |
| |
| SUPERBLOCK MARKED DIRTY |
| |
| PRIMARY SUPERBLOCK WAS INVALID |
| |
| SECONDARY SUPERBLOCK MISSING |
| |
| CHECKSUM WRONG IN SUPERBLOCK |
| |
| ***** FILE SYSTEM WAS MODIFIED ***** |
| |
| ***** REMOUNTING ROOT... ***** |
|