Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Why fsck is so slow on ext4 filesystem? I was always using reiserfs or xfs and with those systems fsck was really fast, just few seconds. Now i decided to give a try ext4 but i'm dissapointed that everytime the system has to fsck my homedir it takes ages (can be 25minutes on my 250GB home partition that is 85% full). Maybe it's because it was converted from ext3?

share|improve this question

3 Answers 3

Conversions from ext3 will not fully utilize extents. It simply upgrades the inodes and leaves them as extents of size 1. If you run the files through a program like tar, you might be able to acquire better compressed extents files.

It also matters how you converted from ext3 to ext4; different options have different capabilities and may impact fsck time. Additionally, I think a full drive is going to take longer to fsck; you're checking some 200GB worth of data after all, and probably tripled the size inodes take up.

What you might do is file a bug with the distribution who built the kernel you're using, or the kernel bugzilla directly. This is the sort of behavior that upstream is interested in diagnosing and fixing, after all.

share|improve this answer

Recreating your filesystem with the additional options "-O extent,uninit_bg" will improve your ext4 fsck time.

  • "extent" will reduce the metadata overhead of large files
  • "uninit_bg" will create a fs without initializing all of the block groups. This will improve mkfs and fsck because there's less metadata to check (at least as long as your fs is not full).
share|improve this answer
1  
True. especially the uninit_bg option will help tremendously to speed up fsck. I believe Ubuntu 9.04 enables this option by default if you create a new ext4 fs. –  Martijn Heemels Aug 23 '09 at 11:04

My 400GB ext3 partition also takes an annoying long time during fsck. In addition, as volumes get larger, fsck will take too long. Quoting this article:

1 EB (Exabyte) is going to be more than enough storage for a very long time – indeed a complete e2fsck run on a file system of this size would (on current hardware) take more than 100 years.

So, I really hope filesystems and their tools get better very soon, or else running fsck on them will be unfeasible.

share|improve this answer
    
well, over a single SATA 3 link (assuming 0.6 GByte/s) it would take more than 50 years just to read one Exabyte... –  Andre Holzner Jan 29 '11 at 18:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.