Hard Disk Hardware SSD Smartctl – How to Check Life Left in SSD

hard-diskhardwaresmartctlssd

We all know that SSDs have a limited predetermined life span. How do I check in Linux what the current health status of an SSD is?

Most Google search results would ask you to look up S.M.A.R.T. information for a percentage field called Media_Wearout_Indicator, or other jargons indicators like Longterm Data Endurance — which don't exist — Yes I did check two SSDs, both lack these fields. I could go on to find a third SSD, but I feel the fields are not standardized.

To demonstrate the problem here are the two examples.


With the first SSD, it is not clear which field indicates wearout level. However there is only one Unknown_Attribute whose RAW VALUE is between 1 and 100, thus I can only assume that is what we are looking for:

    $ sudo smartctl -A /dev/sda                                             
    smartctl 6.2 2013-04-20 r3812 [x86_64-linux-3.11.0-14-generic] (local build)
    Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

    === 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   0x0002   100   100   000    Old_age   Always       -       0
      9 Power_On_Hours          0x0002   100   100   000    Old_age   Always       -       6568
     12 Power_Cycle_Count       0x0002   100   100   000    Old_age   Always       -       1555
    171 Unknown_Attribute       0x0002   100   100   000    Old_age   Always       -       0
    172 Unknown_Attribute       0x0002   100   100   000    Old_age   Always       -       0
    173 Unknown_Attribute       0x0002   100   100   000    Old_age   Always       -       57
    174 Unknown_Attribute       0x0002   100   100   000    Old_age   Always       -       296
    187 Reported_Uncorrect      0x0002   100   100   000    Old_age   Always       -       0
    230 Unknown_SSD_Attribute   0x0002   100   100   000    Old_age   Always       -       190
    232 Available_Reservd_Space 0x0003   100   100   005    Pre-fail  Always       -       0
    234 Unknown_Attribute       0x0002   100   100   000    Old_age   Always       -       350
    241 Total_LBAs_Written      0x0002   100   100   000    Old_age   Always       -       742687258
    242 Total_LBAs_Read         0x0002   100   100   000    Old_age   Always       -       1240775277

So this SSD has used 57% of its rewrite life-span, is it correct?


With the other disk, the SSD_Life_Left ATTRIBUTE stands out, but its Raw value of 0, indicating 0% life left, is unlikely for an apparently-healthy SSD unless it happen to be in peril (we will see in a few days), and if it reads "0% life has been used", also impossible for a worn hard disk (worn = used for more than a year).

    > sudo /usr/sbin/smartctl -A /dev/sda
    smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.11.6-4-desktop] (SUSE RPM)
    Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

    === 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     0x000f   104   100   050    Pre-fail  Always       -       0/8415644
      5 Retired_Block_Count     0x0033   100   100   003    Pre-fail  Always       -       0
      9 Power_On_Hours_and_Msec 0x0032   100   100   000    Old_age   Always       -       4757h+02m+17.130s
     12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       1371
    171 Program_Fail_Count      0x0032   000   000   000    Old_age   Always       -       0
    172 Erase_Fail_Count        0x0032   000   000   000    Old_age   Always       -       0
    174 Unexpect_Power_Loss_Ct  0x0030   000   000   000    Old_age   Offline      -       52
    177 Wear_Range_Delta        0x0000   000   000   000    Old_age   Offline      -       2
    181 Program_Fail_Count      0x0032   000   000   000    Old_age   Always       -       0
    182 Erase_Fail_Count        0x0032   000   000   000    Old_age   Always       -       0
    187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
    194 Temperature_Celsius     0x0022   030   030   000    Old_age   Always       -       30 (Min/Max 30/30)
    195 ECC_Uncorr_Error_Count  0x001c   104   100   000    Old_age   Offline      -       0/8415644
    196 Reallocated_Event_Count 0x0033   100   100   000    Pre-fail  Always       -       0
    231 SSD_Life_Left           0x0013   100   100   010    Pre-fail  Always       -       0
    233 SandForce_Internal      0x0000   000   000   000    Old_age   Offline      -       3712
    234 SandForce_Internal      0x0032   000   000   000    Old_age   Always       -       1152
    241 Lifetime_Writes_GiB     0x0032   000   000   000    Old_age   Always       -       1152
    242 Lifetime_Reads_GiB      0x0032   000   000   000    Old_age   Always       -       3072

Best Answer

In your first example, what I think you are referring to is the "Media Wearout Indicator" on Intel drives, which is attribute 233. Yes, it has a range of 0-100, with 100 being a brand new, unused drive, and 0 being completely worn out. According to your ouptut, this field doesn't seem to exist.

In your second example, please read the official docs about SSD_Life_Left. Per that page:

The RAW value of this attribute is always 0 and has no meaning. Check the normalized VALUE instead. It starts at 100 and indicates the approximate percentage of SDD life left. It typically decreases when Flash blocks are marked as bad, see the RAW value of Retired_Block_Count

It's really important that you fully understand what smartctl(8) is saying, and not making assumptions. Unfortunately, the S.M.A.R.T. tools aren't always up to date with the latest SSDs and their attributes. As such, there isn't always a clean way to tell how many times the chips have been written to. Best you can do, is look at the "Power_On_Hours", which in your case is "6568", determine your average disk utilization, and average it out.

You should be able to lookup your drive specs, and determine the process used to make the chips. 32nm process chips will have a longer write endurance than 24nm process chips. However, it seems that "on average", you could probably expect about 3,000 to 4,000 writes, with a minimum of 1,000 and a max of 6,000. So, if you have a 64GB SSD, then you should expect somewhere in the neighborhood of a total of 192TB to 256TB written to the SSD, assuming wear leveling.

As an example, if you're sustaining a utilization of say 11 KBps to your drive, then you could expect to see about 40 MB written per hour. At 6568 powered on hours, you've written roughly 260 GB to disk. Knowing that you could probably sustain about 200 TB of total writes, before failure, you have about 600 years before failure due to wearing out the chips. Your disk will likely fail due to worn out capacitors or voltage regulation.

Related Question