Inodes occupies 100% of the problem

Source: Internet
Author: User
/dev/mapper/volgroup00-logvol00 's full. On the problem of Inodes occupancy 100% and its solution

Turn from: http://blog.sina.com.cn/s/blog_4d10f5530102vt5b.html

/dev/mapper/volgroup00-logvol00 is the logical volume/root directory where the actual mount is actually mounted. Root partitions are full, clean some garbage files or add a hard disk online expansion, mainly look at the/tmp/var directory of some temporary files and some log files, select some of the cleaning to give you a command ' to see what directory under the big Find/-size +10m-exec ls-lh {} \;

Df-i

For i in./*; do echo $i; Find $i | Wc-l; The number of documents to be searched



Today, Nagios Alarm, a server full of disk, using DU-SH * or du-sh/* View the size of the directory, look for large space occupied directory/var/spool/clientmqueue ....

Then I want to/var/spool/clientmqueue this directory why use, tangled up for a long time, Google, the original/var/spool/clientmqueue is if the system has a user to open cron, and cron executed program has output content, The output is sent to the cron user in the form of a message, and the SendMail is not started so the files are generated.

The server does have cron timed to execute dozens of scripts, and there is no output orientation set, and the cumulative files are saved under the/var/spool/clientmqueue directory le = =.

Workaround: Add the >/dev/null 2>&1 after Cron's automatic execution statement: 4 3 * * */usr/bin/w >/dev/null 2>&1 This will not be written to the directory ....

To say here,/var/spool/clientmqueue directory files are too many, RM-RF * time will prompt:

"-bash:/bin/rm:argument list too long". It means that the parameter is too long and RM can't do it. can use LS | Xargs rm-f This command deletes all files in the/var/spool/clientmqueue directory.

Ok. Clean up ~



Situation Description: Today we mail server can not send and receive mail, and connected to the server on the open service can not open, starting to think that the disk space is insufficient, DF looked at

Found that the space is sufficient, and then Df-i looked at the next inodes, found that the Inodes value under the root directory is 100%.

Workaround: Check with the following script to see which directory has the most files below:

For i in/*; do echo $i; Find $i | Wc-l; Done (if it is determined to be under a directory, then/converted to the directory absolute path, such as/var/spool, then use for I in/var/spool/*; do echo $i; Find $i | Wc-l; Done

Finally found the/VAR/SOPPL directory most. And then further determined that there are millions of documents under the/var/spool/amavisd/quarantine directory, the machine has been unable to display the normal, and then Baidu looked at this directory is the mail server, processing spam live virus message isolation, understand why, Delete all files in the directory; Use the Xargs command to delete a larger number of files:

ls | Xargs-n RM-RF

After about more than 10 hours of execution, the final problem is resolved.


Action command:

For I in/var/spool/*; do echo $i; Find $i | Wc-l; Done

[Root@l-ap-3-37 ~]# Cd/var/spool/clientmqueue

[Root@l-ap-3-37 clientmqueue]# ls | Xargs rm-f

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.