Ubuntu 10.04.3 LTS x86_64, I am seeing the following in /var/log/messages
:
EXT4-fs warning (device sda3): ext4_dx_add_entry: Directory index full!
Relevant info from dumpe2fs:
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
Free blocks: 165479247
Free inodes: 454382328
Block size: 2048
Inode size: 256
I've already read some other questions, such as ext3_dx_add_entry: Directory index full and rm on a directory with millions of files; those made me think that there must be a directory with a big number of items in it somewhere.
Since it is a rather complex directory organization I have a basic problem: how can I find the directory which is generating those messages?
find /path -maxdepth 1 -type d -printf '%p - %k\n'
That will show the disk space used up by the directory's inode, which should be proportional to the entries in that directory. It think anything else will require more involved scripting, e.g., perl with a find subroutine that does actual counts.