[smartmontools-support] Smartd is not running selective tests
Anthony Desmarais
anthony at tunguydesmarais.com
Sat Apr 8 13:38:36 CEST 2023
Thanks for the help Christain.
I did what you asked for and the below is what the output was. Dont know
why it is complaining about inappropriate ioctl for device when I run
fin manually with smartctl
[root at gateway ~]# smartd -c /root/smartd.conf -q onecheck
smartd 7.3 2022-02-28 r5338 [x86_64-linux-6.2.8-200.fc37.x86_64] (local
build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
Opened configuration file /root/smartd.conf
Configuration file /root/smartd.conf parsed.
Device: /dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907
[ata], unique name: /dev/sda
Device: /dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907, opened
Device: /dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907,
SQF-S25M8-256G-SAC, S/N:2FA6078110F500505907, FW:SAFM02A3, 256 GB
Device: /dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907, not
found in smartd database 7.3/5319.
Device: /dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907,
can't monitor Current_Pending_Sector count - no Attribute 197
Device: /dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907,
can't monitor Offline_Uncorrectable count - no Attribute 198
Device: /dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907, is
SMART capable. Adding to "monitor" list.
Device: /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z [ata], unique
name: /dev/sdc
Device: /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z, opened
Device: /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z, WDC
WD80PURZ-85YNPY0, S/N:R6GE804Z, WWN:5-000cca-263c606df, FW:80.H0A80, 8.00 TB
Device: /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z, found in
smartd database 7.3/5319: Western Digital Purple
Device: /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z, is SMART
capable. Adding to "monitor" list.
Device: /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M [ata], unique
name: /dev/sdb
Device: /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M, opened
Device: /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M,
ST6000VX001-2BD186, S/N:ZR13347M, WWN:5-000c50-0e3da56c5, FW:CV12, 6.00 TB
Device: /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M, found in smartd
database 7.3/5319: Seagate Skyhawk
Device: /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M, is SMART
capable. Adding to "monitor" list.
Monitoring 3 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices
Device: /dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907,
opened ATA device
Device: /dev/disk/by-id/ata-SQF-S25M8-256G-SAC_2FA6078110F500505907,
previous self-test completed without error
Device: /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z, opened ATA device
Device: /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z, previous
self-test completed without error
Write Selective Self-test Log failed: Inappropriate ioctl for device
Device: /dev/disk/by-id/ata-WDC_WD80PURZ-85YNPY0_R6GE804Z, prepare
Selective Self-Test failed
Device: /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M, opened ATA device
Device: /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M, previous
self-test completed without error
Write Selective Self-test Log failed: Inappropriate ioctl for device
Device: /dev/disk/by-id/ata-ST6000VX001-2BD186_ZR13347M, prepare
Selective Self-Test failed
Started with '-q onecheck' option. All devices successfully checked once.
smartd is exiting (exit status 0)
On 2023/04/05 19:44, Christian Franke wrote:
> 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