Examining disk health
Modern disk drives run for years with no problems, but when a disk fails, it's a major disaster. Modern disk drives include a Self-Monitoring, Analysis, and Reporting Technology (SMART) facility to monitor the disk's health so you can replace an ailing drive before a major failure occurs.
Getting ready
Linux supports interacting with the drives SMART utilities via the smartmontools
package. This is installed by default on most distributions. If it's not present, you can install it with your package manager:
apt-get install smartmontools
Alternatively, this command can be used:
yum install smartmontools
How to do it...
The user interface to smartmontools
is the smartctl
application. This application initiates tests on the disk drive and reports the status of the SMART device.
Since the smartctl
application accesses the raw disk device, you must have root access to run it.
The -a
option reports the full status of a device:
$ smartctl -a /dev/sda
The output will be a header of basic...