I deleted a 137G file in a NFS mount (from a Linux host), and it dissapeared from the directory but the free space reported by df is still the same

  • the NFS server is a NAS device with almost no logging information, but at least it shows the free space, which is the same as reported by df
  • the file is not open - it's unused for a long time, it doesn't show in lsof (I also have rebooted the NAS device)
  • the difference between the used space from df -h and du -hs . on the full disk is exactly 137G
  • the NFS share is mounted with soft,user options

What could be causing this?

  • df uses fsstat call. Some server may use cached/precalculated value to avoid expensive operation.
    – kofemann
    Dec 14 '19 at 12:03
  • @kofemann I guess those cached values would be cleared after a reboot
    – golimar
    Dec 17 '19 at 8:12

Deleting the files doesn't actually delete the file. Restart or kill that process to release the file.

lsof +L1

use above command to find that which process is using a deleted file.

  • I run that command but none of the files shown there lies inside the NFS mount
    – golimar
    Dec 12 '19 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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