No space left on Device

Source: Internet
Author: User
Tags inode usage
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.

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.