When this error is reported, the first response is that the disk space is full. However
DFAt first glance, the space in each partition is quite surplus. Slave
MuninIn the Monitoring Chart, the filesystem usage is also very stable, but the inode usage below is problematic, and the usage of one of the partitions has reached 100%. Run the DF-I check on the server, and inode is exhausted. In the past, this partition was used to throw various logs and temporary files. Some of the temporary files generated by a program were small and large, and no scheduled rollback was performed, the inode of the file system is used up before the disk space is exhausted.
In a Linux/Unix like OS file system, the node in each directory tree does not directly contain the file information as in windows, but only contains the file name and inode number. The inode node corresponding to the file name found by the inode number records the actual file size, physical address, owner, access permission, timestamp, number of hard links, and so on.Metadata. Therefore, you can use hard link in Linux to create countless file names in different directories for a file, while the actual file data only needs to be copied.
But because of the structure of this file system, when you perform Io operations in Linux, the required resources need to have the remaining inode in addition to the disk space. By default, Linux calculates the maximum number of inode entries for each partition based on 2 k disk space corresponding to one inode during system installation. After a file system is created, the number of inode available for each partition cannot be dynamically adjusted.
Normally, the inode of a partition is not used up and the disk space is still insufficient, unless the small junk files that I have encountered are too long to be effectively cleaned up. However, if necessary, you can create a file system (for exampleMke2fs; If you want to store a large number of mini files smaller than 2 kb, consider creating more inode ).
Appendix:Inode definition by the Linux Information Project
The reason why other people encounter no space left on device:
The maximum number of Message Queue running in the system is exceeded.: Use sysctl kernel. msgmni under root to check this parameter. Set sysctl-W kernel. msgmni = xxx again.
CVS abnormal disconnection leaves a large number of temporary files in the/tmp directory, causing the/tmp directory to be full.