Inodes Full Why You’re Out of Space!Inodes Full Why You’re Out of Space!
Inodes Full Why You’re Out of Space!
Inodes Full Why You’re Out of Space!

You have free disk space but can’t save files? You’ve probably run out of inodes. Learn what they are and how to free them fast.


🧠 What is an inode?

An inode is a data structure that stores metadata about each file:

  • permissions,

  • size,

  • ownership,

  • last modification time,

  • and disk location.

One file = one inode. Millions of tiny files = millions of inodes consumed.


🛑 Common issue: “Disk full” with free space

This happens when:

  • temp/log/session files grow uncontrolled,

  • WordPress or CMS generate tons of cache,

  • old scripts keep creating files but don’t delete them.


🧹 How to reduce inode usage

🔍 1. Check inode usage:

bash
df -i

📂 2. Find top inode consumers:

bash
find / -xdev -type f | cut -d/ -f2 | sort | uniq -c | sort -n

🗑 3. Clean up:

  • clear /tmp, /var/log, .trash, and backups

  • remove unused cache

bash
sudo journalctl --vacuum-size=100M
sudo apt-get autoclean

🔁 4. Rotate logs properly

Use logrotate to prevent unlimited file growth.

♻️ 5. Archive small files

If you have thousands of small files:

bash
tar -czvf backup.tar.gz folder/

🛡️ Prevention tips:

  • Monitor inode usage regularly.

  • Avoid file-based session storage.

  • Limit automatic file generation in CMS/plugins.

✍️ Author: Bejenaru Alexandru Ionut – [email protected]

🔗 Internal link: https://diagnozabam.ro/sfaturi

🤝 Support DiagnozaBAM

This content is free. Your donation is completely voluntary.

Donate on Ko-fi

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.