Using SMART to test a hard drive.

SMART stands for Self-Monitoring, Analysis and Reporting Technology and is available on most mechanical disks that are sold today. Using SMART to test the ‘health’ of a disk consists of two steps:

1 – Run a SMART test to get an initial report.

2 – Run a second SMART report.

In this article I will briefly  go over how to use the smartctl Linux utility that is included in the smartmontools  package.

If you are using Ubuntu you can get the smartmontools package by entering the following command:

sudo apt-get install smartmontools

Before testing the drive, make sure that SMART is enabled on the disk with the following command:

sudo smartctl -i /dev/<drive> | grep "SMART support"

After you have verified that SMART is indeed enabled on the drive, run a test to get an initial reading:

sudo smartctl --test=short /dev/<drive>

Note: <drive> is used to indicate the desired drive to run the test on.

The ‘short’ test will take approximately 2 mins to run. You should wait the recommended time before proceeding to run the report again. Running the ‘short’ test will give you an initial test to let you know if there are any glaring problems reported by the drives SMART software. If you want to run a more thorough test on the drive, you may want to consider running the test using the ‘long’ value. Even better, if you have a fresh disk or you don’t care about the data on the disk and you need to test it rigorously you should use a utility such as shred to write randomly to the disk before running the second report.

To run the second report run the following command:

sudo smartctl -a /dev/<drive>

If the report indicates that the drive PASSED the test then you can be pretty sure that the drive is healthy.

This has been a brief overview of testing the drive’s capability to pass a SMART test. If you have any questions please feel free to comment on this post and I will respond with clarifications.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s