Affected versions: Debian 11

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

File creation fails with no space errors even though disk capacity is free.

Environment & Reproduction

Seen on partitions storing huge counts of small files.

cat /etc/os-release
df -h
df -i

Root Cause Analysis

Filesystem inode pool is exhausted before block space is consumed.

Quick Triage

Locate directories with very high file counts.

for d in /var /tmp /home; do echo $d; find $d -xdev -type f | wc -l; done
df -i

Step-by-Step Diagnosis

Identify small-file hotspots and validate cleanup candidates.

sudo find /var -xdev -type f | sed 's#/[^/]*$##' | sort | uniq -c | sort -nr | head
sudo du -sh /var/tmp/* 2>/dev/null | sort -h
Illustrative mockup for debian-11 β€” terminal_or_shell
Diagnostic output for storage/inode-exhaustion β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Remove stale temp/cache files and enforce retention limits.

Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.

sudo find /var/tmp -xdev -type f -mtime +7 -delete
sudo find /tmp -xdev -type f -mtime +3 -delete
sudo apt clean
Illustrative mockup for debian-11 β€” log_or_config
Resolution output for storage/inode-exhaustion β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Migrate high-churn workloads to filesystem created with more inodes.

sudo rsync -a /var/spool/app/ /mnt/newfs/app/
sudo mount --bind /mnt/newfs/app /var/spool/app

Verification & Acceptance Criteria

Inode utilization drops and file creation succeeds normally.

df -i
touch /tmp/inode_test && rm /tmp/inode_test

Rollback Plan

Recover deleted operational files from backup snapshots if needed.

sudo rsync -a /backup/var-tmp/ /var/tmp/

Prevention & Hardening

Implement scheduled cleanup and monitor inode usage trends.

df -i
# add inode alerts in monitoring platform

Related errors include cannot create file and no space left on device with free GB.

Related tutorial: View the step-by-step tutorial for Debian 11.

View all Debian 11 tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Linux filesystem inode behavior and Debian operations guidance.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β€” we respond within one business day.