Monday 27 May 2013

How SMART your hard disk is?

SMART stands for Self Monitoring Analysis and Reporting Technology and the command smartctl makes use of BIOS SMART error detection.

To use smartctl you need to download smartmontools from the Sourceforge and install manually.

Download the latest source tarball

# wget http://sourceforge.net/projects/smartmontools/files/smartmontools/6.1/smartmontools-6.1.tar.gz/download (If you don't have wget/curl install it)

Uncompress the tarball

# tar xvzf smartmontools-6.1.tar.gz

This step creates a directory called smartmontools-6.1 containing the code. Go to that directory, build, and install

# cd smartmontools-6.1
#  ./configure
#  make
#  make install

you can install using yum too

#yum install smartmontools*

There are many options available with smartctl, I'm writing only few of them. for more info type smartctl -h.

1. To see SMART feature has enabled

# smartctl -i /dev/sda

2. To check the health of the harddisk

# smartctl -H /dev/sda

3. To perform  offline/short/long tests

# smartctl -t <offline/short/long> /dev/sda

Nagios plugin check_ide_smart is based on smartctl while the Windows version, smartfpa.vbs is based on WMI (Windows Management Instrumentation), which is basically a visual basic script checks if any SCSI and IDE disks are reporting SMART/PFA errors.

Note: To run smartctl you require root permission or the member of sudoers. 

No comments:

Post a Comment