Your disk is “full” but df says you’re fine? Check your inodes.
Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Your disk is “full” but df says you’re fine? Check your inodes.
🧩 The Challenge
You’re trying to write a tiny config file, or maybe create a new session log, and BAM: “No space left on device.” But you run `df -h`, and it says you’ve still got GIGABYTES free. You’ll waste hours scratching your head trying to figure out what gives. Nobody tells you this early on.
💡 The Fix
The problem isn’t always about how much data you’ve got, it’s about how many *files* you’ve got. Every file and directory needs an inode. And when you run out of *those*, your filesystem is effectively full, no matter how much raw block storage is still available. A quick look at inode usage reveals the real bottleneck.
df -i /path/to/filesystem
# If you see high inode usage on a filesystem, run this to find the directories hogging them:
# find /path/to/filesystem -xdev -printf '%h\n' | sort | uniq -c | sort -rh | head -n 20
⚙️ Why It Works
Filesystems store not just your precious data blocks, but also metadata about each file and directory, which are called inodes. There’s a finite number of inodes allocated when the filesystem is created. So, if you’re dealing with millions of tiny temporary files, web server sessions, or build artifacts, you can exhaust your inode count long before you fill up your disk blocks.
🚀 Pro-Tip: Look for web server session directories, npm/yarn caches, or logrotate configurations gone wild. Clear that junk out.
Linux Tips & Tricks | © ngelinux.com | 9/13/2026
