In linux, df -Th checks that the disk space is not full, but executes df -i 100% solution

 

Inodes introduces
that file data is stored in "blocks" under the Linux system, and the meta information of the file, such as the creator of the file, the date of creation of the file, the size of the file, etc. This area that stores file meta information is called inode, and the Chinese translation is "index node".

The inode also occupies hard disk space. When the hard disk is formatted, the operating system automatically divides the hard disk into two areas. One is the data area, which stores file data; the other is the inode area (inode table), which stores the information contained in the inode.

The size of each inode node is generally 128 bytes or 256 bytes. The total number of inode nodes is given when formatting, generally an inode is set every 1KB or every 2KB. Assuming that in a 1GB hard disk, the size of each inode node is 128 bytes, and an inode is set for every 1KB, then the size of the inode table will reach 128MB, accounting for 12.8% of the entire hard disk.

Inodes resource exhaustion
Running out of inodes is similar to running out of storage space, both cannot create files or execute some commands normally. After the inodes are used up, there may still be storage space. In this case, a large number of small files are generated and the inode table is full.

Generally, when the storage space is used up, only a few percent of the inodes are used, so it is easy to ignore the monitoring of the inodes usage.

Solution
Check with the following script to see which directory has the most files

find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n

Then find the directory with the largest number of files, delete it, and view it with df -i after deletion. 

Guess you like

Origin blog.csdn.net/a694704123b/article/details/125332866