Ops & troubleshooting / 2026-06-21
Hard Drive Died Three Months Early: Which SMART Numbers to Watch
Not all SMART attributes matter. Five metrics plus their trends tell you far more than a "health status: OK" line ever will.
smartctl -H tells you "PASSED", and two weeks later the drive drops off. That's not the tool's fault — you only looked at the verdict, not the trend.
The five attributes that actually matter
| ID | Name | Meaning | Warning sign |
|---|---|---|---|
| 5 | Reallocated_Sector_Ct | Reallocated sectors | Any non-zero value that keeps growing |
| 187 | Reported_Uncorrect | Uncorrectable errors | Non-zero |
| 197 | Current_Pending_Sector | Sectors pending remap | Non-zero |
| 198 | Offline_Uncorrectable | Offline uncorrectable | Non-zero |
| 199 | UDMA_CRC_Error_Count | Transport-layer checksum errors | Growth usually means a cable or backplane problem |
The first four are the drive itself; the fifth usually isn't the drive's fault — a loose SATA cable or a poor backplane contact will push 199 up. Swap the cable first, then look at the drive — that can save you the price of a disk.
Trends matter more than instantaneous values
# Save a baseline, then compare weekly
smartctl -A /dev/sda > /var/lib/smart/$(date +%F).txt
If attribute 5 goes from 0 to 8 and then to 24, it's time to prepare for that drive. "Currently 24" means nothing on its own; "up 24 in three months" does.
Temperature counts too: for mechanical drives sitting above 50°C long-term, the lifetime curve gets noticeably steeper. Case airflow matters more than noise.
Two extra for SSDs
- Percentage Used (NVMe): the vendor's lifetime estimate, more intuitive than TBW
- Wear_Leveling_Count (SATA): if the average drops fast, write amplification is severe
Consumer SSDs running containers on PVE usually have their write volume underestimated. Convert Data Units Written from smartctl -a into actual TBW consumption — more reliable than looking at the rated figure.
Turning it into monitoring
The simplest approach is cron plus a script that notifies you on anomalies:
#!/usr/bin/env bash
for d in /dev/sd? /dev/nvme?n1; do
smartctl -H "$d" | grep -q PASSED || echo "ALERT $d" | mail -s "disk" [email protected]
done
Checking only PASSED will miss drives that are "degrading but not yet failed". To really catch them early, you still have to watch how those five numbers change.
Five metrics worth watching
| Metric | Threshold reference | Meaning |
|---|---|---|
Reallocated_Sector_Ct | >0 and steadily growing | Bad sectors already present |
Current_Pending_Sector | >0 | Some sectors can't be read and are waiting to be remapped |
Offline_Uncorrectable | >0 | Confirmed unrepairable |
Wear_Leveling_Count | SSD life percentage | Remaining life |
Temperature_Celsius | Mechanical drives >50°C | Cooling problem |
If any of the first three is non-zero, schedule a replacement rather than "let's watch it a bit longer". When Current_Pending_Sector goes from 0 to 1 to 2, the drive often drops off within a few weeks.
A usable inspection script
for d in /dev/sd[a-z]; do
echo "== $d =="
smartctl -A -H "$d" | grep -E "Reallocated|Pending|Uncorrectable|Temperature|Power_On_Hours"
done
-H prints the overall health verdict (PASSED/FAILED), -A prints the attribute table. Looking only at -H will miss drives that "still PASSED but are already degrading".
Writing it as automation
#!/bin/bash
bad=$(smartctl -A /dev/sda | awk '/Current_Pending_Sector|Offline_Uncorrectable/{if($10+0>0) print $2":"$10}')
[ -n "$bad" ] && echo "SMART WARN $(hostname): $bad" | mail -s "disk warning" [email protected]
The key is to report only non-zero values: a daily "all good" email gets filtered out after three days, and then you can't see the real failure.
A common misjudgment
USB external enclosures often can't read SMART (you need smartctl -d sat). Not being able to read it doesn't mean there's no problem, and it doesn't mean the drive is bad — the protocol bridge simply doesn't forward it. In that case you can only judge by I/O errors in dmesg and a drop in read/write throughput.
One more: for a mechanical drive with over 30,000 power-on hours and long-term temperatures above 50°C, replace it even if SMART is all green — its failures tend to be sudden, not gradual.