Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nathanlcarlson opened this issue Sep 5, 2024 · 2 comments
Open

Comments

@nathanlcarlson
Copy link
Contributor

nathanlcarlson commented Sep 5, 2024

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.

@k0ste
Copy link
Contributor

k0ste commented Sep 5, 2024

Wow, scan-open is really uncharted feature
The current fix for master in #235 (if we find someone with merge button...)

@nathanlcarlson
Copy link
Contributor Author

I see, thanks for linking that in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants