bschelst/ February 16, 2019/ Linux/ 0 comments

If you do a df, and you compare those values with ‘du’, it is possible that those values don’t match. There are multiple reasons why this can happen, and one of those reasons if that files where deleted, but that the files are still in use by an application.
In that case, it is possible that you need to stop/restart the particular application. This is of course depending on the application itself.
With ‘lsof’ you can see if you have such a situation where an application is still ‘locking ‘that space, and it will show which application is causing this.
Below an example:

machine:/ # lsof | grep "/mymount" | grep deleted 
  myapplication 51789 root 3r REG 254,4 526066393088 6466832291 /mymount/backup.dat (deleted) 
  myapplication 51789 51791 root 3r REG 254,4 526066393088 6466832291 /mymount/backup.dat (deleted)
Share this Post

Leave a Comment

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

4 × 1 =