[smartmontools-support] Understanding 'not capable of SMART self-check' and 'failed to read SMART Attribute Data' from smartd?

Dachshund Digital dachshund-digital at dc.rr.com
Mon Nov 16 22:04:57 CET 2020


Christian,

Thanks... I updated the smartd.conf last night, actually before, I read 
your reply, and the following seems to be working better, I am still 
validating the changes.

DEVICESCAN -a -H -l error -l selftest -n standby -m 
node.red.automation at gmail.com -M test -M daily -M exec 
/usr/share/smartmontools/smartd-runner

I have noticed one quirk... once in a while, maybe 10% of the time, when 
I restart smartd, one or both drives I am using for initial 
setup/testing, is not marked for monitoring.  The log states that no 
ident structure was found/read failed.  If I restart smartd with no 
changes, again, typically both drives are seen correctly.  I can't see 
any reason for this behavior at this point, other than some type of 
communication error, only when I do systemctl restart smartd?  That 
would seem odd.

Example of the failed restart of smartd....

Nov 16 20:49:02 pi4modelb1.dachshund-digital.org smartd[12615]: smartd 
7.1 2019-12-30 r5022 [armv7l-linux-5.4.72-v7l+] (local build)
Nov 16 20:49:02 pi4modelb1.dachshund-digital.org smartd[12615]: 
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
Nov 16 20:49:02 pi4modelb1.dachshund-digital.org smartd[12615]: Opened 
configuration file /etc/smartd.conf
Nov 16 20:49:02 pi4modelb1.dachshund-digital.org smartd[12615]: 
Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, 
scanning devices
Nov 16 20:49:02 pi4modelb1.dachshund-digital.org smartd[12615]: Device: 
/dev/sda [SAT], opened
Nov 16 20:49:11 pi4modelb1.dachshund-digital.org smartd[12615]: Device: 
/dev/sda [SAT], not ATA, no IDENTIFY DEVICE Structure
Nov 16 20:49:11 pi4modelb1.dachshund-digital.org smartd[12615]: Device: 
/dev/sdb [SAT], opened
Nov 16 20:49:20 pi4modelb1.dachshund-digital.org smartd[12615]: Device: 
/dev/sdb [SAT], not ATA, no IDENTIFY DEVICE Structure
Nov 16 20:49:20 pi4modelb1.dachshund-digital.org smartd[12615]: 
Monitoring 0 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices
Nov 16 20:49:20 pi4modelb1.dachshund-digital.org systemd[1]: Started 
Self Monitoring and Reporting Technology (SMART) Daemon.

Restarting smartd again a few minutes later...

Nov 16 20:50:47 pi4modelb1.dachshund-digital.org smartd[12725]: 
Executing test of /usr/share/smartmontools/smartd-runner to 
node.red.automation at gmail.com ...
Nov 16 20:50:47 pi4modelb1.dachshund-digital.org smartd[12725]: Test of 
/usr/share/smartmontools/smartd-runner to node.red.automation at gmail.com: 
successful
Nov 16 20:50:47 pi4modelb1.dachshund-digital.org smartd[12725]: Device: 
/dev/sda [SAT], SMART Prefailure Attribute: 3 Spin_Up_Time changed from 
162 to 164
Nov 16 20:50:47 pi4modelb1.dachshund-digital.org smartd[12725]: Device: 
/dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed 
from 108 to 110
Nov 16 20:50:47 pi4modelb1.dachshund-digital.org smartd[12725]: 
Executing test of /usr/share/smartmontools/smartd-runner to 
node.red.automation at gmail.com ...
Nov 16 20:50:48 pi4modelb1.dachshund-digital.org smartd[12725]: Test of 
/usr/share/smartmontools/smartd-runner to node.red.automation at gmail.com: 
successful
Nov 16 20:50:48 pi4modelb1.dachshund-digital.org smartd[12725]: Device: 
/dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed 
from 105 to 109
Nov 16 20:50:48 pi4modelb1.dachshund-digital.org smartd[12725]: Device: 
/dev/sda [SAT], state written to 
/var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K4CD101H.ata.state
Nov 16 20:50:48 pi4modelb1.dachshund-digital.org smartd[12725]: Device: 
/dev/sdb [SAT], state written to 
/var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K3CYK13E.ata.state
Nov 16 20:50:48 pi4modelb1.dachshund-digital.org systemd[1]: Started 
Self Monitoring and Reporting Technology (SMART) Daemon.

The only difference seems to be the total time of the restart is quick 
when no issues, and quite slow when issue(s) encountered.

If I run smartctl, I never get any errors reading the state or 
configuration of the drives.  So I am a bit mystified that smartd is 
having any issues.

I ran the smartd check you suggested about 10 times, with no issues at all.

