It’s Official: The 2019 Standard Deduction Is Getting Even Large
OSUnix

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%.

disk_full

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

lsof_output

 

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:

References:

https://www.ivankuznetsov.com/2010/02/no-space-left-on-device-running-out-of-inodes.html

http://stackoverflow.com/questions/653096/howto-free-inode-usage

 

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
Related posts
OSUnix

Removing Older files in Unix

Unix

Find latest file created having specific pattern and to search certain pattern

Unix

Number of seconds since midnight till now in unix

Unix

Remove duplicate lines from file using awk

Sign up for our Newsletter and
stay informed

Leave a Reply

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