Announcement

Collapse
No announcement yet.

How to Test Your Hard Disk Drive

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to Test Your Hard Disk Drive

    This is a reconstitution and update of the original 24 August 2008 post: http://kubuntuforums.net/forums/inde...opic=3097029.0


    So, you're nervous about that $59 bargain hard drive?

    Especially after your cat/dog/wife/husband/little sister knocked it off the table before you got it installed?

    Modern hard disk drives incorporate Self-Monitoring Analysis and Recording Technology, aka SMART. More about that is here. Basically they have a degree of self-test capability that the user can access to help determine the health and life expectancy of a hard disk drive.

    The tool I use is smartmontools. There are others -- many others. "Bonnie++" is one, and a whole suite of hard drive diagnostic tools is available on the Ultimate Boot CD as described here. However if you're simply in a hurry to discover whether your hard drive is likely to crash tomorrow, or not, here's the quick look:

    1. Open a Konsole window and

    Code:
    sudo apt-get install smartmontools
    Assuming the hard disk drive of interest is /dev/sda we'll do the following examination:

    2. Verify the manufacturer, model, and SMART capability, and look at the current state of health (as last recorded):

    Code:
    sudo smartctl -ia /dev/sda
    Here is the output:

    Code:
    dibl@ibex:~$ sudo smartctl -ia /dev/sda
    smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
    Home page is [url]http://smartmontools.sourceforge.net/[/url]                
    
    === START OF INFORMATION SECTION ===
    Model Family:   Maxtor DiamondMax 10 family (ATA/133 and SATA/150)
    Device Model:   Maxtor 6L200P0                  
    Serial Number:  L42WA14G                     
    Firmware Version: BAH41G10                     
    User Capacity:  203,928,109,056 bytes               
    Device is:    In smartctl database [for details use: -P show]  
    ATA Version is:  7                         
    ATA Standard is: ATA/ATAPI-7 T13 1532D revision 0         
    Local Time is:  Sun Aug 24 11:41:52 2008 EDT           
    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: (0x02) Offline data collection activity
                        was completed without error.  
                        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:         (1622) 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:    ( 82) minutes.                  
    SCT capabilities:       (0x0021) SCT Status 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
     3 Spin_Up_Time      0x0027  206  204  063  Pre-fail Always    -    13557  
     4 Start_Stop_Count    0x0032  253  253  000  Old_age  Always    -    619   
     5 Reallocated_Sector_Ct  0x0033  253  253  063  Pre-fail Always    -    0
     6 Read_Channel_Margin   0x0001  253  253  100  Pre-fail Offline   -    0
     7 Seek_Error_Rate     0x000a  253  252  000  Old_age  Always    -    0
     8 Seek_Time_Performance  0x0027  243  237  187  Pre-fail Always    -    48854
     9 Power_On_Minutes    0x0032  223  223  000  Old_age  Always    -    740h+07m
     10 Spin_Retry_Count    0x002b  253  252  157  Pre-fail Always    -    0
     11 Calibration_Retry_Count 0x002b  253  252  223  Pre-fail Always    -    0
     12 Power_Cycle_Count    0x0032  252  252  000  Old_age  Always    -    782
    192 Power-Off_Retract_Count 0x0032  253  253  000  Old_age  Always    -    0
    193 Load_Cycle_Count    0x0032  253  253  000  Old_age  Always    -    0
    194 Temperature_Celsius   0x0032  038  253  000  Old_age  Always    -    43
    195 Hardware_ECC_Recovered 0x000a  253  252  000  Old_age  Always    -    2784
    196 Reallocated_Event_Count 0x0008  253  253  000  Old_age  Offline   -    0
    197 Current_Pending_Sector 0x0008  253  253  000  Old_age  Offline   -    0
    198 Offline_Uncorrectable  0x0008  253  253  000  Old_age  Offline   -    0
    199 UDMA_CRC_Error_Count  0x0008  199  199  000  Old_age  Offline   -    0
    200 Multi_Zone_Error_Rate  0x000a  253  252  000  Old_age  Always    -    0
    201 Soft_Read_Error_Rate  0x000a  253  252  000  Old_age  Always    -    12
    202 TA_Increase_Count    0x000a  253  252  000  Old_age  Always    -    0
    203 Run_Out_Cancel     0x000b  253  252  180  Pre-fail Always    -    0
    204 Shock_Count_Write_Opern 0x000a  253  252  000  Old_age  Always    -    0
    205 Shock_Rate_Write_Opern 0x000a  253  252  000  Old_age  Always    -    0
    207 Spin_High_Current    0x002a  253  252  000  Old_age  Always    -    0
    208 Spin_Buzz        0x002a  253  252  000  Old_age  Always    -    0
    209 Offline_Seek_Performnce 0x0024  240  240  000  Old_age  Offline   -    158
    210 Unknown_Attribute    0x0032  253  252  000  Old_age  Always    -    0
    211 Unknown_Attribute    0x0032  253  252  000  Old_age  Always    -    0
    212 Unknown_Attribute    0x0032  253  252  000  Old_age  Always    -    0
    
    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%   7486     -
    
    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.
    3. Do the short test in offline mode:

    Code:
    sudo smartctl -t short /dev/sda
    This takes a few minutes, depending on the drive model.


    4. Later (by however many minutes, at least) check the self test log to see the test results:

    Code:
    sudo smartctl -l selftest /dev/sda
    Here it says:

    Code:
    dibl@ibex:~$ sudo smartctl -l selftest /dev/sda
    smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
    Home page is [url]http://smartmontools.sourceforge.net/[/url]
    
    === 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%   10570     -
    # 2 Short offline    Completed without error    00%   7486     -

    5. If there is still reason for worry, and a couple of hours to do something else while the long test runs, then:

    Code:
    sudo smartctl -t long /dev/sda
    After the time is completed, review the long test results with the same command as #4 above.


    Read all the capabilities of smartmontools with

    Code:
    man smartctl
    and check this great article for more guidance on how to use it.

    And finally, other things to do with smartmontools are here.

    Now you can relax!

    #2
    Re: How to Test Your Hard Disk Drive

    I use "disk utility" (gnome-disk-utility) to access SMART info (that's my own blog post with screenshots BTW). It's the best of the bunch IMO for disk information.

    You get a tree view on the left of all disks and a right hand pane including info on partitions, SMART summary ("disk is good", green light!) and some buttons allowing you to run tests and alter partitions.

    Comment


      #3
      KF tool

      http://kde-apps.org/content/show.php...content=168881
      DisKMonitor

      Description:
      KDE tools to monitor SMART devices and MDRaid health status



      PPA search: https://launchpad.net/ubuntu/+ppas?n...er=diskmonitor
      Last edited by Rog132; Feb 12, 2015, 06:59 AM.
      A good place to start: Topic: Top 20 Kubuntu FAQs & Answers
      Searching FAQ's: Google Search 'FAQ from Kubuntuforums'

      Comment


        #4
        The ppa search turns up empty results.

        Comment


          #5
          If you're not opposed to gtk program, smart-notifier will pop-up on the desktop when a drive throws errors. I had forgotten I had installed it until two days ago when an old drive registered 3 bad sectors - so I can vouch it works.

          No ppa for diskmonitor found by me either . you have to build it yourself from source right now.

          Please Read Me

          Comment


            #6
            PPA search

            Ubuntu PPA search
            The Ubuntu ppa search: https://launchpad.net/ubuntu/+ppas

            The Ubuntu ppa search seems to have dementia - Google:

            Definitions of dementia

            noun

            a chronic or persistent disorder of the mental processes caused by brain disease or injury and marked by memory disorders, personality changes, and impaired reasoning.
            - May or may not find things - the indexing is a bit slow...
            - Could forget indexed things.

            A bit better search result can be achieved with the web search engines ...

            https://launchpad.net/~samrog131/+ar...series_filter=

            Last edited by Wheel Inventor; Feb 12, 2015, 01:12 PM.

            Comment

            Working...
            X