Copyright (C) 2002-19, 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 [SAT], opened
Device: /dev/sda [SAT], WDC WD40EFRX-68N32N0, S/N:WD-WCC7K4CD101H, 
WWN:5-0014ee-20fa00e6e, FW:82.00A82, 4.00 TB
Device: /dev/sda [SAT], found in smartd database: Western Digital Red
Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
Device: /dev/sda [SAT], state read from 
/var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K4CD101H.ata.state
Device: /dev/sdb [SAT], opened
Device: /dev/sdb [SAT], WDC WD40EFRX-68N32N0, S/N:WD-WCC7K3CYK13E, 
WWN:5-0014ee-264f48324, FW:82.00A82, 4.00 TB
Device: /dev/sdb [SAT], found in smartd database: Western Digital Red
Device: /dev/sdb [SAT], is SMART capable. Adding to "monitor" list.
Device: /dev/sdb [SAT], state read from 
/var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K3CYK13E.ata.state
Monitoring 2 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices
Executing test of /usr/share/smartmontools/smartd-runner to 
node.red.automation at gmail.com ...
Test of /usr/share/smartmontools/smartd-runner to 
node.red.automation at gmail.com: successful
Device: /dev/sda [SAT], opened ATA device
Device: /dev/sda [SAT], previous self-test completed without error
Executing test of /usr/share/smartmontools/smartd-runner to 
node.red.automation at gmail.com ...
Test of /usr/share/smartmontools/smartd-runner to 
node.red.automation at gmail.com: successful
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.WDC_WD40EFRX_68N32N0-WD_WCC7K4CD101H.ata.state
Device: /dev/sdb [SAT], state written to 
/var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K3CYK13E.ata.state
Started with '-q onecheck' option. All devices successfully checked once.
smartd is exiting (exit status 0)

I guess I could write a script to do the restart/start sequence if not 
all drives are marked for monitoring, but that would mask the issue, no 
solve it.  Any suggestions on how I can resolve this?

Last, I have setup 'msmtp' to send emails, tested it from command line, 
it works.  But smartd is not sending any emails, not even when I set '-M 
test' as part of device scan configuration.  It is my understanding that 
the Debian installation of smartmontools is a bit unique in its 
notification configuration.  I noticed that the script (smartd-runner) 
being called via -M exec is trying to use 'mail' versus 'msmtp' so that 
is obviously an issue.

Schor-

On 11/16/2020 10:17, Christian Franke wrote:
> Dachshund Digital wrote:
>> Understanding 'not capable of SMART self-check' and 'failed to read 
>> SMART Attribute Data' from smartd?
>>
>> I can execute the -H check which reports PASSED for the drive in 
>> question.  I can execute the -P show variant of the smartctl command 
>> sequence.  I can execute the (detail) information variant of the 
>> smartctl command sequence.  No errors or alerts presented by any of 
>> the these commands, so I don't understand what smartd is reporting, 
>> when the results from smartctl show no issues, apparently?  I am new 
>> to smartmontools... so am I missing something (obvious) here?
>>
>> ...
>>
>> From smartd...
>>
>> Nov 16 00:19:50 pi4modelb1.[redacted] smartd[5105]: Warning via to 
>> [redacted]: successful
>> Nov 16 00:19:52 pi4modelb1.[redacted] smartd[5105]: Device: /dev/sda 
>> [SAT], failed to read SMART Attribute Data
>> Nov 16 00:19:52 pi4modelb1.[redacted] smartd[5105]: Sending warning 
>> via to [redacted] ...
>> Nov 16 00:19:52 pi4modelb1.[redacted] smartd[5105]: Warning via to 
>> [redacted]: successful
>> Nov 16 00:20:00 pi4modelb1.[redacted] smartd[5105]: Device: /dev/sdb 
>> [SAT], not capable of SMART self-check
>> Nov 16 00:20:00 pi4modelb1.[redacted] smartd[5105]: Sending warning 
>> via to [redacted] ...
>> Nov 16 00:20:00 pi4modelb1.[redacted] smartd[5105]: Warning via to 
>> [redacted]: successful
>> Nov 16 00:20:02 pi4modelb1.[redacted] smartd[5105]: Device: /dev/sdb 
>> [SAT], failed to read SMART Attribute Data
>> Nov 16 00:20:02 pi4modelb1.[redacted] smartd[5105]: Sending warning 
>> via to [redacted] ...
>> Nov 16 00:20:02 pi4modelb1.[redacted] smartd[5105]: Warning via to 
>> [redacted]: successful
>
> This happens when the initial device registration was successful but 
> some I/O-problem occurred later.
> Try '/usr/sbin/smartd -q onecheck' (see man page for details).
>
>
>>
>> From smartd.conf...  Is my understanding that per the documentation, 
>> ANY THING after the DEVICESAN line is IGNORED, this per the 
>> documentation in the default smartd.conf file.
>
> That is correct.
>
>
>> /dev/sda -m [redacted] -M test
>> /dev/sdb -m [redacted] -M test
>
> These lines do not specify -n standby. I/O-errors like above may occur 
> if a device is in standby mode (depends on drive firmware and device 
> driver).
>
>
>>
>> DEVICESCAN -d removable -n standby -m root -M exec 
>> /usr/share/smartmontools/smartd-runner
>
> This -n standby has no effect for /dev/sda and /dev/sdb.
>
>
>>
>> /dev/sda -l error \
>> ...
>> /dev/sda -l error \
>> ...
>>
>
> These lines are ignored.
>
> Regards,
> Christian
>


More information about the Smartmontools-support mailing list