Search Our Database

Monitor HDD Health on CentOS

Last updated on |

HDD health is very important for a server as failure could happen at any time, causing loss of precious data.


Step 1: Download SmartMonTools by typing:

yum install smartmontools


Step 2: Find out the names of your hard disks by using one of the following commands:

df -h
fdisk -l

Assume the names of the hard disks are /dev/sda & /dev/sdb. (Use for <HDD name> in later steps)


Step 3: Check if the HDD is SMART-capable, as only SMART-capable HDD is able to be monitored for possible hardware failures. We can use SmartMonTools’ function, smartctl to check HDD information using the following command:

smartctl -i <HDD name>

On the info block, look for “SMART support if: “Available”.


Step 4: Assume the HDD in use are SMART-capable, type in the following command to monitor disk health of the specified HDD:

smartctl -H <HDD name>

Your HDD is in good working condition if it outputs “SMART overall health self-assessment test result: PASSED”

If the output is “SMART overall health self-assessment test result: FAILED”, please proceed to replace the HDD as soon as possible.

Note: To see all smartctl options, type:

smartctl -h <HDD name>