Error Codes Wiki

Linux "No Space Left" But Disk Not Full — Inode Exhaustion Fix

Warninglinux filesystem

Overview

Fix "No space left on device" when df shows available space. The inode table is full.

Key Details

  • Error: No space left on device (but df shows free space)
  • Category: Linux Filesystem Error
  • Inodes exhausted — too many small files
  • Filesystem cannot create new files

Common Causes

  • Millions of tiny files (session files, cache)
  • Mail queue accumulated millions of messages
  • Application creating many temp files
  • Filesystem created with too few inodes

Steps

  1. 1Check inodes: df -i
  2. 2Find directories with many files: find / -xdev -printf "%h\n" | sort | uniq -c | sort -rn | head
  3. 3Delete unnecessary small files
  4. 4For email: clean up /var/spool/mail/
  5. 5Create new filesystem with more inodes: mkfs.ext4 -N inode_count

Tags

linuxlinux-filesystemlinux no space inodeubuntuterminal

More in Linux Filesystem

Frequently Asked Questions

Each file uses one inode. The total number is set when the filesystem is created.