I have a Centos7 server in which when executing the command df -h the occupied disk space is of 90GB but if I do a du -sh / * the sum of all directories does not correspond to 90GB, in this case it is around 60GB.

What could be causing this difference in occupied disk space values?

  • Is the filesystem ext4? If so, 5% of all space is reserved for root by default.
    – njahnke
    Jul 5 '18 at 3:34
  • the filesystem is simfs
    – ldxd
    Jul 5 '18 at 8:48

there are some exception that may result on what you are experiencing like:

1- If you delete a file in some file managers or GUI environments, it may be put into a trash area where it can be undeleted. As long as the file can be undeleted, its space is still consumed. and it will be calculated on the du -h command.

2- If the file is open by a process, the data remains. Only when the processes have closed the file is the file deleted. The output fuser -m or lsof on a mount point includes the processes that have a file open on that filesystem, even if the file is deleted.

  • i've already test with 2 option and gave me this results: [i63.tinypic.com/de5pwp.png] The total space with the du-sh continues to be 60GB occupied
    – ldxd
    Jul 9 '18 at 9:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.