This article covers the different ways to check the health of your Hard Disk Drives and Solid-State Drives. In fact, SMART (Self-Monitoring, Analysis, and Reporting Technology) is a feature enabled in all modern hard disk drives and SSDs to monitor/test reliability. It checks different drive attributes to detect the possibility of drive failure.
What is the need to check Linux system SSD and HDD drives ?
If you are a system administrator and responsible for managing Linux systems in Datacenter. Then, it is recommended to check the health of the SSD and HDD drives regularly. It will help you to identify failed drives and they can be replaced before any data loss occurs. S.M.A.R.T is a tool used to monitor the health status of SSD and HDD. It also allows you to perform on-demand tests on the drive.
How to Test SSD Health using Smartctl ?
Smartctl is a command-line utility tool that can be used to check S.M.A.R.T-enabled HDD or SSD status in the Linux system.
Smartctl utility tool comes with the package smartmontools. Smartmontools is available by default in all Linux distributions including Ubuntu, RHEL and Centos and Fedora.
To install smartmontools in Linux, run the below command:
$ sudo apt install smartmontools
To Start Smartmontools service, execute the below command:
$ sudo /etc/init.d/smartmontools start
Smartd service will start automatically after the successful installation.
If not started, start smartd service:
$ sudo systemctl start smartd