Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

ext4.wiki.kernel.org makes it sound like e2fsck was simply renamed to e4fsck so that e4fsprogs and e2fsprogs could coexist without overlapping. However, there is no mention of any difference in the code of the command.

The e2fsck man page makes no mention of ext4, but does mention that it works with ext3 (i.e. ext2 with journaling turned on).

For Ubuntu, apparently e2fsck can handle ext2, 3 and 4 filesystems.

And of course there's good ol' vanilla fsck which itself makes no mention of ext4.

If I need to fsck an ext4 file system on a RHEL based system, which tool do I use? e4fsck? But if it's just a rename of e2fsck, can I just use that instead? Why does Ubuntu mention ext4 in its e2fsck man page but no one else seems to? And what about plain fsck on ext4?

EDIT:

On a Fedora 14 machine there is fsck.ext4, fsck.ext3 and fsck.ext2 in /sbin/. They all have the exact same file size. Curioser and Curioser.

EDIT 2:

Furthermore, when running fsck.ext4, you see that it appears to be e2fsck running. For example, I see this line when running fsck.ext4: e2fsck: aborted Tricksters!

share|improve this question
1  
Aaaaa! Who let the Choptars in here? –  Caleb Aug 5 '11 at 18:39
add comment

1 Answer

up vote 5 down vote accepted

e4fsprogs on RHEL5 is just a newer version of e2fsprogs. Red Hat has a policy of not upgrading to newer, binary-incompatible versions of things, so they "had to" stay on the old e2fsprogs they were using, and the solution they came up with to support ext4 was to introduce the newer version as e4fsprogs (with s/2/4/ on all of the command names). To make matters worse, ext4 support on RHEL 5 is technically a "technology preview".

I understand why they did it, but it is annoying, since you won't find e4fs* on any other distribution, including RHEL 6.

share|improve this answer
    
Thanks Steven! Is the situation any clearer in RHEL / CentOS 6? Furthermore, it seems like this is not the normal behavior on most other distributions. e4fsck and fsck.ext4 seem to be RHEL-only anomalies. Am I to take it that updated versions of fsck can handle ext4 just fine? –  Wesley Aug 5 '11 at 19:12
    
By "any other distribution", I meant including newer RHEL, so I edited that into my answer. And yes, newer e2fsprogs handle ext2, ext3, and ext4 equally well. –  Steven Pritchard Aug 5 '11 at 19:34
    
/sbin/fsck.* are there to make fsck -t work. That's totally normal. The various fsck.ext* are hard links to e2fsck, which is why they appear to have the same size and such. They're actually different names for the same file. Well, except on RHEL 5, where /sbin/fsck.ext4 is a hard link to /sbin/e4fsck instead. –  Steven Pritchard Aug 5 '11 at 19:37
    
... and e4fsck is just e2fsck which is just fsck. Totally get it now. =) –  Wesley Aug 5 '11 at 19:43
    
ext4 was Tech Preview from RHEL 5.3 to 5.5, but in 5.6+ it's fully supported. –  m0dlx Oct 7 '11 at 17:59
add comment

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.