Skip to content

[Bug]: Dashboard — a disk whose health cannot be read is reported as "degrading" #2099

Description

@laurentiu021

Problem

A machine whose drives are listed but report no SMART data is told its disk health is degrading. Nothing is degrading; nothing was measured.

HealthScoreService marks the disk component unavailable only when the list is empty:

if (disks is null || disks.Count == 0) unavailable.Add(DiskComponent);

A drive with no SMART data still produces a DiskHealthReportHealthPercent is documented to return null in that case — so the list is non-empty, the component is not marked unavailable, ComputeDiskScore returns the deliberate 80 for unknown, and ClassifySmartHealth(80, unavailable: false) lands in the >= 60 branch: "Disk health degrading — check System Health", yellow.

The code already knows this is the wrong answer. DashboardViewModel.ClassifySmartHealth's own remarks say so:

Scoring it as unknown instead would put it in the "degrading" branch, which is a different wrong answer: nothing is degrading, nothing was measured.

The guard against it was written for the empty-list case only, so the present-but-unreadable case reaches exactly the outcome the remarks rule out. Not rare: consumer SATA and NVMe drives frequently expose nothing through MSFT_StorageReliabilityCounter, and a VM exposes nothing at all.

Expected behavior

Drives present but none readable is the same absence of evidence as no drives at all: the disk component is unavailable, and the Dashboard says "Disk health could not be read — see System Health" instead of naming a hardware trend it never observed.

The mixed case (one drive readable, another not) keeps the worst measured verdict, deliberately — marking the component unavailable there would mask a genuinely failing drive behind an "unreadable" message.

Evidence

  • SysManager/SysManager/Services/HealthScoreService.cs — the unavailable list
  • SysManager/SysManager/ViewModels/DashboardViewModel.csClassifySmartHealth and its remarks
  • SysManager/SysManager/Models/DiskHealthReport.cs — "Returns null when no SMART data is available"

Affected tab

Dashboard (and System Health's score)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions