v0.59.0: report backing device + capacity for a registry-sourced /disks row

Agent-view showed "—" device + no size for a raw (no-PVE-storage) drive because
the registry union row never set backing_device/total_bytes/used_bytes (Observe
drives get those from pvesm status). Resolve BackingDevice via ByUUIDDevicePath +
read capacity via statfsCapacity (build-tagged syscall.Statfs; no-op off-Linux).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 21:34:11 +02:00
parent b52680ab47
commit 5ff5f8e0ab
5 changed files with 57 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
//go:build !linux
package localapi
// statfsCapacity is Linux-only (syscall.Statfs); on other platforms (dev builds) it reports nothing.
func statfsCapacity(string) (total, used int64, ok bool) { return 0, 0, false }