Another topic that came up at last nights meeting was drive mean time between failures[1]. There is also a mean time to failure, MTTF. Sadly not many hard drives provide this information. I do not believe any spinning disk drives have such. Some solid state hard drives, SSDs, have a indicator for such,
It will not tell you exactly when the drive will fail. but gives you some idea that the media is start to wear out. It might be something to look for when purchasing SSDs. You can find out if your drive supports this by the following, where /dev/sda is the drive, it could be another, but NOT a partition, the entire drive.
smartctl -data -A /dev/sda
Thus far I have only seen Intel SSDs have a 233 Media_Wearout_Indicator ( tried Seagate and Samsung SSDs and they do not have such ), as follows
Intel SSD
ws wlt # smartctl -data -A /dev/sda
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.18.5-gentoo] (local build)
=== START OF READ SMART DATA SECTION ===
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
5 Reallocated_Sector_Ct 0x0032 100 100 000 Old_age Always - 0
9 Power_On_Hours_and_Msec 0x0032 000 000 000 Old_age Always - 902124h+24m+41.070s
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 595
181 Program_Fail_Cnt_Total 0x0032 000 000 000 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 000 000 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 594
225 Host_Writes_32MiB 0x0032 100 100 000 Old_age Always - 77658
232 Available_Reservd_Space 0x0033 100 100 010 Pre-fail Always - 0
233 Media_Wearout_Indicator 0x0032 100 100 000 Old_age Always - 0
241 Host_Writes_32MiB 0x0032 100 100 000 Old_age Always - 77658
242 Host_Reads_32MiB 0x0032 100 100 000 Old_age Always - 24506
249 NAND_Writes_1GiB 0x0013 100 100 000 Pre-fail Always - 2978
Samsung SSD
dev ~ # smartctl -data -A /dev/sda
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.17.4-hardened-r1] (local build)
=== START OF READ SMART DATA SECTION ===
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 097 097 000 Old_age Always - 10585
12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 134
177 Wear_Leveling_Count 0x0013 099 099 000 Pre-fail Always - 6
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 Uncorrectable_Error_Cnt 0x0032 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0032 073 065 000 Old_age Always - 27
195 ECC_Error_Rate 0x001a 200 200 000 Old_age Always - 0
199 CRC_Error_Count 0x003e 099 099 000 Old_age Always - 38
235 POR_Recovery_Count 0x0012 099 099 000 Old_age Always - 82
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 915541701
Seagate SSD
wlt ~ # smartctl -data -A /dev/sda
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.18.5-gentoo] (local build)
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 0
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000e 166 166 006 Old_age Always - 21
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
9 Power_On_Hours 0x0032 092 092 000 Old_age Always - 7156
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 786
171 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
172 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
181 Program_Fail_Cnt_Total 0x0032 100 100 000 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 000 Old_age Always - 0
194 Temperature_Celsius 0x0022 038 000 000 Old_age Always - 38 (Min/Max 13/58)
201 Unknown_SSD_Attribute 0x0032 100 100 000 Old_age Always - 0
204 Soft_ECC_Correction 0x0032 100 100 000 Old_age Always - 0
231 Temperature_Celsius 0x0013 097 097 010 Pre-fail Always - 4
234 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 33063
241 Total_LBAs_Written 0x0032 100 100 000 Old_age Always - 1792
242 Total_LBAs_Read 0x0032 100 100 000 Old_age Always - 1029
250 Read_Error_Retry_Rate 0x0032 100 100 000 Old_age Always - 1407
And for fun, here is a spinning disk drive, last one I have in use outside of gaming platforms (ps4/xbox1)
Seagate spinning disk
dev ~ # smartctl -data -A /dev/sdc
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.17.4-hardened-r1] (local build)
=== START OF READ SMART DATA SECTION ===
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 0x002f 118 099 006 Pre-fail Always - 171239328
3 Spin_Up_Time 0x0023 097 097 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 99
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x002f 100 253 030 Pre-fail Always - 557759
9 Power_On_Hours 0x0032 089 089 000 Old_age Always - 10376
10 Spin_Retry_Count 0x0033 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 96
180 Unknown_HDD_Attribute 0x002b 100 100 000 Pre-fail Always - 0
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0033 100 100 097 Pre-fail Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 099 000 Old_age Always - 1 1 1
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 070 063 045 Old_age Always - 30 (Min/Max 25/32)
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 - 52
193 Load_Cycle_Count 0x0032 099 099 000 Old_age Always - 3787
194 Temperature_Celsius 0x0022 030 040 000 Old_age Always - 30 (0 19 0 0 0)
196 Reallocated_Event_Count 0x0032 100 100 036 Old_age Always - 0
197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0