First, find the problem:
In a low-profile Linux server (memory, hard disk relatively small) in the/data partition to create files, the system prompted insufficient disk space, with the df-h command to see the disk usage, found that the/data partition only used 66%, and 12G of the remaining space, it is said that this problem does not occur.
Second, the analysis of the problem:
Later, using Df-i to view the index node (inode) of the/data partition, it was found to be full (iused=100%), which prevented the system from creating new directories and files.
Inode into Chinese is the index node, each storage device (such as a hard disk) or storage device partition is formatted as a file system, there should be two parts, part of the inode, and the other part of the Block,block is used to store data. The inode is the information that is used to store this data, including file size, owner, attribution user group, read-write permission, and so on. The Inode indexes the information for each file, so there is a value for the inode. According to the instructions, the operating system can find the corresponding file by the Inode value.
The server's block, while remaining, but the inode is full, so when you create a new directory or file, the system prompts for insufficient disk space.
Third, find the reason:
There are a very large number of small-byte cache files in the/data/cache directory, with no more blocks, but a lot of inode.
Four, the solution:
1. Delete some files in the/data/cache directory and release part of the inode from the/data partition.
2. Use a soft connection to connect the Newcache directory in the free partition/opt to the/data/cache, using the inode of the/OPT partition to alleviate the problem of insufficient/data partition Inode:
Ln-s/opt/newcache/data/cache
A single failure caused by a full Linux index node (inode)