Skip to content

fix(collector): support explicit device types for Hitachi and Toshiba drives #664

Description

@Starosdev

Summary

Some Hitachi and Toshiba drives are reported as failing with zero SMART values when smartctl auto-detects the device type. Passing the correct explicit device type, such as -d sat, returns valid SMART data.

Source

Upstream discussion: AnalogJ#1016

Problem

With automatic or unspecified device type detection, smartctl can report:

  • SMART support unavailable or overall health failing
  • zero or missing SMART metrics
  • a false failed status in Scrutiny

The same drives return valid health and attribute data when queried with the correct explicit device type.

Expected behavior

When a device is configured with an explicit type in collector.yaml, the collector must pass that type consistently to smartctl and preserve the resulting valid SMART status and metrics.

Acceptance criteria

  • Verify explicit device types such as sat are passed through for device information and SMART commands.
  • Add regression coverage for false failure and zero-metric behavior when an explicit type is configured.
  • Confirm automatic detection behavior remains unchanged for devices that do not need an override.
  • Document explicit device-type configuration and troubleshooting guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcollectorCollector component

    Projects

    Status
    Bug Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions