Skip to content

Device type detection broken, prefer --scan-open over --scan? #241

Open
@nathanlcarlson

Description

@nathanlcarlson

This commit made a change to the smartctl command by adding the -d option

out, err := exec.Command(*smartctlPath, "--json", "--info", "--health", "--attributes", "--tolerance=verypermissive", "--nocheck=standby", "--format=brief", "--log=error", device.Name, "-d", device.Type).Output()
. The type fed into that parameter is the type as reported by smartctl --scan --json.

This type is mostly device name based https://www.smartmontools.org/browser/trunk/smartmontools/os_linux.cpp?rev=5457#L3108 and I've experienced it typing SATA devices as SCSI because of this.

Using smartctl --scan-open --json seems to correct this, though I'm not sure what it could affect otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions