Find out why your disk is full when df says you have plenty of space

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

Find out why your disk is full when df says you have plenty of space

🧩 The Challenge

Ever stared at an alert saying your partition is at 100% usage, but then you check with df and it shows 30% free? I’ve lost more than one Sunday afternoon hunting down files that vanished while processes still had them open.

💡 The Fix

Use lsof to see which deleted files are still hogging space because an active process refuses to let go of the file handles. It’s the only way to find those ghost files holding your storage hostage.

lsof +L1 /path/to/mountpoint

⚙️ Why It Works

Since the kernel won’t actually reclaim the disk sectors until every last process closes the file handle, those “deleted” files continue to inflate your usage stats. Running this command identifies exactly which PID is keeping the data alive so you can restart the service or clear the cache properly.

🚀 Pro-Tip: If you’re really desperate and can’t restart the process, truncating the file directly via /proc/<pid>/fd/ will free the space instantly.

Linux Tips & Tricks | © ngelinux.com | 11/17/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted