SMART (Self-Monitoring, Analysis and Reporting Technology) is built into hard drives and SSDs and records signs of wear and failure. Checking it regularly on a dedicated server lets you replace a dying disk before it takes data with it. This guide uses smartctl to check disk health on SATA and NVMe drives.
Before you start
- Root access to a dedicated or bare-metal server. On a VPS, virtual disks usually do not expose SMART data – the host monitors the physical drives.
- Drives behind a hardware RAID controller may need extra options (for example
-d megaraid,0).
Install smartmontools
- Ubuntu/Debian:
sudo apt install -y smartmontools - AlmaLinux/Rocky:
sudo dnf install -y smartmontools
List drives and check overall health
- Find the drives:
sudo smartctl --scanorlsblk -d. - Quick health verdict:
sudo smartctl -H /dev/sdaYou want
PASSED(SATA) orOK(NVMe). A pass does not guarantee health – read the details too. - Full report:
sudo smartctl -a /dev/nvme0
SATA attributes that matter
| ID | Attribute | Warning sign |
|---|---|---|
| 5 | Reallocated_Sector_Ct | Any non-zero raw value that keeps rising |
| 187 | Reported_Uncorrect | Non-zero |
| 197 | Current_Pending_Sector | Non-zero – sectors waiting to be remapped |
| 198 | Offline_Uncorrectable | Non-zero |
| 199 | UDMA_CRC_Error_Count | Rising – often a cable or backplane issue, not the disk |
| 177/231/233 | Wear leveling / SSD life (vendor-specific) | Approaching end of rated life |
NVMe health fields
- Critical Warning – should be
0x00. - Percentage Used – estimated wear; 100% means rated endurance reached.
- Available Spare – should stay above the threshold.
- Media and Data Integrity Errors – should be 0.
- Temperature – sustained high temperatures shorten life and cause throttling.
Run self-tests
- Short test (a few minutes):
sudo smartctl -t short /dev/sda - Long test (hours on large HDDs):
sudo smartctl -t long /dev/sda - Read results when done:
sudo smartctl -l selftest /dev/sda
Self-tests run in the background while the server keeps working, though long tests add some I/O load.
Enable automatic monitoring with smartd
- Edit
/etc/smartd.conf(or/etc/smartmontools/smartd.conf) and replace theDEVICESCANline with:DEVICESCAN -a -o on -S on -s (S/../.././02|L/../../6/03) -m admin@example.comThis monitors all disks, runs a short test daily at 02:00, a long test on Saturdays at 03:00, and emails on problems.
- Make sure the server can send mail, then enable the service:
sudo systemctl enable --now smartd(namedsmartmontoolson some Debian versions).
What to do when a disk is failing
- Confirm your latest backup is good.
- Check RAID state with
cat /proc/mdstator the controller tool. - Note the drive's serial number from
smartctl -iso the right disk is replaced. - Open a ticket with your provider to replace it, then rebuild the array.
FAQ: SMART disk health
Can SMART predict every failure?
No. Many failures show warning signs first, but some drives fail suddenly. RAID and backups are still essential.
Why does smartctl show nothing on my VPS?
Virtual disks don't pass through SMART. Your provider monitors the physical hardware.
Is a rising CRC error count a bad disk?
Usually it points to a cable, connector or backplane issue rather than the disk itself.
