Storage · Filesystems
Inodes
Cheat sheet · https://pcornel.dk/topic.php?topic=3958
Answer
Directories map names to inode numbers, while each inode stores metadata and references file data. Filesystems with a finite inode supply can reject new files even when many data bytes remain free.
Remember
- Inode ≠ filename.
- Free bytes ≠ free inodes.
- Deleting a directory entry ≠ immediate space release if a file remains open.
- Inode exhaustion ≠ block-device exhaustion.
First checks
df -i— inode usagetune2fs -l <dev> | grep -i inode— ext4 inode countfind <dir> -xdev -type f | wc -l— file count in a tree
Commands
df -i- Filesystem inode usage.
Verify in this order
file → inode → data blocks
Where it usually breaks
First mismatch in media/provider → controller/pool → logical object → path/protocol → filesystem/share/object namespace → consumer workload; preserve identity/pre-state before mutation.
Filesystems → Inodes filesystem map
| Filesystem boundary | What to verify | Proof limit |
|---|---|---|
| Identity / attachment | Filesystem type, source/backing object, mount/attachment target and effective options | Presence or mount state alone does not prove consistency or lower-layer health |
| Capacity / metadata | Data space, metadata/inodes, quotas/reservations and filesystem state | Free bytes at one layer do not prove allocation can succeed end to end |
| Failure boundary | Available inode count proves metadata slots remain under that filesystem model; it does not prove byte capacity, underlying storage health or application writability. | Correlate filesystem evidence with the backing volume/path/backend before repair |
| Acceptance | Healthy evidence: inode usage has headroom, file creation succeeds, namespace links are consistent and inode pressure matches workload expectations. | Close only after the original path/workload and read-back check succeeds |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3958