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.

It's often recommended to enable dir_index option on ext3 filesystems e.g. with

sudo tune2fs -O dir_index /dev/dm-1

However, existing directories on that filesystem are not converted to indexed format automatically.

Is there any way to tell if particular directory has been indexed?

share|improve this question

1 Answer 1

I'm not aware of a way to tell if a directory has been indexed, but you can ensure that they all get indexed by running this after setting the dir_index option:

e2fsck -D /dev/dm-1

From the e2fsck man page:

    -D     Optimize  directories  in filesystem.  This option causes e2fsck
           to try to optimize all directories, either by reindexing them if
           the  filesystem  supports directory indexing,  or by sorting and
           compressing directories for smaller directories, or for filesys-
           tems using traditional linear directories.
share|improve this answer
    
I should point out that you need to unmount the filesystem before running the e2fsck command... –  Insyte Aug 19 '09 at 16: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.