How to: Repair Hard Disk Health

Some Background …

All modern spinning hard disks and SSD drives contain S.M.A.R.T technology which enables the monitoring of various hard drive parameters, as a means of checking drive health and predicting failure.

Ordinarily, this information isn’t visible to most end users through the OS, you can however access the S.M.A.R.T metrics of your drive using a tool such as SmartMonTools.

SmartMonTools can be used to monitor hard drive health and also to run various built-in hard drive self-test operations…

Hard Drive Image

It’s not uncommon for drives to contain bad sectors over time. Drives will usually detect these hard-to-read sectors and remap the data to known good sectors, all in the background without the user even knowing…

However, sometimes the disk controller will not notice the fault and may need a gentle nudge to help it discover the problem. Running a drive self-test can sometimes resolve such issues. In this guide, I’ll explain how you can do it.

Installation on Windows

First, download and install SmartMonTools from https://www.smartmontools.org/

Open SMARTMONTOOLS > SMARTCTL (ADMIN CMD) from the Windows start menu to launch the console

Viewing Help

Run the below command to list all available commands

smartctl –help
Smartctl

Listing Devices

Run the below command to list available devices

smartctl --scan
Smartctl console

Viewing Disk Information

To view information about a specific disk

smartctl -x <DEVICE>
smartctl -x /dev/sda
Smartctl Console

To view the SMART metrics for a given device, run the below command

smartctl -a <DEVICE>
smartctl -a /dev/sda
Smartctl Console

Self Test

Numerous drive self-tests routines are available, including a ‘Short’ test and ‘Long’ test.

The ‘Short’ test usually takes around 2 minutes to perform a partial scan of the drive subsystems including a partial disk surface scan. On the other hand, the ‘Long’ test will scan each and every individual sector of the drive. This can sometimes resolve disk related performance issues by helping the drive to find hard-to-read sectors and remap them. Note: This scan can take over an hour to complete.

I’d recommend running the ‘Long’ test. There is no risk to losing your data by running this command, however, it may degrade system performance while the scan is being performed.

You can run the ‘Long’ drive self-test as follows:

smartctl -t long
smartctl -t long /dev/sda
Smartctl

You can view the test results by running the following command:

smartctl -a <DEVICE>
smartctl -a /dev/sda
Smartmontools

Graphical User Interface

If you’d prefer a graphical user interface rather than using a command line then check out GSmartControl which provides an easy to use interface for the SmartMonTools command line utility.

You can find it here https://gsmartcontrol.sourceforge.io

GSmartControl Screenshot
GSmartControl Screenshot

Final Thoughts

I hope you’ve found this quick guide to be useful.

If you have any tips please feel free to share in the comments below.

Shane Bartholomeusz

Shane Bartholomeusz

G’day, I’m a technical solutions consultant based in Perth, Australia that specialises in the Microsoft technology stack, including .NET, Dynamics 365, Azure and general web development etc.

This blog is my place to share my thoughts, helpful solutions and just random nerdy stuff.
Shane Bartholomeusz

Latest posts by Shane Bartholomeusz (see all)

Leave a Reply