Stop letting mount points hide your real directory contents

Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)

Stop letting mount points hide your real directory contents

🧩 The Challenge

Ever spent an hour hunting for a massive log file that you know is eating your root partition, only to find the directory is completely empty? You’ve accidentally mounted an external drive or a network share over a directory that still has gigabytes of “invisible” junk sitting underneath it.

💡 The Fix

Use the bind mount feature to see through the current mount point so you can actually delete that buried garbage. It’s a total lifesaver when you need to reclaim space without unmounting production volumes.

mkdir /mnt/temp_root
mount --bind / /mnt/temp_root
ls -alh /mnt/temp_root/path/to/hidden/mountpoint

⚙️ Why It Works

By bind mounting the root directory to a separate location, you expose the underlying filesystem structure as it existed before any other mounts took over that specific path. This lets you access those “hidden” files safely without disrupting the services running on the active mount point.

🚀 Pro-Tip: Once you delete the offending files, remember to unmount that temporary bind point so you don’t leave cruft lying around in /mnt.

Linux Tips & Tricks | © ngelinux.com | 10/21/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted