The cloud server alarms that the remaining space is insufficient. Log in to the server and use df -h to view the situation as follows:
But when I used du-sh * in the root directory to check the size of each folder, I found that the sum of these folders was far from 31G. Why is this? (The 23G of share is a mounting disk, which is reflected in df -h in the above picture)
The way they count is different. One possibility of such a big difference is that the files being used are deleted.
You can use the command
lsof|grep delete
to see which files have been deleted but are still occupied by the program.These programs need to be restarted to free up the space occupied.
The basic reason is what @vvpale said,
The reasons and solutions for the inconsistent disk space usage displayed by df and du are for reference
Two situations
1. df includes the space that has been deleted but not released, and can be viewed through
lsof grep deleted
.2. There are contents in some directories, but they are used as other partitions on the mount, so the contents in this directory cannot be seen, but they are still there.