Skip to content

Support transient SMART failures#375

Closed
dcelasun wants to merge 1 commit into
AnalogJ:masterfrom
dcelasun:transient-failures
Closed

Support transient SMART failures#375
dcelasun wants to merge 1 commit into
AnalogJ:masterfrom
dcelasun:transient-failures

Conversation

@dcelasun

@dcelasun dcelasun commented Sep 24, 2022

Copy link
Copy Markdown

As discussed in #374 some SMART errors are transient and should not be treated as permanent.

This commit adds support for a configurable list of ATA SMART attribute IDs, failures of which will be treated as transient. Drive health history is still recorded and notifications are sent, but the device itself is not marked as failed.

Fixes #374.

--

@AnalogJ apologies for the cosmetic changes, they are made automatically by goimports. I can revert them if you'd like.

As discussed in [1] some SMART errors are transient and should not
be treated as permanent.

This commit adds support for a configurable list of ATA SMART attribute
IDs, failures of which will be treated as transient. Drive health history
is still recorded and notifications are sent, but the device itself is
not marked as failed.

Fixes AnalogJ#374.

[1] AnalogJ#374
@AnalogJ

AnalogJ commented Oct 13, 2022

Copy link
Copy Markdown
Owner

Thanks so much for the PR 🥳

Apologies for taking so long to get to this, I've been a bit distracted by some other projects.
TBH, I think I would have implemented this slightly differently. Rather than "ignoring" the failure at the attribute processing stage, I think i would allow it to mark the attribute entry as "failed" however, I would filter out the failure before setting the DeviceStatus -- which persists across multiple SMART collector runs.

https://github.com/AnalogJ/scrutiny/blob/master/webapp/backend/pkg/web/handler/upload_device_metrics.go#L53-L59

Basically since the value fluctuates (and recovers) constantly, a failure at a single point in time should still be marked as a failure, but shouldn't cause the disk to the permanently marked as "bad"

Hopefully that makes sense?

@dcelasun

Copy link
Copy Markdown
Author

Hopefully that makes sense?

It does. Let me make some changes :)

@dcelasun

dcelasun commented Nov 7, 2022

Copy link
Copy Markdown
Author

Apologies for the delay on this. Now that I look at it again:

Basically since the value fluctuates (and recovers) constantly, a failure at a single point in time should still be marked as a failure, but shouldn't cause the disk to the permanently marked as "bad"

Isn't this already the case? The Status field in the Smart` type refers to the device's status, not the attributes, and my PR simply doesn't update that field for transient failures.

@enoch85

enoch85 commented Sep 9, 2024

Copy link
Copy Markdown
Contributor

Would be great if you could have another look at this. 🙏

@rursache

rursache commented Mar 8, 2025

Copy link
Copy Markdown

will this be ever merged?

Starosdev referenced this pull request in Starosdev/scrutiny Nov 30, 2025
## [1.1.0](v1.0.0...v1.1.0) (2025-11-30)

### Features

* Add "day" as resolution for temperature graph ([2670af2](2670af2))
* add day resolution for temperature graph (upstream PR [AnalogJ#823](https://github.com/Starosdev/scrutiny/issues/823)) ([2d6ffa7](2d6ffa7))
* add setting to enable/disable SCT temperature history (upstream PR [#557](#557)) ([c3692ac](c3692ac))
* Implement device-wise notification mute/unmute ([925e86d](925e86d))
* implement device-wise notification mute/unmute (upstream PR [AnalogJ#822](https://github.com/Starosdev/scrutiny/issues/822)) ([ea7102e](ea7102e))
* implement Prometheus metrics support (upstream PR [AnalogJ#830](https://github.com/Starosdev/scrutiny/issues/830)) ([7384f7d](7384f7d))
* support SAS temperature (upstream PR [AnalogJ#816](https://github.com/Starosdev/scrutiny/issues/816)) ([f954cc8](f954cc8))

### Bug Fixes

* better handling of ata_sct_temperature_history (upstream PR [AnalogJ#825](https://github.com/Starosdev/scrutiny/issues/825)) ([d134ad7](d134ad7))
* **database:** add missing temperature parameter in SCSI migration ([df7da88](df7da88))
* support transient SMART failures (upstream PR [#375](#375)) ([601775e](601775e))
* **ui:** fix temperature conversion in temperature.pipe.ts (upstream PR [AnalogJ#815](https://github.com/Starosdev/scrutiny/issues/815)) ([e0f2781](e0f2781))

### Refactoring

* use limit() instead of tail() for fetching smart attributes (upstream PR [AnalogJ#829](https://github.com/Starosdev/scrutiny/issues/829)) ([2849531](2849531))
@kaysond

kaysond commented Feb 2, 2026

Copy link
Copy Markdown
Collaborator

@dcelasun - I think it might make sense to roll this into #835

@dcelasun

dcelasun commented Feb 2, 2026

Copy link
Copy Markdown
Author

@dcelasun - I think it might make sense to roll this into #835

Sounds good to me

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

Successfully merging this pull request may close these issues.

[BUG] Hardware ECC Recovered incorrectly reported as disk failure

5 participants