Skip to content

feat(alertd): inode exhaustion check#496

Open
passcod wants to merge 1 commit into
mainfrom
alertd-inode-check
Open

feat(alertd): inode exhaustion check#496
passcod wants to merge 1 commit into
mainfrom
alertd-inode-check

Conversation

@passcod

@passcod passcod commented Jun 16, 2026

Copy link
Copy Markdown
Member

🤖 New host-level alertd healthcheck inodes.

Fixed-inode filesystems (ext4, xfs, vfat, tmpfs, …) carve a set number of inodes at mkfs time. A workload that creates lots of small files can exhaust them while df still shows free bytes — then writes fail with ENOSPC, invisible to the existing disk_free (bytes) check.

Reads df -P -i -T and warns at 85% / fails at 95% inodes used on the worst mount. btrfs allocates inodes dynamically and reports no meaningful count, so it's excluded (its space pressure is the btrfs check's job); any filesystem reporting a zero inode total is skipped for the same reason. Linux-only.

The df parser (column split, space-containing mountpoints rejoined, btrfs/zero-total filtered) is a pure function with tests.

Fixed-inode filesystems (ext4, xfs, vfat, tmpfs, …) can run out of inodes
while df still shows free bytes, after which writes fail with ENOSPC. Reads
df -P -i -T and warns at 85% / fails at 95% inodes used on the worst mount.
btrfs (dynamic inodes, no meaningful count) and any filesystem reporting a
zero inode total are excluded — btrfs space pressure is covered by the btrfs
check. Linux-only.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant