A solution to the problem of inodes occupation

Source: Internet
Author: User

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= ""

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.