Skip to content

Instantly share code, notes, and snippets.

@danbst
Created January 23, 2022 12:36
Show Gist options
  • Save danbst/0e0338a585b4618e4eb5fb4fcfb62408 to your computer and use it in GitHub Desktop.
Save danbst/0e0338a585b4618e4eb5fb4fcfb62408 to your computer and use it in GitHub Desktop.
Example of SMART (S.M.A.R.T.) test for failing device
[nixos@nixos:~]$ sudo smartctl -a /dev/sdb
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.62] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Toshiba 3.5" DT01ACA... Desktop HDD
Device Model: TOSHIBA DT01ACA200
Serial Number: 84QBH18TS
LU WWN Device Id: 5 000039 ffad3500c
Firmware Version: MX4OABB0
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Jan 23 12:29:49 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: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
See vendor-specific Attribute list for failed Attributes.
General SMART Values:
Offline data collection status: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
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: (14822) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
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: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 247) 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: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 067 067 016 Pre-fail Always - 6282
2 Throughput_Performance 0x0005 062 062 054 Pre-fail Offline - 2103
3 Spin_Up_Time 0x0007 126 126 024 Pre-fail Always - 311 (Average 290)
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 1089
5 Reallocated_Sector_Ct 0x0033 001 001 005 Pre-fail Always FAILING_NOW 943
7 Seek_Error_Rate 0x000b 064 064 067 Pre-fail Always FAILING_NOW 327873
8 Seek_Time_Performance 0x0005 001 001 020 Pre-fail Offline FAILING_NOW 2190
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 6540
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 731
192 Power-Off_Retract_Count 0x0032 097 097 000 Old_age Always - 4628
193 Load_Cycle_Count 0x0012 097 097 000 Old_age Always - 4628
194 Temperature_Celsius 0x0002 240 240 000 Old_age Always - 25 (Min/Max 14/44)
196 Reallocated_Event_Count 0x0032 001 001 000 Old_age Always - 17257
197 Current_Pending_Sector 0x0022 001 001 000 Old_age Always - 8784
198 Offline_Uncorrectable 0x0008 097 097 000 Old_age Offline - 227
199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 19
SMART Error Log Version: 1
ATA Error Count: 23288 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 23288 occurred at disk power-on lifetime: 6540 hours (272 days + 12 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 08 08 00 00 Error: UNC at LBA = 0x00000808 = 2056
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 08 f8 00 0a 80 40 08 00:00:54.319 READ FPDMA QUEUED
60 08 b8 80 08 c0 40 08 00:00:54.318 READ FPDMA QUEUED
60 08 b0 00 09 80 40 08 00:00:54.318 READ FPDMA QUEUED
60 08 a8 40 08 c0 40 08 00:00:54.318 READ FPDMA QUEUED
60 08 a0 80 08 80 40 08 00:00:54.310 READ FPDMA QUEUED
Error 23287 occurred at disk power-on lifetime: 6540 hours (272 days + 12 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 08 08 00 00 Error: UNC at LBA = 0x00000808 = 2056
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 08 90 20 08 c0 40 08 00:00:50.385 READ FPDMA QUEUED
60 08 88 20 08 80 40 08 00:00:50.385 READ FPDMA QUEUED
60 08 80 08 08 00 40 08 00:00:50.384 READ FPDMA QUEUED
60 08 78 f8 06 80 40 08 00:00:50.384 READ FPDMA QUEUED
60 08 70 a8 87 e0 40 08 00:00:50.384 READ FPDMA QUEUED
Error 23286 occurred at disk power-on lifetime: 6540 hours (272 days + 12 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 f8 08 08 00 00 Error: UNC at LBA = 0x00000808 = 2056
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 b0 00 08 80 40 08 00:00:36.327 READ FPDMA QUEUED
60 00 a8 00 08 c0 40 08 00:00:36.327 READ FPDMA QUEUED
60 00 a0 00 08 00 40 08 00:00:36.327 READ FPDMA QUEUED
60 00 98 00 00 00 40 08 00:00:36.327 READ FPDMA QUEUED
60 08 10 00 00 00 40 08 00:00:36.271 READ FPDMA QUEUED
Error 23285 occurred at disk power-on lifetime: 6540 hours (272 days + 12 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 08 08 00 00 Error: UNC at LBA = 0x00000808 = 2056
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 08 48 00 0a c0 40 08 00:00:32.266 READ FPDMA QUEUED
60 08 40 00 09 c0 40 08 00:00:32.265 READ FPDMA QUEUED
60 08 00 00 0c 80 40 08 00:00:32.257 READ FPDMA QUEUED
60 08 f8 00 0a 80 40 08 00:00:32.256 READ FPDMA QUEUED
60 08 10 08 08 00 40 08 00:00:32.239 READ FPDMA QUEUED
Error 23284 occurred at disk power-on lifetime: 6540 hours (272 days + 12 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 08 08 00 00 Error: UNC at LBA = 0x00000808 = 2056
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 08 e0 00 09 80 40 08 00:00:28.357 READ FPDMA QUEUED
60 08 38 80 08 c0 40 08 00:00:28.357 READ FPDMA QUEUED
60 08 d8 80 08 80 40 08 00:00:28.356 READ FPDMA QUEUED
60 08 30 40 08 c0 40 08 00:00:28.356 READ FPDMA QUEUED
60 08 d0 40 08 80 40 08 00:00:28.356 READ FPDMA QUEUED
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed: read failure 50% 6252 3408
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment