@dcbailey
and:
Would suggest that the service didn’t start as there were no devices found. Could you give us an indication of the mature of your system. I.e. are you running fully virtualized for instance as virtio devices, for one, don’t support smart capability. In which case it is better to pass the devices or better again the entire controller through to the Rockstor instance if you want it to have smart access.
The “Configuration file /etc/smartd.conf parsed but has no entries” bit is a little strange thought. But this could have the same root cause of “No devices to monitor”.
Here on a virtualized instance I have just now reproduce your issue with:
rleap15-3:~ # /usr/sbin/smartd -d
smartd 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-150300.59.54-default] (SUSE RPM)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
Opened configuration file /etc/smartd.conf
Configuration file /etc/smartd.conf parsed but has no entries
Unable to monitor any SMART enabled devices. Exiting...
Also note that our newer smartd looks to auto disable if it finds itself in a virtualization condition, e.g. even if there are sata emulations in play, which emulate smart output but are of course fake, we still have the following result:
rleap15-3:~ # systemctl status smartd.service
● smartd.service - Self Monitoring and Reporting Technology (SMART) Daemon
Loaded: loaded (/usr/lib/systemd/system/smartd.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Wed 2022-05-04 11:57:22 BST; 43s ago
└─ ConditionVirtualization=false was not met
Docs: man:smartd(8)
man:smartd.conf(5)
May 04 11:13:36 rleap15-3 systemd[1]: Condition check resulted in Self Monitoring and Reporting Technology (SMART) Daemon being skipped.
May 04 11:57:22 rleap15-3 systemd[1]: Condition check resulted in Self Monitoring and Reporting Technology (SMART) Daemon being skipped.
In this case the system was a kvm hosted instance:
rleap15-3:~ # systemd-detect-virt
kvm
So in the case above the smartd service is skipped due to the virtualisation conditional in the associated systemd config file:
rleap15-3:~ # cat /usr/lib/systemd/system/smartd.service
[Unit]
Description=Self Monitoring and Reporting Technology (SMART) Daemon
Documentation=man:smartd(8) man:smartd.conf(5)
ConditionVirtualization=false
[Service]
Type=notify
EnvironmentFile=-/var/lib/smartmontools/smartd_opts
ExecStart=/usr/sbin/smartd -n $smartd_opts
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
So if I for example configure the SMART service in this VM example via the Rockstor Web-UI via the S.M.A.R.T spanner on the services page using the mouse-over popup/tool-tip example to monitor all devices:
a debug run looks to have responded accordingly:
rleap15-3:~ # /usr/sbin/smartd -d
smartd 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-150300.59.54-default] (SUSE RPM)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
Opened configuration file /etc/smartd.conf
Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
Device: /dev/sda, type changed from 'scsi' to 'sat'
Device: /dev/sda [SAT], opened
Device: /dev/sda [SAT], QEMU HARDDISK, S/N:QM00001, FW:2.5+, 25.7 GB
Device: /dev/sda [SAT], not found in smartd database.
Device: /dev/sda [SAT], can't monitor Current_Pending_Sector count - no Attribute 197
Device: /dev/sda [SAT], can't monitor Offline_Uncorrectable count - no Attribute 198
Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
Device: /dev/sdb, type changed from 'scsi' to 'sat'
Device: /dev/sdb [SAT], opened
Device: /dev/sdb [SAT], QEMU HARDDISK, S/N:QM00003, FW:2.5+, 4.29 GB
Device: /dev/sdb [SAT], not found in smartd database.
Device: /dev/sdb [SAT], can't monitor Current_Pending_Sector count - no Attribute 197
Device: /dev/sdb [SAT], can't monitor Offline_Uncorrectable count - no Attribute 198
Device: /dev/sdb [SAT], is SMART capable. Adding to "monitor" list.
Monitoring 2 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices
Device: /dev/sda [SAT], opened ATA device
Device: /dev/sda [SAT], previous self-test completed without error
Device: /dev/sdb [SAT], opened ATA device
Device: /dev/sdb [SAT], previous self-test completed without error
Device: /dev/sda [SAT], state written to /var/lib/smartmontools/smartd.QEMU_HARDDISK-QM00001.ata.state
Device: /dev/sdb [SAT], state written to /var/lib/smartmontools/smartd.QEMU_HARDDISK-QM00003.ata.state
Incidentally the normal CONTROL (key) and c simply reloads in debug mode. To exit you need a:
CONTROL (key) and "" (key).
So in my test case here I also had to remark out the virtualization test in the systemd file, i.e. via:
nano /usr/lib/systemd/system/smartd.service
so the line was for eample:
# ConditionVirtualization=false
as well as configure to monitor all devices as per the above picture and tooltip popup.
I then get a successful enablement of the smart service via the Web-UI:
Hope this helps.
@Flox @Hooverdan @GeoffA This behaviour, both in virtualisation sensitivity and defaulting to no monitoring, is functionally different from our prior CentOS base where we had a pre-populated DEVICESCAN -a option I believe. This is good to know and we should maybe add this to the docs. I’m not keen on diverging from our openSUSE Leap 15.3 default smartd config but we should consider amending our: “S.M.A.R.T” howto S.M.A.R.T — Rockstor documentation"
with what we already prompt in the tooltip popup. I’ve created the following doc issue for this:
https://github.com/rockstor/rockstor-doc/issues/375