Today found VPS typing crontab-e actually prompted "Disk quota exceeded" cannot be edited. So "Df-h" looked up the system disk space use 100%. The last location is/var/spool/mail/root This file has several G. Then clean up and solve the problem. If you don't know which files are taking up disk space, look for the large file method below. Linux operating systems often encounter problems with full disk space. Encounter such a problem, first check what is the file is too large or too much to cause, as for the cause of this deeper layer, first not discussed. How to view the path of large files, there is a command in Linux, called Du,
Paste First command: du-m--max-depth=1 or du-h--max-depth=1du: Used to count the size of the disk space occupied by files or directories in Linux du parameter ######-
M: Display query results in m units
-H: Display query results in K, M, G for improved readability of information
--max-depth=1: Where the number "1" refers to the maximum number of directory layers displayed in the query results, where a maximum of one level of directory is displayed. Examples are as follows:
Then, using this command, layer-by-level (directory) drill-down, so that you will be able to query to the directory of large files, but it may also be caused by too many files in the directory. When a large file is found, if for some reason you do not want to delete the file, you can clear the contents of the file with the Echo or cat or clear command:
echo >/var/log/big.log This command clears the contents of the Big.log file in the/var/log directory without deleting the Big.log file
Cat >/var/log/big.log This command works the same as echo >/var/log/big.log, but after the command executes, it needs to end with "Ctrl + D"
Clear >/var/log/big.log This command empties the contents of the Big.log file without deleting the file
==========================================================
Another situation: it may be that the inode is exhausted.
Use # Df-i to view.
Really is the inode ran out, the disk can no longer write new content, this is some temporary small files too much, the inode ran out, delete it on the line.
# Find/var/spool/clientmqueue-type f-print-exec rm-f {} \;
The/var/spool/clientmqueue in this command is the directory where the files are to be deleted-type F This parameter restricts find to find only normal files (that is, not pipeline files, not block files, not link files, not directories, etc.), preventing accidental deletion of system files.
Cause Analysis: There are users in the system to open cron, and Cron executes the program has output content, the output will be sent to the user in the mail, cron, and SendMail did not start to produce these files;
The CentOS disk is full, look for large files and clean up