Dear Maintainer,
after upgrading to Debian/bullseye I had to adapt/revert
`/etc/smartd.conf`. For Debian/buster I had added a local modification
to monitor my NVMe device.
While reviewing the config file I learned that smartmontools/smartd is
built with `--with-nvme-devicescan` (on Linux and Windows) since v7.0:
https://github.com/smartmontools/smartmontools/releases/tag/RELEASE_7_0
So NVMe devices should work out-of-the-box.
But I think the man page does not reflect that or is at least a bit
confusing on that.
Quoting smartd.conf(5):
,----
| In the absence of a configuration file smartd will try to open all
| available devices (see smartd(8) man page). A configuration file with
| a single line 'DEVICESCAN -a' would have the same effect.
`----
So far so good, but quoting smartd(8):
,----
| On startup, in the absence of the configuration file
| /etc/smartd.conf, the smartd daemon first scans for all devices that
| support SMART. The scanning is done as follows:
|
| LINUX: Examine all entries "/dev/hd[a-t]" for IDE/ATA devices,
| and "/dev/sd[a-z]", "/dev/sd[a-c][a-z]" for ATA/SATA or SCSI/SAS
| devices. Disks behind RAID controllers are not included.
|
| If directive '-d nvme' or no '-d' directive is specified,
| examine all entries "/dev/nvme[0-99]" for NVMe devices.
`----
The default `/etc/smartd.conf` looks like this:
❯ grep "^DEVICESCAN" /etc/smartd.conf
DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
So the directive `-d removable` is given, which makes the statement
above confusing. What about rephrasing the "LINUX" part to:
,----
| LINUX: Examine all entries "/dev/hd[a-t]" for IDE/ATA devices,
| "/dev/sd[a-z]", "/dev/sd[a-c][a-z]" for ATA/SATA or SCSI/SAS
| devices, and "/dev/nvme[0-99]" for NVMe devices. Disks
| behind RAID controllers are not included.
`----
And later in smartd.conf(5):
,----
| -a Equivalent to turning on all of the following Directives:
| '-H' to check the SMART health status, '-f' to report failures of
| Usage (rather than Prefail) Attributes, '-t' to track changes in
| both Prefailure and Usage Attributes, '-l error' to report increases
| in the number of ATA errors, '-l selftest' to report increases in
| the number of Self-
| Test Log errors, '-l selfteststs' to report changes of
| Self-Test execution status, '-C 197' to report nonzero values
| of the current pending sector count, and '-U 198' to report
| nonzero values of the offline pending sector count.
|
| Note that -a is the default for ATA devices. If none of
| these other Directives is given, then -a is assumed.
`----
As none of the Directives above are set in the default DEVICESCAN
line, I assume "-a" kicks in which is "default for ATA devices".
But what about NVMe devices, is -a assumed there too?
As you can clearly see, I have not much knowledge about the internals
of smartmontools/smartd, so please bear with me and lets try to phrase
the documentation as clear as possible.
Thank you very much.
Best,
- Darsha