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.

I noticed the e attribute on several files/directories on Linux machines installed on ext4 filesystems.

[kelly@p2820887.pubip.serverbeach.com ~]$ lsattr -d /bin
-------------e- /bin

According to chattr(1):

The ’e’ attribute indicates that the file is using extents for mapping the blocks on disk. It may not be removed using chattr(1).

In what way is this different, and more importantly, in what way is this detail significant -- specifically why is this detail important enough to be reported as a file attribute? Under what circumstances should I ever change my behavior based on the knowledge that this file "is using extents for mapping the blocks on disk"? Presumably this is something I need to know, otherwise it wouldn't be made so obvious, right?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

I think the extent flag is exposed as an attribute mainly so that you can set it with chattr, which will cause the ext4 driver to reallocate the file using extents instead of block lists. If you've converted an existing ext3 filesystem to ext4 (by using tune2fs to enable the new feature flags), you'll probably want to convert the existing files to use extents, and this is the way to do it.

Newly-created files on an ext4 filesystem always use extents (as far as I know), so if your filesystem was created as ext4 (as opposed to converted from ext3), everything should have the extent attribute already so you don't need to worry about it.

See this article for more information.

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.