static.apur.in

Reading SMART before the disk tells you

2026-09-21

smartctl -H answers a question nobody asked. "PASSED" means the drive's own thresholds were not crossed at the moment of the check, and several of those thresholds are set generously enough to be useless. The useful signal is the direction of a few counters over time.

Spinning disks

Four attributes are worth watching; the rest is mostly noise and vendor-specific re-interpretation of the same physical event.

Temperature matters less as an absolute and more as a change: a disk that used to idle at 34 °C and now idles at 44 °C has either lost airflow or is working harder than it was.

NVMe

NVMe does not use the old attribute table, and the things people carry over from spinning disks do not exist. The four that matter:

smartctl -a /dev/nvme0 | grep -Ei "Percentage Used|Available Spare|Data Units|Media and Data"

Scheduling the checks

# /etc/smartd.conf — short test daily at 02:00, long test first Saturday 03:00
/dev/sda -a -o on -S on -s (S/../.././02|L/../../6/03) -m root -M exec /usr/local/sbin/smart-alarm
/dev/nvme0 -a -s (L/../../6/03) -m root

Two things to get right in that line:

Two ways this goes wrong

USB and hardware RAID hide the data. A drive behind a bridge or a controller often reports nothing, or reports the bridge. Check with smartctl -d sat -a /dev/sdb for USB, and with the vendor's -d megaraid,N / -d cciss,N forms for controllers. A monitoring setup that gets "unable to get device identity" for three of six disks is monitoring three disks.

Self-tests pass while the kernel is already complaining. SMART asks the drive to self-report; the kernel sees failed I/O regardless of what the drive thinks. Read both:

journalctl -k --since "14 days ago" | grep -Ei "i/o error|medium error|ata[0-9]+\.[0-9]+|nvme[0-9]+: I/O"

← manuals