S.M.A.R.T. or Self-Monitoring, Analysis, and Reporting Technology is used to monitor the hard drives for reliability. Hard drive's failure can be anticipated and appropriate action can be taken before the hard drive fail completely.

smartctl is a tool that can be used to check your hard drive's health status in Linux. It is available in the smartmontools suite, and is available in most Linux distributions such as Ubuntu.

Check hard drive health status in Linux:

  1. Install smartmontools package.
    $ sudo apt update && sudo apt install --assume-yes smartmontools # Ubuntu and Debian
  2. List installed hard drive on your system.
    $ lsblk | grep disk
    sda      8:0    0   20G  0 disk
    sdb      8:16   0    5G  0 disk
  3. Test hard drive health using smartctl.
    $ sudo smartctl -t short /dev/sda
    smartctl 7.0 2018-12-30 r4883 [Darwin 19.0.0 x86_64] (local build)
    Copyright (C) 2002-18, 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 Wed Jul 17 15:58:30 2019
    
    Use smartctl -X to abort test.
  4. Check hard drive health status of selected hard drive using smartctl after test has completed.
     $ sudo smartctl -H /dev/sda
    smartctl 7.0 2018-12-30 r4883 [Darwin 19.0.0 x86_64] (local build)
    Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
Leave your feedback:
Share!