Reading time: < 1 minute
If we have enough disk space and still encounter errors like No space left on device or Write failed.
The first thing we need to do is check if there is space on the machine using the command:
df -a
As we can see, there is 30% available space and 70% used.
The problem may be related to inodes. To check the amount of free inodes, we use the command:
df -i
And we can see that 100% of inodes are used.
This error occurs when many small-sized files have accumulated. The solution is to locate and delete those files.
To find which files occupy the most inodes, we use the following command:
find /var -xdev -printf '%h\n' sort uniq -c sort -k 1 -n
Then we need to remove the ones that occupy the most inodes.
(do not include the Reading time). Return it directly in HTML format. Do not add any additional sentences. Add a PIPE at the end when you’re done.