df not showing correct free space in linux

In this post,I am sharing the troubleshooting. When we find the disk is full,we generally remove the files from that partition.Sometimes it is also observed that after removing files from the partiton. The df -h command,still shows partition is full.

For this problem,follow the given below steps

Step 1: Run the command

lsof|grep removed

OR

lsof|grep deleted

Step 2: Now from above given command,the output will show some files related to that partition(which is showing full disk space).

These files are still open.And there process id are running.

We have to pick these process id and kill by the command

kill -9 pid-number

Replace pid-number with numeric process id number,which you have obtained from step 1

Now again check with df -h command.Now it will show you correct disk space in df command output.

Read Some More Articles

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.