<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 2023/03/28 09:05, Christian Franke
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:38b86ba6-99f9-e3ea-0bde-e3c26f5f5ea0@t-online.de">Anthony
Desmarais wrote:
<br>
<blockquote type="cite">Hi wonder if anyone can help me.
<br>
<br>
I have two drives in my one linux box running Fedora 37. I also
have smartmontools ver 7.3-3.
<br>
<br>
The box has a western digital purple 8TB drive as well as a
Seagate Skyhawk 6TB drive.
<br>
<br>
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.
<br>
<br>
To start with I executed the first selective test manually with
the following commands:
<br>
<br>
smartctl -t select,0-3907013292
/dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z
<br>
smartctl -t select,0-2930261292
/dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M
<br>
<br>
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).
<br>
<br>
</blockquote>
<br>
Do these disks preserve Selective Self-test log across power
cycles?
<br>
If not, is smartd state persistence enabled (see -s option on
smartd man page for details) ?
<br>
</blockquote>
<p>Yes on both the Fedora and Debian boxes smartd is being run with
the -s option:</p>
<p><i>[root@gateway ~]# ps aux |grep smartd</i><i><br>
</i><i>root 10512 0.0 0.0 10640 6016 ? Ss
Mar27 0:00 /usr/sbin/smartd -n -q never --interval=3600 -s
/var/lib/smartmontools/</i><i><br>
</i></p>
<p><i>root@debian:~# ps aux | grep smartd</i><i><br>
</i><i>root 466 0.0 0.0 7428 1448 ? Ss Mar15
0:01 /usr/sbin/smartd -n -q never --interval=5400 -s
/var/lib/smartmontools/</i><br>
</p>
<p>And on both of them the /var/lib/smartmontools folder has
regularly updated .state files.<br>
</p>
<blockquote type="cite"
cite="mid:38b86ba6-99f9-e3ea-0bde-e3c26f5f5ea0@t-online.de">
<br>
<br>
<blockquote type="cite">Then in smartd.conf i have added these two
lines:
<br>
<br>
/dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907 -I
194 -d ata -f -l error -l selftest -l selfteststs -m
anthony@tunguydesmarais>
<br>
/dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z -I 194 -d ata
-a -m <a class="moz-txt-link-abbreviated" href="mailto:anthony@tunguydesmarais.com">anthony@tunguydesmarais.com</a> -n standby,12,q -s
(S/../../3/03|c/../../1>
<br>
/dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M -I 194 -d ata -a
-m <a class="moz-txt-link-abbreviated" href="mailto:anthony@tunguydesmarais.com">anthony@tunguydesmarais.com</a> -n standby,12,q -s
(S/../../3/03|c/../../1/0>
<br>
<br>
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:
<br>
<br>
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
<br>
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
<br>
</blockquote>
<br>
Please try to continue the test manually and report the output of
smartctl:
<br>
<br>
smartctl -t select,cont /dev/disk/by-id/ata-...
<br>
</blockquote>
<p>I tried that on the fedora box and it works just fine:</p>
<p><i>[root@gateway ~]# smartctl -t select,cont
/dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M</i><i><br>
</i><i>smartctl 7.3 2022-02-28 r5338
[x86_64-linux-6.2.7-200.fc37.x86_64] (local build)</i><i><br>
</i><i>Copyright (C) 2002-22, Bruce Allen, Christian Franke,
<a class="moz-txt-link-abbreviated" href="http://www.smartmontools.org">www.smartmontools.org</a></i><i><br>
</i><i><br>
</i><i>=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===</i><i><br>
</i><i>Continue Selective Self-Test: Start next span</i><i><br>
</i><i>Sending command: "Execute SMART Selective self-test routine
immediately in off-line mode".</i><i><br>
</i><i>SPAN STARTING_LBA ENDING_LBA</i><i><br>
</i><i> 0 2930261293 5860522585</i><i><br>
</i><i>Drive command "Execute SMART Selective self-test routine
immediately in off-line mode" successful.</i><i><br>
</i><i>Testing has begun.</i><br>
<br>
</p>
<blockquote type="cite"
cite="mid:38b86ba6-99f9-e3ea-0bde-e3c26f5f5ea0@t-online.de">
<br>
<br>
<blockquote type="cite">
<br>
<br>
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.
<br>
</blockquote>
<br>
Is the Debian box running 24x7 but the Fedora box is not?</blockquote>
<p>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.</p>
<p>I also note that smartd is being run as root so should have
permissions to run smartctl.<br>
</p>
<blockquote type="cite"
cite="mid:38b86ba6-99f9-e3ea-0bde-e3c26f5f5ea0@t-online.de">
<br>
<br>
Regards,
<br>
Christian
<br>
<br>
</blockquote>
</body>
</html>