Pcornel
Storage · Filesystems

Inodes

Cheat sheet · https://pcornel.dk/topic.php?topic=3958

Back to the Topic

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 usage
  • tune2fs -l <dev> | grep -i inode — ext4 inode count
  • find <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 boundaryWhat to verifyProof limit
Identity / attachmentFilesystem type, source/backing object, mount/attachment target and effective optionsPresence or mount state alone does not prove consistency or lower-layer health
Capacity / metadataData space, metadata/inodes, quotas/reservations and filesystem stateFree bytes at one layer do not prove allocation can succeed end to end
Failure boundaryAvailable 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
AcceptanceHealthy 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

Confirmation

Confirm action

Continue?