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

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

Steps to check hard drive health status in Linux:

  1. Launch terminal.
  2. Install smartmontools package for your system.
    $ sudo apt update && sudo apt install --assume-yes smartmontools # Ubuntu and Debian
  3. List installed hard drive on your system.
    $ lsblk | grep disk
    sda      8:0    0   20G  0 disk
    sdb      8:16   0    5G  0 disk
  4. Instruct hard drive to perform self-test using smartctl.
    $ sudo smartctl -t short /dev/sda
    smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-47-generic] (local build)
    Copyright (C) 2002-19, 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.
  5. Check hard drive health status of selected hard drive using smartctl after the previous self-test has completed.
    $ sudo smartctl -H /dev/sda
    smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-47-generic] (local build)
    Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF READ SMART DATA SECTION ===
    SMART Health Status: OK
Discuss the article:

Comment anonymously. Login not required.

Share!