smartctl - Can't run select span range

Ubence Quevedo thatrat at gmail.com
Sun Jun 24 20:21:48 UTC 2018


Hi Everyone,

The macports package of smartmontools doesn't seem to support selective
span testing ranges.

When the command is executed, the command is sent, but the program fails
with an "Unsopported SMART self-test mode":
Ubences-MacBook-Pro:~ uquevedo$ smartctl -t select,0-10 /dev/disk0
smartctl 6.6 2017-11-05 r4594 [Darwin 17.6.0 x86_64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Selective self-test routine immediately in
off-line mode".
SPAN         STARTING_LBA           ENDING_LBA
   0                    0                   10
Command "Execute SMART Selective self-test routine immediately in off-line
mode" failed: Unsupported SMART self-test mode

Running smartcl -a against the device shows that the span was registered,
but it isn't being tested:
Ubences-MacBook-Pro:~ uquevedo$ smartctl -a /dev/disk0
smartctl 6.6 2017-11-05 r4594 [Darwin 17.6.0 x86_64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     Samsung SSD 860 EVO 250GB
Serial Number:    *[Purposefully Removed]*
LU WWN Device Id: 5 002538 e40309e18
Firmware Version: RVT01B6Q
User Capacity:    250,059,350,016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Jun 24 11:15:52 2018 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine
completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (    0) seconds.
Offline data collection
capabilities: (0x53) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: (   2) minutes.
Extended self-test routine
recommended polling time: (  85) minutes.
SCT capabilities:        (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED
WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always
   -       0
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always
   -       205
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always
   -       94
177 Wear_Leveling_Count     0x0013   099   099   000    Pre-fail  Always
   -       3
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always
   -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always
   -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always
   -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always
   -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always
   -       0
190 Airflow_Temperature_Cel 0x0032   061   048   000    Old_age   Always
   -       39
195 Hardware_ECC_Recovered  0x001a   200   200   000    Old_age   Always
   -       0
199 UDMA_CRC_Error_Count    0x003e   100   100   000    Old_age   Always
   -       0
235 Unknown_Attribute       0x0012   099   099   000    Old_age   Always
   -       17
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always
   -       1961205189

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining
LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%       204
 -
# 2  Short offline       Completed without error       00%       201
 -
# 3  Extended offline    Completed without error       00%       199
 -
# 4  Short offline       Completed without error       00%       195
 -
# 5  Short offline       Completed without error       00%       193
 -
# 6  Short offline       Aborted by host               40%       193
 -
# 7  Extended offline    Completed without error       00%       191
 -
# 8  Short offline       Aborted by host               20%       189
 -
# 9  Short offline       Completed without error       00%       187
 -
#10  Short offline       Completed without error       00%       184
 -
#11  Extended offline    Aborted by host               90%       175
 -
#12  Short offline       Completed without error       00%       172
 -
#13  Extended offline    Completed without error       00%       171
 -
#14  Short offline       Completed without error       00%       166
 -
#15  Short offline       Completed without error       00%       163
 -
#16  Extended offline    Completed without error       00%       159
 -
#17  Short offline       Completed without error       00%       154
 -
#18  Short offline       Completed without error       00%       151
 -
#19  Short offline       Completed without error       00%       148
 -
#20  Extended offline    Completed without error       00%       147
 -
#21  Short offline       Completed without error       00%       142
 -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
*    1        0       10  Not_testing*
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

However, when I boot the same system off of Ubuntu 18.04 Live USB with the
same version of smartmontools [6.6], this command works properly:
root at ubuntu:~# smartctl -t select,0-10 /dev/sda
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-20-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Selective self-test routine immediately in
off-line mode".
SPAN         STARTING_LBA           ENDING_LBA
   0                    0                   10
Drive command "Execute SMART Selective self-test routine immediately in
off-line mode" successful.

Checking the drive shows that the selective test ran properly:
root at ubuntu:~# smartctl -a /dev/sda
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-20-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     Samsung SSD 860 EVO 250GB
Serial Number:    *[Purposefully Removed]*
LU WWN Device Id: 5 002538 e40309e18
Firmware Version: RVT01B6Q
User Capacity:    250,059,350,016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   Unknown(0x09fc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Jun 24 18:12:14 2018 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine
completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (    0) seconds.
Offline data collection
capabilities: (0x53) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: (   2) minutes.
Extended self-test routine
recommended polling time: (  85) minutes.
SCT capabilities:        (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED
WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always
   -       0
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always
   -       204
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always
   -       94
177 Wear_Leveling_Count     0x0013   099   099   000    Pre-fail  Always
   -       3
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always
   -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always
   -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always
   -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always
   -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always
   -       0
190 Airflow_Temperature_Cel 0x0032   065   048   000    Old_age   Always
   -       35
195 Hardware_ECC_Recovered  0x001a   200   200   000    Old_age   Always
   -       0
199 UDMA_CRC_Error_Count    0x003e   100   100   000    Old_age   Always
   -       0
235 Unknown_Attribute       0x0012   099   099   000    Old_age   Always
   -       17
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always
   -       1960944701

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining
LifeTime(hours)  LBA_of_first_error
*# 1  Selective offline   Completed without error       00%       204
   -*
# 2  Short offline       Completed without error       00%       204
 -
# 3  Short offline       Completed without error       00%       201
 -
# 4  Extended offline    Completed without error       00%       199
 -
# 5  Short offline       Completed without error       00%       195
 -
# 6  Short offline       Completed without error       00%       193
 -
# 7  Short offline       Aborted by host               40%       193
 -
# 8  Extended offline    Completed without error       00%       191
 -
# 9  Short offline       Aborted by host               20%       189
 -
#10  Short offline       Completed without error       00%       187
 -
#11  Short offline       Completed without error       00%       184
 -
#12  Extended offline    Aborted by host               90%       175
 -
#13  Short offline       Completed without error       00%       172
 -
#14  Extended offline    Completed without error       00%       171
 -
#15  Short offline       Completed without error       00%       166
 -
#16  Short offline       Completed without error       00%       163
 -
#17  Extended offline    Completed without error       00%       159
 -
#18  Short offline       Completed without error       00%       154
 -
#19  Short offline       Completed without error       00%       151
 -
#20  Short offline       Completed without error       00%       148
 -
#21  Extended offline    Completed without error       00%       147
 -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
*    1        0       10  Not_testing*
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Is there a reason why the macports version doesn't honor the selective
testing parameter?

-Ubence
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20180624/d938a531/attachment.html>


More information about the macports-users mailing list