2

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?

1 Answer 1

5

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.
1
  • I should point out that you need to unmount the filesystem before running the e2fsck command...
    – Insyte
    Aug 19, 2009 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .