Monitoring S.M.A.R.T. on Linux
This guide shows how to install smartmontools on a Linux server (Debian, Ubuntu, AlmaLinux, Rocky Linux), read the S.M.A.R.T. health status of your drives with smartctl, and set up email alerts with smartd.
Install smartmontools
Install the package using your distribution's standard package manager:
Read S.M.A.R.T. Data
First, identify your drives using lsblk. Then, perform the check (replace /dev/sda with your actual drive):
Overall Assessment
Look for: SMART overall-health self-assessment test result: PASSED.
If the line shows FAILED, the drive's internal logic has already detected a critical defect.
Critical Attributes
- Reallocated_Sector_Ct: A value above 0 means the drive is already using spare sectors.
- Current_Pending_Sector: Unstable sectors waiting to be remapped.
- Offline_Uncorrectable: Sectors that could not be read or corrected during offline tests.
Email Notifications
Configure the smartd daemon to monitor your drives in the background. The configuration file is /etc/smartd.conf on Debian/Ubuntu and /etc/smartmontools/smartd.conf on AlmaLinux/Rocky Linux:
Add a line for each drive with your email address:
Enable and start the service:
Defective Drive Detected?
If smartctl reports errors, we will arrange a free replacement immediately.
Ticket in PowerPanel