Linux does not have enough disk space, but DF-Ah shows that there is nearly half of the space. How can this problem be reported?
In fact, it is very simple, because the node is used up, and a file corresponds to a node. the space we mentioned here is actually block, the block has space, but the node has no space.
Why is this happening?
Using tune2fs-L/dev/sdd1, we can see that the block size is large, and the space allocated by the node becomes very small.
In this disk, all PHP files with a size of 1-2 kb are stored. Naturally, it occupies the node
How can this problem be solved?
The block size must be adapted. If a file such as 1-2 kb is stored, the first block can beat 1024 bytes, but the disk occupies 4096 bytes.
If you want to store videos and large image files, use 4096.
Note that the data on the node must be larger than the block, because it does not make sense that the number of node nodes is greater than the block. A file must occupy one block, in more cases, more blocks are occupied.
In this way, you can reformat the disk
Mke2fs-J-B 1025-I 2048/dev/sdb1
Format mke2fs:
-J: Specify the ext3 file format to be disk-oriented.
-B: Specify the block size,
-I: Specify the node size.