Stop fighting with invisible disk space that df refuses to show

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

Stop fighting with invisible disk space that df refuses to show

🧩 The Challenge

You have ever had a server scream about being out of disk space, but df shows there is plenty of room left on the partition. It is almost always a deleted file that some long-running process still has open, keeping the inodes locked and the space from being freed.

💡 The Fix

Use lsof to hunt down those pesky deleted files that are still hogging space behind your back. Restarting the holding process is usually the only way to get that capacity back.

/usr/sbin/lsof +L1

⚙️ Why It Works

Adding the +L1 flag tells the system to specifically look for files with a link count of zero. These files have been unlinked from the directory tree but remain alive because an active process still has a file descriptor pointed at them.

🚀 Pro-Tip: If you can’t restart the process, try truncating the file to zero bytes from inside the proc directory to reclaim the space instantly.

Linux Tips & Tricks | © ngelinux.com | 9/25/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted