![ext3_dx_add_entry:目录索引已满](https://linux22.com/image/561712/ext3_dx_add_entry%EF%BC%9A%E7%9B%AE%E5%BD%95%E7%B4%A2%E5%BC%95%E5%B7%B2%E6%BB%A1.png)
背景:我在 CentOS 5.3 上运行 lighttpd 1.4.28-1 来提供静态资产。
信号:最近,它有时会变慢。我在内核日志中收到以下错误/var/log/messages
:
proftpd[5145]: (::ffff:xx[::ffff:xx]) - FTP session opened.
proftpd[5145]: (::ffff:xx[::ffff:xx]) - Preparing to chroot to directory 'xx'
EXT3-fs warning (device dm-3): ext3_dx_add_entry: Directory index full!
Sep 16 15:30:34 xx last message repeated 489 times
inode 信息:
df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/ddf1_p3
77037568 9996012 67041556 13% /
/dev/mapper/ddf1_p1
26104 35 26069 1% /boot
tmpfs 505834 1 505833 1% /dev/shm
文件系统的内容:
tune2fs 1.39 (29-May-2006)
Filesystem volume name: /
Last mounted on: <not available>
Filesystem UUID: 3e9a2bc7-b6d3-4c62-b31d-a9b8ea5ea106
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 77037568
Block count: 77017618
Reserved block count: 3850880
Free blocks: 52289663
Free inodes: 67588146
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1005
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 32768
Inode blocks per group: 1024
Filesystem created: Fri Oct 30 16:00:47 2009
Last mount time: Fri Sep 9 01:43:27 2011
Last write time: Fri Sep 9 01:43:27 2011
Mount count: 7
Maximum mount count: -1
Last checked: Fri Oct 30 16:00:47 2009
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
First orphan inode: 75267694
Default directory hash: tea
Directory Hash Seed: 08fb2c9a-2241-4344-973f-045753e3d9ed
Journal backup: inode blocks
lighttpd 的文档根目录是/data/www/lighttpd
,快速计数告诉我最大的文件夹仅包含 2k 个文件:
find . -type d | while read d; do f=`ls -1 "$d" | wc -l`; echo $f $d; done | sort -n
日志是否损坏?还有其他原因导致此问题吗?
答案1
我遇到了类似的问题并解决了文件系统检查经过快速研究后,我找到了这篇博文:http://rackerhacker.com/2008/10/13/ext3_dx_add_entry-directory-index-full/
注意:我强烈建议在执行与文件系统相关的任何操作之前备份所有数据。