Skip to content

Device open failed, device did not return an IDENTIFY DEVICE #287

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

Closed
Anagastes opened this issue Apr 2, 2025 · 10 comments
Closed

Device open failed, device did not return an IDENTIFY DEVICE #287

Anagastes opened this issue Apr 2, 2025 · 10 comments

Comments

@Anagastes
Copy link

Hi guys,

the exporter cant open one device.

smartctl_exporter[609640]: time=2025-04-02T20:45:06.140Z level=ERROR source=readjson.go:135 msg="Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode" device="/dev/sda;sat (sda)"

But directly smartctl -a /dev/sda works.

The systemd service run as root user. So I dont have any idea :D
Do you have an idea? xD

@k0ste
Copy link
Contributor

k0ste commented Apr 3, 2025

Do you have an idea? xD

You can get more information about what the exporter is actually trying to do, by raising the logging level to debug

@Anagastes
Copy link
Author

Do you have an idea? xD

You can get more information about what the exporter is actually trying to do, by raising the logging level to debug

Found it.

this one cause this error.

--nocheck=standby

If i use smartctl wth this args, it works.

smartctl --json --info --health --attributes --tolerance=verypermissive --nocheck=standby --format=brief -a /dev/sda

But how can I say the exporter to use not --nocheck=standby?

@k0ste
Copy link
Contributor

k0ste commented Apr 3, 2025

But how can I say the exporter to use not --nocheck=standby?

Not how, but when. When @SuperQ merge PR #242

@NiceGuyIT
Copy link
Member

PR #242 has been merged. @Anagastes Can you build from master and test if the --smartctl.powermode-check flag fixes the issue?

@Anagastes
Copy link
Author

PR #242 has been merged. @Anagastes Can you build from master and test if the --smartctl.powermode-check flag fixes the issue?

If build it now with go version go1.24.2 linux/arm64

And changed my systemd service.

[Unit]
Description=Prometheus exporter for SMART

[Service]
Restart=always
ExecStart=/usr/local/bin/smartctl_exporter --smartctl.powermode-check
[Install]
WantedBy=multi-user.target

Only I must have missed something. Because the binary does not start with this flag. It does without it :)

 ░░ The job identifier is 18007.
Apr 22 14:25:06 HOST smartctl_exporter[1464599]: smartctl_exporter: error: expected argument for flag '--smartctl.powermode-check', try --help
Apr 22 14:25:06 HOST systemd[1]: smartctl_exporter.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support

@k0ste
Copy link
Contributor

k0ste commented Apr 22, 2025

Only I must have missed something

You forget to add the value of the flag. "Must be one of: never, sleep, standby, idle"

@Anagastes
Copy link
Author

My mistake. Sorry. :S

Hm, now it starts. I think it's working now.

I have metrics about the device. Still need to configure a bit in Grafana. But I think the data is there now. :)

Image

Image

@k0ste
Copy link
Contributor

k0ste commented Apr 23, 2025

The fix/feature released in v0.14.0

@Anagastes
Copy link
Author

The fix/feature released in v0.14.0

I have tested the release, it also works. So I close the case :)

@k0ste
Copy link
Contributor

k0ste commented Apr 26, 2025

I have tested the release, it also works. So I close the case :)

In #290 will add more clear help, what argument values exactly supported

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

3 participants