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

When I create ext4 filesystem, there are many "features", which I can enable and disable - like has_journal, extent, huge_file and so on. Is there any way to know, which options were used while creating ext4 filesystem (after it been created, I mean)?

I have existed ext4 partition (created by somebody), but even don't know, did it use journal or extents.

share|improve this question

migrated from stackoverflow.com Feb 26 '10 at 11:54

This question came from our site for professional and enthusiast programmers.

4 Answers 4

up vote 4 down vote accepted

I suppose you could use the dumpe2fs utility, to get a dump of ext2/etx3/ext4 filesystme informations.

For instance, something like this might do :

sudo dumpe2fs /dev/sda5 | more

ANd the beginning of the output looks like this, on my computer :

Last mounted on:          /
Filesystem UUID:          848446d9-a158-4442-905c-9a9551b0eb1a
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              732960
Block count:              2929846
Reserved block count:     146492
...
share|improve this answer

You can use tune2fs to list out:

$ su -c "tune2fs -l /dev/sda6" | grep features
Password:
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
$
share|improve this answer

You can use file -s $DEVICE which outputs on my system:

# /dev/dm-0: Linux rev 1.0 ext4 filesystem data (needs journal recovery) (extents) (large files) (huge files)
share|improve this answer
    
Although this works, it does not show all of the filesystem options that the accepted answer would. –  Paul Wagland May 10 '11 at 21:34

If you want ot know what the options means, they should should be mentioned in the ext4 documentation that would be included with the kernel source. You can find the documentation online here. This should be true of all filesystems, and a typical location if you have the source on the server would be /usr/src/linux-source-2.6.27/Documentation/filesystems

share|improve this answer

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.