v0.169.1: disk-health card excludes logical/network storage (pbs/lvm/nfs/cifs)

The agent defaults SMART to UNKNOWN on non-physical targets, so they showed as
spurious 'Nincs adat' rows. isPhysicalDisk now excludes those types (card + check).
Test strengthened: a PBS/LVM fixture with UNKNOWN SMART must still be excluded.
This commit is contained in:
2026-07-24 21:30:54 +02:00
parent c97975c1df
commit dbf631312e
3 changed files with 18 additions and 4 deletions
+7 -2
View File
@@ -62,9 +62,14 @@ func (s *Server) fetchDisks(ctx context.Context) (agentapi.DisksResponse, error)
return client.Disks(ctx)
}
// isPhysicalDisk reports whether a target is a physical disk SMART applies to (has a backing device
// or a serialized SMART summary). pbs/lvm/nfs targets are excluded from the disk-health view.
// isPhysicalDisk reports whether a target is a physical disk SMART applies to. Logical/network
// storage (PBS, LVM-thin, NFS, CIFS) is excluded even though the agent may default its SMART to
// UNKNOWN — those are storage abstractions, not disks, and must not clutter the disk-health card.
func isPhysicalDisk(d agentapi.DiskInfo) bool {
switch d.Type {
case "pbs", "lvmthin", "nfs", "cifs":
return false
}
return d.BackingDevice != "" || d.Smart != nil
}