[smartmontools-support] Smartd is not running selective tests

Anthony Desmarais anthony at tunguydesmarais.com
Tue Mar 28 16:40:39 CEST 2023


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 in smartd.conf i have added these two lines:
>>
>> /dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907 -I 194 -d 
>> ata -f -l error -l selftest -l selfteststs  -m anthony at tunguydesmarais>
>> /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z -I 194 -d ata -a -m 
>> anthony at tunguydesmarais.com -n standby,12,q -s (S/../../3/03|c/../../1>
>> /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M -I 194 -d ata -a -m 
>> anthony at tunguydesmarais.com -n standby,12,q -s 
>> (S/../../3/03|c/../../1/0>
>>
>> So the last two disks should run a selective test every monday at 
>> 1am. However this test in not running. Looking is me syslog i see the 
>> following errors:
>>
>> Mar 27 01:53:02 daemon.crit [26]: smartd - smartd[1076]: - Device: 
>> /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z, prepare Selective 
>> Self-Test failed
>> Mar 27 01:53:02 daemon.crit [26]: smartd - smartd[1076]: - Device: 
>> /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M, prepare Selective 
>> Self-Test failed
>
> Please try to continue the test manually and report the output of 
> smartctl:
>
> smartctl -t select,cont /dev/disk/by-id/ata-...

I tried that on the fedora box and it works just fine:

/[root at gateway ~]# smartctl -t select,cont 
/dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M//
//smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.2.7-200.fc37.x86_64] 
(local build)//
//Copyright (C) 2002-22, Bruce Allen, Christian Franke, 
www.smartmontools.org//
//
//=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===//
//Continue Selective Self-Test: Start next span//
//Sending command: "Execute SMART Selective self-test routine 
immediately in off-line mode".//
//SPAN         STARTING_LBA           ENDING_LBA//
//   0           2930261293           5860522585//
//Drive command "Execute SMART Selective self-test routine immediately 
in off-line mode" successful.//
//Testing has begun./

>
>
>>
>>
>> Out of interest I have another box running debian with two identical 
>> drive in it (my backup NAS). I have the same setting in that one and 
>> I see that the selective tests run just fine.
>
> Is the Debian box running 24x7 but the Fedora box is not?

They both run 24/7 but we do have regular power outages here in South 
Africa - there has been none in the past two week though.

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

>
>
> Regards,
> Christian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://listi.jpberlin.de/pipermail/smartmontools-support/attachments/20230328/b912808c/attachment.htm>


More information about the Smartmontools-support mailing list