I. Problems found:
When a file is created in A/Data Partition of a Linux server with a low configuration (small memory and hard disk), the system prompts that the disk space is insufficient, run the DF-H command to check the disk usage and find that the/Data Partition only uses 66%, and there is still 12 GB of space. This problem does not occur.
Ii. analyze the problem:
Later, I used DF-I to check the index node (inode) of the/Data Partition and found that it was full (iused = 100%). As a result, the system could not create new directories and files.
Inode is an index node. After the partition of each storage device (such as a hard disk) or storage device is formatted as a file system, there should be two parts, one part is inode, another part is block, which is used to store data. Inode is used to store the data information, including the file size, owner, owner user group, and read/write permissions. Inode indexes information for each file, so there is an inode value. Based on commands, the operating system can find the corresponding files with the fastest inode value.
While the block on this server is still available, the inode is full. Therefore, when creating a new directory or file, the system prompts that the disk space is insufficient.
Iii. Find the cause:
The/data/cache directory contains a large number of small-byte cached files, occupying a small number of blocks, but occupying a large number of inode.
Iv. solution:
1. delete some files in the/data/cache directory and release some inode of the/Data Partition.
2. Use a soft connection to connect the newcache directory in the idle partition/opt to/data/cache, and use the inode of the/OPT partition to alleviate the problem of inode deficiency in the/Data Partition:
Ln-S/opt/newcache/data/Cache