Section: Maintenance Commands (8)
Updated: August 2014
e2fsck is used to check the ext2/ext3/ext4 family of file systems. For ext3 and ext4 filesystems that use a journal, if the system has been shut down uncleanly without any errors, normally, after replaying the committed transactions in the journal, the file system should be marked as clean. Hence, for filesystems that use journalling, e2fsck will normally replay the journal and exit, unless its superblock indicates that further checking is required.
device is the device file where the filesystem is stored (e.g. /dev/hdc1).
Note that in general it is not safe to run e2fsck on mounted filesystems. The only exception is if the -n option is specified, and -c, -l, or -L options are not specified. However, even if it is safe to do so, the results printed by e2fsck are not valid if the filesystem is mounted. If e2fsck asks whether or not you should check a filesystem which is mounted, the only correct answer is ``no''. Only experts who really know what they are doing should consider answering this question in any other way.
The exit code returned by e2fsck is the sum of the following conditions:
0 - No errors
1 - File system errors corrected
2 - File system errors corrected, system should
4 - File system errors left uncorrected
8 - Operational error
16 - Usage or syntax error
32 - E2fsck canceled by user request
128 - Shared library error
The following signals have the following effect when sent to e2fsck.
Almost any piece of software will have bugs. If you manage to find a filesystem which causes e2fsck to crash, or which e2fsck is unable to repair, please report it to the author.
Please include as much information as possible in your bug report. Ideally, include a complete transcript of the e2fsck run, so I can see exactly what error messages are displayed. (Make sure the messages printed by e2fsck are in English; if your system has been configured so that e2fsck's messages have been translated into another language, please set the the LC_ALL environment variable to C so that the transcript of e2fsck's output will be useful to me.) If you have a writable filesystem where the transcript can be stored, the script?(1) program is a handy way to save the output of e2fsck to a file.
It is also useful to send the output of dumpe2fs?(8). If a specific inode or inodes seems to be giving e2fsck trouble, try running the debugfs?(8) command and send the output of the (1u) command run on the relevant inode(s). If the inode is a directory, the debugfs dump command will allow you to extract the contents of the directory inode, which can sent to me after being first run through uuencode?(1). The most useful data you can send to help reproduce the bug is a compressed raw image dump of the filesystem, generated using e2image?(8). See the e2image?(8) man page for more details.
This version of e2fsck was written by Theodore Ts'o <firstname.lastname@example.org>.
Tutoriais de Tecnologia Web