The Inode View
Outcome: you can spot the other
way a filesystem dies — full of
files, not full of bytes. Every
file on a Unix filesystem occupies
an inode: a numbered slot in
the filesystem's catalogue. Many
filesystems mint a fixed supply of
slots when they are created. Space
and slots are separate budgets, and
either can run out first: a million
tiny files can exhaust the inodes
of a filesystem that is 90% empty
by bytes, after which every attempt
to create a file fails with "No
space left on device" while df
swears there is room.
Asking
--inodes swaps the table's block
columns for the inode ones:
./duf --inodes --only-mp /tmp
│ MOUNTED ON │ INODES │ IUSED │ IAVAIL │ IUSE% │ TYPE │ FILESYSTEM │
│ /tmp │ 1015613 │ 80 │ 1015533 │ 0.0% │ tmpfs │ tmpfs │
INODES is the supply, IUSED the slots taken, IAVAIL the slots left, IUSE% the proportion gone. (The lab machine mounts /tmp twice, stacked; its table honestly shows both rows.)
The check against df
Df has the same view, and the lab
ran it on the same filesystems
(transcript t07):
df -i /tmp
Filesystem Inodes IUsed IFree IUse% Mounted on
tmpfs 1015613 80 1015533 1% /tmp
The counts agree exactly — 1,015,613 inodes, 80 used — and the percentages differ by the chapter 5 rule: duf's 0.0% is 80 ÷ 1,015,613 as a decimal; df rounds its 1% up. Two things move between runs: on a live system inode counts change as files come and go (the lab's /tmp went from 80 used inodes to 653 during the day, as other work used it), so read any capture — this guide's included — as a moment, not a constant.
When the view reads zero
On the lab's home filesystem, a btrfs volume, both tools report no inodes at all:
duf: INODES 0, IUSED 0, IUSE% 0.0%
df: Inodes 0, IUsed 0, IUse% -
Btrfs does not keep a fixed inode supply — slots are created as needed — and the kernel reports the total as 0. Df prints a dash for the percentage; duf prints 0.0%, which is the one misleading cell in this chapter's tables: it reads as "nothing used" where the truth is "not applicable". A row of inode zeros means the question does not apply to that filesystem, not that the filesystem is empty.