[smartmontools-support] No ETA on SAS drive, when starting a smart test

Christian Franke Christian.Franke at t-online.de
Thu Nov 28 21:05:16 CET 2019


Billy Crook wrote:
> I'm very used to seeing an Estimated time required to complete a test 
> when I start a test.
>
> I'm trying to automate hdd testing with a script that uses smartctl, 
> and I would like it to wait until testing is done before starting the 
> next test.
> What's the best way to do that?
>
> I've been screen scraping the output for a number of minutes or 
> seconds that the test will take.  But this drive (The first SAS one in 
> a while, as normally im validating SATA drives) does't give a time.
>
> sdl and sdn are normal.  sdm is the oddball below
>
> # cat  /tmp/sdl.smart.tshort.out
> smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.0-80.el8.x86_64] 
> (local build)
> Copyright (C) 2002-17, Bruce Allen, Christian Franke, 
> www.smartmontools.org <http://www.smartmontools.org>
>
> === START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
> Sending command: "Execute SMART Short self-test routine immediately in 
> off-line mode".
> Drive command "Execute SMART Short self-test routine immediately in 
> off-line mode" successful.
> Testing has begun.
> Please wait 1 minutes for test to complete.
> Test will complete after Sun Nov 24 22:24:59 2019
> ...
>
> But I just found a drive that doesn't show me any time eta when I 
> start a short test.
>
> [root at UR ~]# smartctl -t short /dev/sdm
> smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.0-80.el8.x86_64] 
> (local build)
> Copyright (C) 2002-17, Bruce Allen, Christian Franke, 
> www.smartmontools.org <http://www.smartmontools.org>
>
> Short Background Self Test has begun
> Use smartctl -X to abort test
>

Unlike ATA, the SCSI standard defines no way to read the estimated 
completion time for short tests. It is only available for extended tests.

SPC-4 says:
"The criteria for the short self-test are that the test ... completes in 
two minutes or less.
The criteria for the extended self-test are ... that the completion time 
required by the SCSI target device to complete the extended self-test is 
reported in ... the EXTENDED SELF-TEST COMPLETION TIME field in the 
Control mode page."

The latter is read by smartctl if '-t long' is used with a SCSI/SAS device.

-- 
Regards,
Christian




More information about the Smartmontools-support mailing list