1

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?

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

1 Answer 1

0

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .