Ticket 500875604 fired because /mnt/sia on LXC 141 passed 80% on df, while hostd was only storing about 3.4 TiB.
hostd writes to its least-written slots first, so data.dat gets fully allocated over time and only then reuses freed slots. df on this mount is expected to read nearly full, so it can't tell us whether Sia is running out of room.
What changed
For mounts listed in the new LXC_MANAGED_VOLUMES config (currently only /mnt/sia on LXC 141):
The usual LXC thresholds (80% and 90%) apply to hostd's used and total sectors. These are read from its database in read-only mode, so nodes don't need the API password.
Tickets and metrics report hostd's figures, so they match the number that triggered the alert.
A critical ticket is still created if the filesystem has under 20 GiB left, which is a real out-of-space risk.
All other mounts keep normal df alerting, including the root disk of LXC 141.
Worth reviewing
If hostd's usage can't be read, the daemon logs a warning and only checks the 20 GiB floor. It deliberately doesn't fall back to df, which would raise a false ticket. The catch is that a hostd schema change could silently stop Sia usage alerts, with only that log warning to show for it.
Testing
Added tests in TestManagedVolumes: 119 tests pass, and flake8 and bandit 1.9.4 are clean.
Ran only the LXC storage check on large1 from a temporary copy, which can't create tickets: status OK, no issues, /mnt/sia at 23.0% (3.447 of 15 TiB).
Deployment
Hosts run hwmonDaemon.py directly from main, so merging this deploys it to every node on their next run. Ticket 500875604 can be closed once this is live.
## Why
Ticket 500875604 fired because `/mnt/sia` on LXC 141 passed 80% on `df`, while hostd was only storing about 3.4 TiB.
hostd writes to its least-written slots first, so `data.dat` gets fully allocated over time and only then reuses freed slots. `df` on this mount is expected to read nearly full, so it can't tell us whether Sia is running out of room.
## What changed
For mounts listed in the new `LXC_MANAGED_VOLUMES` config (currently only `/mnt/sia` on LXC 141):
- The usual LXC thresholds (80% and 90%) apply to hostd's used and total sectors. These are read from its database in read-only mode, so nodes don't need the API password.
- Tickets and metrics report hostd's figures, so they match the number that triggered the alert.
- A critical ticket is still created if the filesystem has under 20 GiB left, which is a real out-of-space risk.
All other mounts keep normal `df` alerting, including the root disk of LXC 141.
## Worth reviewing
If hostd's usage can't be read, the daemon logs a warning and only checks the 20 GiB floor. It deliberately doesn't fall back to `df`, which would raise a false ticket. The catch is that a hostd schema change could silently stop Sia usage alerts, with only that log warning to show for it.
## Testing
- Added tests in `TestManagedVolumes`: 119 tests pass, and flake8 and bandit 1.9.4 are clean.
- Ran only the LXC storage check on large1 from a temporary copy, which can't create tickets: status OK, no issues, `/mnt/sia` at 23.0% (3.447 of 15 TiB).
## Deployment
Hosts run `hwmonDaemon.py` directly from `main`, so merging this deploys it to every node on their next run. Ticket 500875604 can be closed once this is live.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
hostd allocates its whole data.dat over time and then reuses freed slots,
so df on the mount is expected to read nearly full and says nothing about
real usage. Alert on hostd's used/total sectors for mounts listed in
LXC_MANAGED_VOLUMES, and keep a critical free-space floor for a real
out-of-space risk.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bandit 1.9.4 in CI flagged the query (B608). Select every volume with a
static query and match the mountpoint in Python instead. Also stops a
mount like /mnt/sia-other from matching /mnt/sia.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared
merged commit 30b28677e8 into main2026-11-06 13:03:03 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
Ticket 500875604 fired because
/mnt/siaon LXC 141 passed 80% ondf, while hostd was only storing about 3.4 TiB.hostd writes to its least-written slots first, so
data.datgets fully allocated over time and only then reuses freed slots.dfon this mount is expected to read nearly full, so it can't tell us whether Sia is running out of room.What changed
For mounts listed in the new
LXC_MANAGED_VOLUMESconfig (currently only/mnt/siaon LXC 141):All other mounts keep normal
dfalerting, including the root disk of LXC 141.Worth reviewing
If hostd's usage can't be read, the daemon logs a warning and only checks the 20 GiB floor. It deliberately doesn't fall back to
df, which would raise a false ticket. The catch is that a hostd schema change could silently stop Sia usage alerts, with only that log warning to show for it.Testing
TestManagedVolumes: 119 tests pass, and flake8 and bandit 1.9.4 are clean./mnt/siaat 23.0% (3.447 of 15 TiB).Deployment
Hosts run
hwmonDaemon.pydirectly frommain, so merging this deploys it to every node on their next run. Ticket 500875604 can be closed once this is live.🤖 Generated with Claude Code