No space left on device (inodes) 🐧 Linux

No space left on device, but df shows free space (inodes exhausted)

The filesystem has run out of inodes — the slots for files — even though there are gigabytes free, usually because of millions of tiny files.

Seen on: Linux

Meaning

Every file uses an inode; ext4 fixes the inode count at format time. Session files, mail queues, cache directories, node_modules trees or Docker overlay layers can exhaust them. df -h looks fine, df -i shows 100%.

Common causes

  • Millions of small files (PHP sessions, cache, mail queue)
  • Runaway log/temp file creation
  • Docker overlay/image layers
  • Small partition formatted with few inodes

⚡ Quick fix

  1. Check inodes: df -i
  2. Find directories with the most files and clean them
  3. Fix the job creating them (session GC, cache cleanup)

Detailed fix by platform

Linux

  1. bash
    df -i
    sudo find / -xdev -type d -size +1M 2>/dev/null | head   # huge directories
    for d in /var/* /tmp; do echo "$(sudo find "$d" -xdev | wc -l) $d"; done | sort -n | tail

How to diagnose

  1. Inodes — df -i usage per mount
  2. Where — Directory with most files
  3. Source — Which process writes them?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.