fix(disk-collector): fix storage reporting for NFS mounts#686
fix(disk-collector): fix storage reporting for NFS mounts#686bgauger wants to merge 2 commits intoCrosstalk-Solutions:devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes incorrect storage reporting when storage is backed by NFS (or other long device-name mounts) by making both the disk collector parsing and the easy-setup “storage projection” prefer stable, accurate filesystem data.
Changes:
- Update disk-collector
dfcalls to use POSIX output (df -P) to prevent line-wrapping from breaking parsing on long device names (e.g., NFS). - Update easy-setup primary storage detection to prefer the
/app/storagemount (so NFS-backed storage is correctly detected and displayed).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| install/sidecar-disk-collector/collect-disk-info.sh | Uses df -P to ensure single-line output and reliable parsing for NFS/long device names. |
| admin/inertia/hooks/useDiskDisplayData.ts | Prefers /app/storage filesystem stats as the primary source for easy-setup storage projection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This is my exact issue... and fixed in exactly the same way. |
|
Great fix! Two things we found testing this on NFS-backed storage (TrueNAS): 1. 2. Worth a comment on Happy to open a PR against your branch with both fixes if useful. Verified working on NFS. |
|
nice catch on getAllDiskDisplayItems — i didnt hit that on my setup since the fsSize fallback picked it up, but makes sense that bare metal with physical disks would skip right past the NFS mount. feel free to PR against my branch with both fixes. |
|
I've submitted the PR on bgauger |
Co-Authored-By: Ben Smith <bravosierra99@gmail.com>
Co-Authored-By: Ben Smith <bravosierra99@gmail.com>
2390291 to
7124dd4
Compare
|
@bravosierra99 merged your fix in — thanks! One thing we found testing on the NFS box: when there are no block devices (like on a containerized setup with only NFS), |
chriscrosstalk
left a comment
There was a problem hiding this comment.
LGTM. This is a real fix for real user pain on NFS-backed storage, and the collaborative iteration with bravosierra99's follow-up on getAllDiskDisplayItems plus your NFS-only fallback covers the edge cases cleanly.
The -P flag on df is the textbook fix for the multi-line wrapping behavior with long NFS device names, and the frontend changes are well-scoped. Tested paths (NFS + bare-metal no-regression) match what I'd want to see.
One minor nit (non-blocking): the hardcoded "NAS Storage" label is slightly misleading for the edge case where /app/storage is a bind mount from a local disk rather than NFS. If you want to polish later, showing the filesystem type or actual device would be nicer. But it's a nit — ship it.
Flagging for inclusion in v1.31.1 as a patch fix — this is the kind of concrete user-facing improvement worth getting out quickly alongside the other hotfix candidates (#645, #649).
Summary
dfwraps long NFS device names across two lines, breaking theawk 'NR==2'parser in the disk collector and producing empty size/used/available values. Adding-Pforces POSIX single-line output./dev/*filesystems, so NFS-backed storage was never picked up. Now checks the/app/storagemount first.Test plan
Related: #373, #320, #384