“There is a greater likelihood of symptoms preceding the failure of the SSD, which actively manifest themselves and progress rapidly, greatly reducing the drive’s life time to several months.”
smartctl
monitoring smartctl
.smartctl
to monitor the status of your SSD on Linuxsmartctl
tool, which is part of the smartmontool
package (at least on Debian / Ubuntu). sudo apt install smartmontools
smartctl
is a command line tool , but it especially helps in cases where you need to automate the collection of data, for example, from your servers.smartctl
is to check to see if your drive has SMART and is supported by the tool: sh$ sudo smartctl -i /dev/sdb smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Seagate Momentus 7200.4 Device Model: ST9500420AS Serial Number: 5VJAS7FL LU WWN Device Id: 5 000c50 02fa0b800 Firmware Version: D005SDM1 User Capacity: 500,107,862,016 bytes [500 GB] Sector Size: 512 bytes logical/physical Rotation Rate: 7200 rpm Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS T13/1699-D revision 4 SATA Version is: SATA 2.6, 3.0 Gb/s Local Time is: Mon Mar 12 15:54:43 2018 CET SMART support is: Available - device has SMART capability. SMART support is: Enabled
-a
option: sh$ sudo smartctl -i -a /dev/sdb smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Seagate Momentus 7200.4 Device Model: ST9500420AS Serial Number: 5VJAS7FL LU WWN Device Id: 5 000c50 02fa0b800 Firmware Version: D005SDM1 User Capacity: 500,107,862,016 bytes [500 GB] Sector Size: 512 bytes logical/physical Rotation Rate: 7200 rpm Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS T13/1699-D revision 4 SATA Version is: SATA 2.6, 3.0 Gb/s Local Time is: Mon Mar 12 15:56:58 2018 CET 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: ( 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: (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: ( 2) minutes. Extended self-test routine recommended polling time: ( 110) minutes. Conveyance self-test routine recommended polling time: ( 3) minutes. SCT capabilities: (0x103f) 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 111 099 006 Pre-fail Always - 29694249 3 Spin_Up_Time 0x0003 100 098 085 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 095 095 020 Old_age Always - 5413 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 3 7 Seek_Error_Rate 0x000f 071 060 030 Pre-fail Always - 51710773327 9 Power_On_Hours 0x0032 070 070 000 Old_age Always - 26423 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 096 037 020 Old_age Always - 4836 184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0 187 Reported_Uncorrect 0x0032 072 072 000 Old_age Always - 28 188 Command_Timeout 0x0032 100 096 000 Old_age Always - 4295033738 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 056 042 045 Old_age Always In_the_past 44 (Min/Max 21/44 #22) 191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 184 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 104 193 Load_Cycle_Count 0x0032 001 001 000 Old_age Always - 395415 194 Temperature_Celsius 0x0022 044 058 000 Old_age Always - 44 (0 13 0 0 0) 195 Hardware_ECC_Recovered 0x001a 050 045 000 Old_age Always - 29694249 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 1 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 1 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 25131 (246 202 0) 241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 3028413736 242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 1613088055 254 Free_Fall_Sensor 0x0032 100 100 000 Old_age Always - 0 SMART Error Log Version: 1 ATA Error Count: 3 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 3 occurred at disk power-on lifetime: 21171 hours (882 days + 3 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 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455 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 08 ff ff ff 4f 00 00:45:12.580 READ FPDMA QUEUED 60 00 08 ff ff ff 4f 00 00:45:12.580 READ FPDMA QUEUED 60 00 08 ff ff ff 4f 00 00:45:12.579 READ FPDMA QUEUED 60 00 08 ff ff ff 4f 00 00:45:12.571 READ FPDMA QUEUED 60 00 20 ff ff ff 4f 00 00:45:12.543 READ FPDMA QUEUED Error 2 occurred at disk power-on lifetime: 21171 hours (882 days + 3 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 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455 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 00 ff ff ff 4f 00 00:45:09.456 READ FPDMA QUEUED 60 00 00 ff ff ff 4f 00 00:45:09.451 READ FPDMA QUEUED 61 00 08 ff ff ff 4f 00 00:45:09.450 WRITE FPDMA QUEUED 60 00 00 ff ff ff 4f 00 00:45:08.878 READ FPDMA QUEUED 60 00 00 ff ff ff 4f 00 00:45:08.856 READ FPDMA QUEUED Error 1 occurred at disk power-on lifetime: 21131 hours (880 days + 11 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 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455 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 00 ff ff ff 4f 00 05:52:18.809 READ FPDMA QUEUED 61 00 00 7e fb 31 45 00 05:52:18.806 WRITE FPDMA QUEUED 60 00 00 ff ff ff 4f 00 05:52:18.571 READ FPDMA QUEUED ea 00 00 00 00 00 a0 00 05:52:18.529 FLUSH CACHE EXT 61 00 08 ff ff ff 4f 00 05:52:18.527 WRITE 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 without error 00% 10904 - # 2 Short offline Completed without error 00% 12 - # 3 Short offline Completed without error 00% 0 - 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.
smartctl
commands ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 3
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 7 Seek_Error_Rate 0x000f 071 060 030 Pre-fail Always - 51710773327
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 9 Power_On_Hours 0x0032 070 070 000 Old_age Always - 26423
sh$ sudo smartctl -i /dev/sdb smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.10.0-32-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Device Model: TOSHIBA THNSNK256GVN8 Serial Number: 17FS131LTNLV LU WWN Device Id: 5 00080d 9109b2ceb Firmware Version: K8XA4103 User Capacity: 256 060 514 304 bytes [256 GB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: Solid State Device Form Factor: M.2 Device is: Not in smartctl database [for details use: -P showall] ATA Version is: ACS-3 (minor revision not indicated) SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Tue Mar 13 01:03:23 2018 CET SMART support is: Available - device has SMART capability. SMART support is: Enabled
smartctl
database. But this does not prevent the tool from collecting data from the SSD, however, it will not be able to report the exact values ​​of the various attributes specific to the provider: sh$ sudo smartctl -a /dev/sdb smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.10.0-32-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 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: ( 120) 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: ( 2) minutes. Extended self-test routine recommended polling time: ( 11) 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 0x000a 100 100 000 Old_age Always - 0 2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0 3 Spin_Up_Time 0x0007 100 100 050 Pre-fail Always - 0 5 Reallocated_Sector_Ct 0x0013 100 100 050 Pre-fail Always - 0 7 Unknown_SSD_Attribute 0x000b 100 100 050 Pre-fail Always - 0 8 Unknown_SSD_Attribute 0x0005 100 100 050 Pre-fail Offline - 0 9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 171 10 Unknown_SSD_Attribute 0x0013 100 100 050 Pre-fail Always - 0 12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 105 166 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 0 167 Unknown_Attribute 0x0022 100 100 000 Old_age Always - 0 168 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 0 169 Unknown_Attribute 0x0013 100 100 010 Pre-fail Always - 100 170 Unknown_Attribute 0x0013 100 100 010 Pre-fail Always - 0 173 Unknown_Attribute 0x0012 200 200 000 Old_age Always - 0 175 Program_Fail_Count_Chip 0x0013 100 100 010 Pre-fail Always - 0 192 Power-Off_Retract_Count 0x0012 100 100 000 Old_age Always - 18 194 Temperature_Celsius 0x0023 063 032 020 Pre-fail Always - 37 (Min/Max 11/68) 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 240 Unknown_SSD_Attribute 0x0013 100 100 050 Pre-fail Always - 0 SMART Error Log Version: 1 No Errors Logged SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t] 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.
smartctl
data on this disk model will appear in the database, and I will be able to better identify potential problems .-t short
)-t long
)-t conveyance
) sh$ sudo smartctl -t short /dev/sdb smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.10.0-32-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 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 2 minutes for test to complete. Test will complete after Mon Mar 12 18:06:17 2018 Use smartctl -X to abort test.
sh$ sudo sh -c 'sleep 120 && smartctl -l selftest /dev/sdb' smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.10.0-32-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === 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% 171 -
sh$ sudo smartctl -t short /dev/sdb smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64] (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 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 2 minutes for test to complete. Test will complete after Mon Mar 12 21:59:39 2018 Use smartctl -X to abort test.
sh$ sudo sh -c 'sleep 120 && smartctl -l selftest /dev/sdb' smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === 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% 26429 - # 2 Short offline Completed without error 00% 10904 - # 3 Short offline Completed without error 00% 12 - # 4 Short offline Completed without error 00% 0 -
sh$ sudo smartctl -t long /dev/sdb smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64] (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 Extended self-test routine immediately in off-line mode". Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful. Testing has begun. Please wait 110 minutes for test to complete. Test will complete after Tue Mar 13 00:09:08 2018 Use smartctl -X to abort test.
sh$ sudo bash -c 'sleep $((110*60)) && smartctl -l selftest /dev/sdb' [sudo] password for sylvain: smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offline Completed: read failure 20% 26430 810665229 # 2 Short offline Completed without error 00% 26429 - # 3 Short offline Completed without error 00% 10904 - # 4 Short offline Completed without error 00% 12 - # 5 Short offline Completed without error 00% 0 -
-t select
, N-max
and -t select
to be able to do this: sh$ sudo smartctl -t select,810665230-max /dev/sdb smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64] (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 810665230 976773167 Drive command "Execute SMART Selective self-test routine immediately in off-line mode" successful. Testing has begun.
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === 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% 26432 - # 2 Extended offline Completed: read failure 20% 26430 810665229 # 3 Short offline Completed without error 00% 26429 - # 4 Short offline Completed without error 00% 10904 - # 5 Short offline Completed without error 00% 12 - # 6 Short offline Completed without error 00% 0 -
Source: https://habr.com/ru/post/461929/
All Articles