http://blog.chinaunix.net/uid-23284114-id-5749136.html
巡检时,一台oracle数据库操作系统/var/log/message日志中有大量如下warning:
Aug 4 09:18:23 your_hostname kernel: EXT4-fs warning (device sda5): ext4_dx_add_entry:2024: Directory index full!
Aug 4 09:18:23 your_hostname kernel: EXT4-fs warning (device sda5): ext4_dx_add_entry:2024: Directory index full!
Aug 4 09:18:23 your_hostname kernel: EXT4-fs warning (device sda5): ext4_dx_add_entry:2024: Directory index full!
Aug 4 09:18:25 your_hostname kernel: EXT4-fs warning (device sda5): ext4_dx_add_entry:2024: Directory index full!
Aug 4 09:18:25 your_hostname kernel: EXT4-fs warning (device sda5): ext4_dx_add_entry:2024: Directory index full!
Aug 4 09:18:25 your_hostname kernel: EXT4-fs warning (device sda5): ext4_dx_add_entry:2024: Directory index full!
Aug 4 09:18:25 your_hostname kernel: EXT4-fs warning (device sda5): ext4_dx_add_entry:2024: Directory index full!
Aug 4 09:18:25 your_hostname kernel: EXT4-fs warning (device sda5): ext4_dx_add_entry:2024: Directory index full!
产生warning原因如下:
单个目录下的子目录和文件超过64k个。
经排查,Oracle的adump目录下有9113975个.aud文件,将文件删除后,warning不再产生。
涉及命令:
1) 统计当前文件夹下文件的个数
ls -l |grep "^-"|wc -l
2) 统计当前文件夹下目录的个数
ls -l |grep "^d"|wc -l
3) 统计当前文件夹下文件的个数,包括子文件夹里的
ls -lR|grep "^-"|wc -l
4) 统计文件夹下目录的个数,包括子文件夹里的
ls -lR|grep "^d"|wc -l