0

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?

Patrick Mevzek
  • 9,921
  • 7
  • 32
  • 43
ldxd
  • 3
  • 3

1 Answers1

0

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.

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