Home Miscellaneous How To Test The Hard Drive for Problems

How To Test The Hard Drive for Problems

by SupportPRO Admin

It is not often that we need to test the hard drive for problems, but you never know when you may have to. One of the major reasons to perform a test would be if you are seeing read-only errors often (which can normally be fixed by a reboot), the system crashing out too often, or you are seeing very slow read/write times for small amounts of data. This can often be a sign of a failing drive, something a test can point out.

Here are some of the common and best ways to diagnose a possible hard drive issue –

1.Smartctl Test:-

smartctl ( It is part of the smartmontools (S.M.A.R.T. Monitoring Tools) set of utility programs to control and monitor storage systems) The best way to determine whether or not an error is indicative of a more serious problem is by running an extended SMART diagnostic on the hard drive. The test usually takes around 2-3 hours to complete, depending on the drive.

`smartctl -t long /dev/sda` will get the diagnostic started, and then its progress can be checked with the command `smartctl -l selftest /dev/sda`.

To list all the attributes of the drive (the drive name can vary accordingly)

smartctl -a /dev/sda

OR

smartctl -a -d cciss,0 /dev/cciss/c0d0

To test the drive

smartctl -t long /dev/sda

To check the progress

smartctl -l selftest /dev/sda

2. Hdparm:-

hdparm is a command-line utility which is used to set and view hard disk hardware parameters (such as drive cache, sleep mode, power management settings etc.). It is mainly used however to test the drive speeds (read/write) and hence determine if a drive is failing.

This is done using the command below –

hdparm -Tt /dev/sda

This will output the disk cached reads, and the buffered disk reads. Based on the write times, we can determine if the drive is failing or not.

For example, for an HDD which is not used it usually does about 70MB/sec and anything above it. Close to 40MB/sec is also okay, depending on the age of the drive, but if the value gets lower, the drive is a failing one.

You can also hdparm to determine the Serial no: of the drive, when you want to get it replaced (this is particularly useful if you have multiple drives attached)

hdparm -I /dev/sda | grep Serial

3.Badblocks:-

badblocks is a Linux utility to check for damaged sectors on a disk drive. This is normally run in the verbose mode and gives a list of blocks with problems. Badblocks is not usually invoked by itself unless you want a list of badblocks of the hard disk or run the program for checking if the disk drive is ok.

‘badblocks -v /dev/sda’

Please remember never to use badblocks with the -w option on a device containing an existing file system, as this option erases data.

If you suspect website loading issues due to disk troubles contact SupportPRO server admins for a free server health check. We are happy to help.

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment

CONTACT US

Sales and Support

Phone: 1-(847) 607-6123
Fax: 1-(847)-620-0626
Sales: sales@supportpro.com
Support: clients@supportpro.com
Skype ID: sales_supportpro

Postal Address

1020 Milwaukee Ave, #245,
Deerfield, IL-60015
USA

©2022  SupportPRO.com. All Rights Reserved