Long time ago I wrote a similar post, but today I wanted to add one more use case. Basically when you don’t know what is using your disk space and is not related to the file descriptors.
The old post: where has all my disk space gone? I
Which are the symptoms?
You ran a df that doesn’t correspond with the du -csh / or at least it doesn’t look like… and it’s not related to files deleted and with file descriptors still opened.
So, imagine that you have some files inside a directory that it it’s in the root partition and then you mount a device over that directory. When you list the files in that directory, the “old files” won’t appear.
So what can I do to check which are the files ? You can umount filesystems, but you can also do a bind mount of the root filesystem into another directory and then search. Want to thank Marcel G (serverfault) for his post: mount-bind that refreshed me with this idea.
Here are the steps I ran so you can do the same: