Blog Original
Amway an introductory article on the neural network of a foreign Daniel I translated
Recently received a server alarm, inodes use too high, the resolution process is as follows
First, execute the following command on the server to see which directory inodes is using too high
[root@vm]# df-i
Filesystem inodes iused IFree iuse% mounted on
/dev/mapper/vgsys-lv_root
655360 101872 553488 16%/
tmpfs 2041469 1 2041468 1%/dev/shm
/dev/vda1 51200 51162 1%/boot
/dev/mapper/vgsys-lv_var
655360 569533 85827 87 %/var
/dev/mapper/vgsys-lv_srv
104644608 1727 104642881 1%/srv
/dev/mapper/vgsys-lv_ VFS
52428800 7 52428793 1%/srv/docker/vfs
/dev/mapper/vgsys-lv_log
31457280 207 31457073 1%/var/log
You can find the maximum use of inodes in the/var directory, and use the following script to find further
[root@vm]# for I in/var/*; do echo $i; Find $i | Wc-l; Done
/var/account
2
/var/cache
98
... /var/spool
587003
/var/tmp
1
By this method, the final discovery is that there are too many small files in the/var/spool/postfix/maildrop directory.
Search by Internet for the following reasons:
Because Linux executes cron, the output and warning information in the script will be sent to the Cron owner in the form of a message, and the
Mail is sent unsuccessfully because SendMail and postfix in the customer's environment are not working properly , all the small files accumulate under the Maildrop directory
, and there is no mechanism to automatically clean up the conversion, so this directory accumulates a large number of files
Enter the/var/spool/postfix/maildrop path using LS | Xargs-n RM-RF The document clear and the problem recovered. Fundamental Solutions
Vi/etc/crontab
replace mailto=root with mailto= "" and then service Crond restart. If not crontab-e the first line adds mailto= ""