Opened 3 years ago

Closed 3 years ago

#1591 closed defect (invalid)

-H returns an error for an otherwise healthy drive

Reported by: Artem S. Tashkinov Owned by:
Priority: minor Milestone:
Component: smartctl Version:
Keywords: ata Cc:

Description

I've got two HDDs with the same issue:

smartctl -H /dev/sdb
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-175-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
Please note the following marginal Attributes:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
190 Airflow_Temperature_Cel 0x0022   067   036   045    Old_age   Always   In_the_past 33 (255 255 33 28 0)

Exit code is 32 despite "SMART overall-health self-assessment test result: PASSED". There's nothing else which is wrong with the drives so the question is, how I can use -H and ignore this particular attribute while not ignoring any real failures?

Here's the complete output:

smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-175-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Constellation ES.3
Device Model:     ST2000NM0033-9ZM175
Serial Number:    [redacted]
LU WWN Device Id: 5 000c50 0642fa65b
Firmware Version: SN07
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2 (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Apr 12 10:33:44 2022 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
See vendor-specific Attribute list for marginal Attributes.

General SMART Values:
Offline data collection status:  (0x82)	Offline data collection activity
					was completed without error.
					Auto Offline Data Collection: Enabled.
Self-test execution status:      ( 248)	Self-test routine in progress...
					80% of test remaining.
Total time to complete Offline 
data collection: 		(  592) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					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: 	 (   1) minutes.
Extended self-test routine
recommended polling time: 	 ( 248) minutes.
Conveyance self-test routine
recommended polling time: 	 (   2) minutes.
SCT capabilities: 	       (0x50bd)	SCT Status supported.
					SCT Error Recovery Control supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   081   063   044    Pre-fail  Always       -       158005897
  3 Spin_Up_Time            0x0003   094   094   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       20
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       22
  7 Seek_Error_Rate         0x000f   092   060   030    Pre-fail  Always       -       1749915271
  9 Power_On_Hours          0x0032   059   059   000    Old_age   Always       -       36027
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       18
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   067   036   045    Old_age   Always   In_the_past 33 (255 255 33 28 0)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       15
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       1534
194 Temperature_Celsius     0x0022   033   064   000    Old_age   Always       -       33 (0 26 0 0 0)
195 Hardware_ECC_Recovered  0x001a   024   013   000    Old_age   Always       -       158005897
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0

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  Extended offline    Completed without error       00%     35972         -

Change History (2)

comment:1 by Christian Franke, 3 years ago

Component: allsmartctl
Keywords: ata added

The exit status is as expected because an attribute failed in the past:

$ man smartctl
...
EXIT STATUS
       ...
       Bit 5: SMART status check returned "DISK OK" but  we  found  that  some
              (usage  or  prefail)  Attributes  have been <= threshold at some
              time in the past.
       ...

This wrapper script clears this bit:

#!/bin/sh
/usr/sbin/smartctl "$@"
exit $(($? & ~32))

comment:2 by Christian Franke, 3 years ago

Resolution: invalid
Status: newclosed

The exit status is as expected because an attribute failed in the past.

Note: See TracTickets for help on using tickets.