Announcement

Collapse
No announcement yet.

Anyone know about S.M.A.R.T for Samsung SSDs, K(U)buntu?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Anyone know about S.M.A.R.T for Samsung SSDs, K(U)buntu?

    Helping someone with their thread and stumbled upon questions of my own.
    The issue is: Using SMART on a Samsung SSD in Kubuntu (Linux).

    Edit:

    Below (scroll down in this 1st post), I have placed the specific issue I had with an SSD, the issue that prompted my OP.
    First, I'll put the links I accumulated. Maybe this might shorten someone's searching on this topic (SMART):

    How To: Use S.M.A.R.T. To Check Disk Health
    https://linux-tips.us/how-to-use-s-m...k-disk-health/

    smartmontools, help, FAQ, etc.: https://www.smartmontools.org/wiki/Help

    Wikipedia: https://en.wikipedia.org/wiki/Smart
    This is useful for understanding "attributes" and some other issues with SMART.

    GUI: GSmartControl (get it through Synaptic, Discover, etc.)

    Kubuntu: System > Info Center > Devices > Storage Device, and click: Info Center > Devices > Smart Status

    GParted Live contains SMART smartmontools.

    Quick how-to use it:
    Install smartmontools (it includes the tool smartctl). Use Synaptic, Discover, etc. It may already be installed, or: sudo apt install smartmontoolsIs
    Is SMART enabled? sudo smartctl -i /dev/[sda, etc.]; If not, turn it on: sudo smartctl -s on /dev/[sda, etc.]
    Check status, get report: sudo smartctl -a /dev/sda
    Run short 2-minute test: sudo smartctl -t short /dev/sda
    Wait 2 minutes and run again: sudo smartctl -a /dev/sda
    Run long test: sudo smartctl -t long /dev/sda
    Wait until the long test finishes, then run again: sudo smartctl -a /dev/sda

    Bad Block How-to: https://www.smartmontools.org/wiki/BadBlockHowto

    Where can I find manufacturer-specific disk-testing utilities?
    The ​UBCD (Ultimate Boot CD) https://www.ultimatebootcd.com/
    includes some manufacturer-specific disk-testing utilities and many other useful diagnostic tools ready to boot from CD or USB memory stick.
    These utilities have an important role to fill. If your disk has bad sectors (for example, as revealed by running self-tests with smartmontools) and the disk is not able to recover the data from those sectors, then the disk will not automatically reallocate those damaged sectors from its set of spare sectors, because forcing the reallocation to take place may entail some loss of data. Because the commands that force such reallocation are Vendor Specific, most manufacturers provide a utility for this purpose. It may cause data loss but can repair damaged sectors (at least, until it runs out of replacement sectors).

    Live CDs/DVDs containing smartmontools
    https://www.smartmontools.org/wiki/LiveCDs​

    See also Virginio's post # 7 for some details and links.

    = = = = = = = = = = = = = = = = = = = =
    Specific issue:

    The SSD is pretty typical: Samsung SSD 870 EVO 500GB. I'm in K22.04. It's about 4 years old. Holds just one OS, K22.04.
    Yep, read the Wikipedia article on SMART, which raises more questions than it answers. Each disk vendor doing things their own way, etc.
    Checked at Samsung, too. They have a diagnostic program you can download, but it's for Windows, Mac, and Android.
    Checked at Ask Ubuntu, Stack's, etc., quickly, and so far am not seeing definitive conversations about the issue, especially about interpreting SMART results or output.

    I did run the short and long programs on SMART, using standard commands. Lots of output, but I can post some of it.
    SMART's bottom-line is: "SMART overall-health self-assessment test result: PASSED"
    But I'm wondering about the output. I'll post some it, and see if anyone has thoughts or experience with such.
    I had previously run the short 2-minute test. Now the long test:

    Test good for 85 minutes (long test):
    sudo smartctl -t long /dev/sda
    Then check the results with
    sudo smartctl -a /dev/sda

    Device is: Not in smartctl database [for details use: -P showall]
    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​
    ...
    I can't (easily) control the columns, but it's easy to sort out from the header line "ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE"

    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 072 072 010 Pre-fail Always - 156
    9 Power_On_Hours 0x0032 094 094 000 Old_age Always - 25809
    12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 41
    177 Wear_Leveling_Count 0x0013 099 099 000 Pre-fail Always - 12
    179 Used_Rsvd_Blk_Cnt_Tot 0x0013 072 072 010 Pre-fail Always - 156
    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 072 072 010 Pre-fail Always - 156
    187 Reported_Uncorrect 0x0032 099 099 000 Old_age Always - 28
    190 Airflow_Temperature_Cel 0x0032 075 056 000 Old_age Always - 25
    195 Hardware_ECC_Recovered 0x001a 199 199 000 Old_age Always - 28
    199 UDMA_CRC_Error_Count 0x003e 100 100 000 Old_age Always - 0
    235 Unknown_Attribute 0x0012 099 099 000 Old_age Always - 24
    241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 17139593317
    ...
    Error 28 occurred at disk power-on lifetime: 25392 hours (1058 days + 0 hours)
    When the command that caused the error occurred, the device was active or idle.​
    ...
    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 90% 25807 519240
    # 2 Short offline Completed: read failure 90% 25807 519240
    # 3 Short offline Completed: read failure 90% 25807 519240

    ​Any ideas/help with any of this? (Yep, backed up my data! ;-) )

    Last edited by Qqmike; Nov 07, 2024, 07:44 PM.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    #2
    Your "Reallocated_Sector_Ct" is the thing to watch. If that number grows repeatedly or quickly, it's probably dying. 156 isn't that many, but it's not zero. Some believe 1 is too many.

    You could consider wiping it and running a surface check, but honestly, it's probably time to give it a funeral.

    For comparison, my 840 Pro in use since Jan. 2014:
    Code:
    smith@server:/mnt/pool/@Downloads/torrentfiles$ sudo smartctl -a /dev/sda
    [sudo] password for smith:
    smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.15.0-124-generic] (local build)
    Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF INFORMATION SECTION ===
    Model Family:     Samsung based SSDs
    Device Model:     Samsung SSD 840 PRO Series
    Serial Number:    S12RNEACC52824T
    LU WWN Device Id: 5 002538 55012d2eb
    Firmware Version: DXM05B0Q
    User Capacity:    256,060,514,304 bytes [256 GB]
    Sector Size:      512 bytes logical/physical
    Rotation Rate:    Solid State Device
    Device is:        In smartctl database [for details use: -P show]
    ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c
    SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
    Local Time is:    Wed Nov  6 14:14:12 2024 EST
    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
    
    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:                (53956) seconds.
    Offline data collection
    capabilities:                    (0x53) SMART execute Offline immediate.
    Auto Offline data collection on/off support.
    Suspend Offline collection upon new
    command.
    No 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:        (  20) 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: 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   085   085   000    Old_age   Always       -       72494
    12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       821
    177 Wear_Leveling_Count     0x0013   084   084   000    Pre-fail  Always       -       575
    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   068   044   000    Old_age   Always       -       32
    195 ECC_Error_Rate          0x001a   200   200   000    Old_age   Always       -       0
    199 CRC_Error_Count         0x003e   099   099   000    Old_age   Always       -       15
    235 POR_Recovery_Count      0x0012   099   099   000    Old_age   Always       -       574
    241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       39836521414
    
    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  Short offline       Completed without error       00%       273         -
    # 2  Short offline       Completed without error       00%       273         -
    # 3  Offline             Completed without error       00%       273         -
    
    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
    255        0    65535  Read_scanning was never started
    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​

    Please Read Me

    Comment


      #3
      https://www.smartmontools.org/wiki/BadBlockHowto

      You probably haven't had any issues because you haven't used that part of the drive yet. The good news is you can replace it for about $50
      Last edited by oshunluvr; Nov 06, 2024, 01:44 PM.

      Please Read Me

      Comment


        #4
        Thanks for posting your output. 2014 ... wow!

        ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
        This is such a crap-shoot. It may never fail, yet it may give me a serious problem today, never know.
        I noticed my reallocated sector count was trying to get some attention.
        Maybe time to check Amazon prices on a current comparable model to the Samsung 870.

        Thankfully, I just got an M.2 (Crucial), so I have a place to put stuff. Kind of wanted two hard drives, SSD + M.2
        Might empty out the SSD and write zeros to it and test it again.

        Thanks, again.
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Originally posted by Qqmike View Post
          Helping someone with their thread and stumbled upon questions of my own.
          The issue is: Using SMART on a Samsung SSD in Kubuntu (Linux).

          The SSD is pretty typical: Samsung SSD 870 EVO 500GB. I'm in K22.04. It's about 4 years old. Holds just one OS, K22.04.
          Yep, read the Wikipedia article on SMART, which raises more questions than it answers. Each disk vendor doing things their own way, etc.
          Checked at Samsung, too. They have a diagnostic program you can download, but it's for Windows, Mac, and Android.
          Checked at Ask Ubuntu, Stack's, etc., quickly, and so far am not seeing definitive conversations about the issue, especially about interpreting SMART results or output.

          I did run the short and long programs on SMART, using standard commands. Lots of output, but I can post some of it.
          SMART's bottom-line is: "SMART overall-health self-assessment test result: PASSED"
          But I'm wondering about the output. I'll post some it, and see if anyone has thoughts or experience with such.
          I had previously run the short 2-minute test. Now the long test:

          Test good for 85 minutes (long test):
          sudo smartctl -t long /dev/sda
          Then check the results with
          sudo smartctl -a /dev/sda

          Device is: Not in smartctl database [for details use: -P showall]
          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​
          ...
          I can't (easily) control the columns, but it's easy to sort out from the header line "ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE"

          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 072 072 010 Pre-fail Always - 156
          9 Power_On_Hours 0x0032 094 094 000 Old_age Always - 25809
          12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 41
          177 Wear_Leveling_Count 0x0013 099 099 000 Pre-fail Always - 12
          179 Used_Rsvd_Blk_Cnt_Tot 0x0013 072 072 010 Pre-fail Always - 156
          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 072 072 010 Pre-fail Always - 156
          187 Reported_Uncorrect 0x0032 099 099 000 Old_age Always - 28
          190 Airflow_Temperature_Cel 0x0032 075 056 000 Old_age Always - 25
          195 Hardware_ECC_Recovered 0x001a 199 199 000 Old_age Always - 28
          199 UDMA_CRC_Error_Count 0x003e 100 100 000 Old_age Always - 0
          235 Unknown_Attribute 0x0012 099 099 000 Old_age Always - 24
          241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 17139593317
          ...
          Error 28 occurred at disk power-on lifetime: 25392 hours (1058 days + 0 hours)
          When the command that caused the error occurred, the device was active or idle.​
          ...
          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 90% 25807 519240
          # 2 Short offline Completed: read failure 90% 25807 519240
          # 3 Short offline Completed: read failure 90% 25807 519240

          ​Any ideas/help with any of this? (Yep, backed up my data! ;-) )

          I would not worry about the SSD. It seems healthy to me. The Reallocated_Sector is small in my opinion.

          Install GSmartControl. It will give you a lot of information and is self explained by the creator of the program in the way that you can do a better interpretation of the results.

          Comment


            #6
            Thank you for your advice and for taking time to look at this, Virginio.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Qqmike ,

              Here you can search for a database for a lot of Samsung SSD 870 EVO 500 GB with different serial numbers. They are a collection of Smart from this SSD model:

              https://github.com/linuxhw/SMART/tre...%20EVO%20500GB

              and here you can take an idea for S.M.A.R.T. attributes supporting 845 DC PRO and EVO.​ It is similar to the 870 EVO:

              https://download.semiconductor.samsu...MART_final.pdf

              Only for you know: " Wear Leveling Count " is an attribute that represents the number of times a block has been
              erased. This value is directly related to the lifetime of the SSD.

              About reallocated sector count the advise from oshunluvr is the best you can do : " If that number grows repeatedly or quickly, it's probably dying. " And like he said The good news is you can replace it for about $50.

              Anyway i still have an old Hard Disk drive Seagate ST3000 with ( 35.900 hours Power On ) and 8.900 sectors reallocated and continue to be working but although it is passed on " Overall Health Self-Assessment Test " i suspect it is going to the end of life because " seek error rate " reached 23.000.000. It can be a surface disk problem.

              In time: I have 3 SSDs. 2 WDs green 480G and 1 Kingston SA400 with a 25.000 Hours power one each one and zero reallocated sector count.

              Comment


                #8
                Many thanks for the additional information, Virginio. I also got the GUI you mentioned, and it's helpful, too.
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  I have edited the OP to include helpful references, should anyone stumble upon this thread who is trying to figure out this stuff.
                  An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                  Comment

                  Working...
                  X