df says disk is full, but it is not

df says disk is full (Disk space is 100%) but actually it is not having files contributing it to be 100%.


There are various possibilities for the case as below:

1. Processes holding deleted files

You have deleted the files in order to create some space on drive, but there are still the processes which has opened the large files which has been deleted. You’ll have to kill that process to free up the space. You may be able to identify the process by using lsof. On Linux deleted yet open files are known to lsof and marked as (deleted) in lsof’s output.

sudo lsof +L1

In above case the processes 7410 & 7681 has to be restarted



2. You may be out of inodes

One of our development servers went down today. Problems started with deployment script that claimed that claimed “No space left on device”, although partition was not nearly full. If you ever run into such trouble – most likely you have too many small or 0-sized files on your disk, and while you have enough disk space, you have exhausted all available Inodes. Below is the solution for this problem.

a. check available disk space to ensure that you still have some

b. check available Inodes

If you have IUse% at 100 or near, then huge number of small files is the reason for “No space left on device” errors.

c. find those little bastards

This command will list directories and number of files in them. Once you see a directory with unusually high number of files (or command just hangs over calculation for a long time), repeat the command for that directory to see where exactly the small files are.

d. once you found the suspect – just delete the files

You’re done. Check the results with df -i command again. You should see something like this:





Hope you liked the article, please share it. Thanks in advance. 🙂

About author

Love coding, crazy about logic, like solution architecting and solving problems. Thirsty for knowledge, challenges & most importantly innovation. One of the passionate brain behind SpryOX

Leave a Reply

Your email address will not be published. Required fields are marked *