Objective
Understand and utilize the basic commands of the hard disk utility, SmartCtl.
Prerequisites
Linux Server with RAID Card supported.
Steps
Step 1: Install SmartCtl
SmartCtl is listed under the package name smartmontools. To install this package, run the following command based on your OS.
For Debian/Ubuntu:
apt-get install -y smartmontools
For CentOS:
yum install -y smartmontools
Step 2: Check if Disk is SMART Capable
To check whether a disk is has the capability of being processed by SmartCtl, use the following command.
smartctl -i /dev/sdX
Check for the keyword SMART support is: on the bottom two lines.
Step 3: Check Overall Disk SMART Health
You can perform a SMART overall-health assessment on your hard disk by using the following command.
smartctl -H /dev/sda
Step 4: Scan All Disks
You can scan all the existing hard disks by using the following command.
smartctl --scan
Step 5: Print All SMART Information
To print all SMART information on disk /dev/sdX, execute the following command.
smartctl -a /dev/sdX