Page MenuHomeFreeBSD

camcontrol(8): add "smart" command
Needs ReviewPublic

Authored by trasz on Apr 26 2021, 1:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 14 2022, 11:40 PM
Unknown Object (File)
Dec 13 2022, 2:35 PM

Details

Reviewers
mav
imp
Group Reviewers
manpages
Summary

This implements "camcontrol smart", which can be used to check
status of ATA drives.

Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38867
Build 35756: arc lint + arc unit

Event Timeline

trasz requested review of this revision.Apr 26 2021, 1:11 PM

I am not sure how useful it is to report only SMART status. I barely remember any cases when SMART reported actual error. Much more often we start replacing drives preventivelywhen they start reallocating and loose performance. But is you wish, I have no objections.

sbin/camcontrol/camcontrol.c
9884

It would be really good to support at very least SATL too. May be also SCSI and NVMe, even though SMART is very different there.

9926

Why shutdown these days?

In D29992#672920, @mav wrote:

I am not sure how useful it is to report only SMART status. I barely remember any cases when SMART reported actual error. Much more often we start replacing drives preventivelywhen they start reallocating and loose performance.

I concur, at least consumer devices only start reporting SMART errors, after they have actually failed and data is no longer recoverable - but even then, its possible to NOT get a smart error.

Getting the full statistics - to the extent the device is willing to provide them - does allow a proactive approach. Dumping the statistics in a verbose mode would be helpful there.

I have to echo the comments here. fatal error only is useless on the vast majority of devices. We run a lot of our devices well past the time smart alerts (because the alert turned out to be bogus). Without statistics, this functionality is really useless.

SATL devices are SATA devices, and should be supported.

We should consider adding libxo so that the verbose stats from this (and other) commands can be output in a structured way.

sbin/camcontrol/camcontrol.c
9884

As mav@ points out, SATL device work just fine too.

rpokala added inline comments.
sbin/camcontrol/camcontrol.c
9928

I've been hacking on ATA-related code for ages, and this is the first time I've seen a reference to this value. Which version of the standard introduced it?

gbe added a subscriber: gbe.

LGTM for the man page part.