[smartmontools-support] Smartd is not running selective tests

Christian Franke Christian.Franke at t-online.de
Wed Apr 5 19:44:26 CEST 2023


Anthony Desmarais wrote:
> On 2023/03/28 09:05, Christian Franke wrote:
>> Anthony Desmarais wrote:
>>> Hi wonder if anyone can help me.
>>>
>>> I have two drives in my one linux box running Fedora 37. I also have 
>>> smartmontools ver 7.3-3.
>>>
>>> The box has a western digital purple 8TB drive as well as a Seagate 
>>> Skyhawk 6TB drive.
>>>
>>> I am trying to get smartd to run a selective test every monday at 
>>> 1am, performing a test of about a quarter of the drive every week.
>>>
>>> To start with I executed the first selective test manually with the 
>>> following commands:
>>>
>>> smartctl -t select,0-3907013292 
>>> /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z
>>> smartctl -t select,0-2930261292 
>>> /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M
>>>
>>> Both of these ran just fine and I can see in the smart report that 
>>> the tests completed successfully (see attached text file containing 
>>> both reports).
>>>
>>
>> Do these disks preserve Selective Self-test log across power cycles?
>> If not, is smartd state persistence enabled (see -s option on smartd 
>> man page for details) ?
>
> Yes on both the Fedora and Debian boxes smartd is being run with the 
> -s option:
>
> /[root at gateway ~]# ps aux |grep smartd//
> //root       10512  0.0  0.0  10640  6016 ?        Ss Mar27   0:00 
> /usr/sbin/smartd -n -q never --interval=3600 -s /var/lib/smartmontools///
> /
>
> /root at debian:~# ps aux | grep smartd//
> //root       466  0.0  0.0   7428  1448 ?        Ss Mar15   0:01 
> /usr/sbin/smartd -n -q never --interval=5400 -s /var/lib/smartmontools//
>
> And on both of them the /var/lib/smartmontools folder has regularly 
> updated .state files.
>

Then I have no idea why this does not work.

Please Prepare a temporary smartd-test.conf file with a '-s' directive 
which matches current hour and then run

   smartd -c smartd-test.conf -q onecheck

and provide its output.


> ...
>
> I also note that smartd is being run as root so should have 
> permissions to run smartctl.
>

Smartd does not run smartctl. It directly calls the selective self-test 
functions also used by smartctl.


Regards,
Christian



More information about the Smartmontools-support mailing list