Linux File System
9. Actual Problems
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. 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.
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.
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
Summary:
Inode(Inode numbers are used in the inode table)
InodeId uniquely identifies a file (in a file system)
InodeOnce the file is used up, it cannot be created.
InodeSet to large: You can create multiple files.
InodeSmall setting: a small number of files can be created.
Block
BlockHigh Setting: high efficiency and low utilization.
BlockSmall setting: low efficiency and high utilization.