SMART Devices

Listing 9: Long Test Output

# smartctl -l selftest /dev/sda
smartctl 7.2 2020-07-11 r5076 [x86_64-linux-5.4.0-42-generic] (CircleCI)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== 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  Extended offline    Completed without error       00%     12441         -
# 2  Short offline       Completed without error       00%     12441         -
# 3  Short offline       Completed without error       00%     12441         -

The output of the extended test is reported in the Extended offline line. It, too, was completed without error. If you run

smartctl -l selftest

and do not see any Extended offline output, the long test has not completed. Just wait a little longer and try the command again until you see the output.

In addition to self-tests, you can also search the SMART logs for errors with the simple command shown in Listing 10.

Listing 10: Self-Test Logs

# smartctl -l error -d sat /dev/sda
smartctl 7.2 2020-07-11 r5076 [x86_64-linux-5.4.0-42-generic] (CircleCI)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Error Log Version: 1
No Errors Logged

This command is helpful if you run self-tests at periodic intervals. In this case, errors are found on the drive.

Once you know that a drive is good (no errors and all self-tests are passed), you can start to probe the drive a little further. Earlier, I used the -c option to list the reporting capabilities of the drive. You can also use the -a option (Listing 11) to list the vendor-specific SMART attributes. Although the output is rather long, it contains a great deal of information.

Related content

  • SMART storage device monitoring
    Most storage devices have SMART capability, but can it help you predict failure? We look at ways to take advantage of this built-in monitoring technology with the smartctl utility from the Linux smartmontools package.
  • S.M.A.R.T., smartmontools, and drive monitoring
    Modern drives use S.M.A.R.T. (self-monitoring, analysis, and reporting technology) to gather information and run self-tests. Smartmontools is a Linux tool for interacting with the S.M.A.R.T. features of drives. But is S.M.A.R.T. the best way to predict impending drive doom?
  • Predicting Drive Doom

    Modern drives use S.M.A.R.T. (self-monitoring, analysis, and reporting technology) to gather information and run self-tests. Smartmontools is a Linux tool for interacting with the S.M.A.R.T. features of drives. But is S.M.A.R.T. the best way to predict impending drive doom?

  • When I/O workloads don't perform
    Every now and then, you find yourself in a situation where you expect better performance from your data storage drives. Either they once performed very well and one day just stopped, or they came straight out of the box underperforming. We explore a few of the reasons why this might happen.
  • A closer look at hard drives
    We continue our exploration of the world of hard drives – both solid state and spinning varieties.
comments powered by Disqus