Key Pages: Home | WikiSyntax | Recent Changes
Recently Viewed: fsck
fsck
What The Fsck?

WARNING: If you dont know what e2fsck is turn around and run far far away, quickly now.

I'm quite irritated by having to just blindy say 'y' or run e2fsck with the -y parameter whenever a filesystem gets damaged without having a good resource to refer to about what I'm actually being asked to okay. I plan to put together some resources here about e2fsck and its wonderful messages.

If you've had a heavily used filesytem, I've found adding the -D to optimise directories may have a noticible impact on performance if it has started to degrade.


Feel free to add your own wonderful experiences.



E2fsck Pass 1 Errors : Checking inodes, blocks, and sizes

Deleted inode 14 has zero dtime. Fix?

 
This is a fairly simple error, what it means is that a file was open but deleted when the system was uncleanly shutdown. Let me explain further, you can open a file, delete it, and read and write to it even after it was deleted. This is useful for various things, but it is one thing that is frustrating in windows , when you cant rename or delete a file as it is in use. When everything has stopped using the deleted file, the system then frees the disk, this error signifies this has happened and is not much to worry about. This will however cause a number of other errors to show, which in turn, are pretty harmless.

Other E2fsck Passes

Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

E2fsck Example

I deliberately corrupted a small filesystem to show example harmless output of the above.

fs1.e2fs was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 14 has zero dtime. Fix? yes

Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: -28
Fix? yes

Free blocks count wrong for group #0 (107, counted=108).
Fix? yes

Free blocks count wrong (107, counted=108).
Fix? yes

Inode bitmap differences: -14
Fix? yes

Free inodes count wrong for group #0 (4, counted=5).
Fix? yes

Free inodes count wrong (4, counted=5).
Fix? yes


fs1.e2fs: ***** FILE SYSTEM WAS MODIFIED *****
fs1.e2fs: 11/16 files (0.0% non-contiguous), 20/128 blocks