Storage
SMART & Disk Health
Cheat sheet · https://pcornel.dk/topic.php?topic=4320
Answer
SMART and disk health monitoring reads a drive's self-reported attributes — reallocated and pending sectors, wear, temperature, errors — with tools like smartctl to replace drives before they fail.
Remember
- A passed overall SMART status does not mean the drive is healthy.
- Rising reallocated, pending or uncorrectable counts mean replace soon.
- SSDs often fail suddenly; watch wear indicators.
First checks
smartctl --scan; smartctl -H /dev/sdX— overall healthsmartd -q onecheck— smartd config testnvme smart-log /dev/nvme0— NVMe
Commands
smartctl- Read SMART health and run self-tests on disks.
sudo smartctl -x <device>- Extended SMART/device health report.
smartctl -a /dev/<disk>- Display SMART data and health.
Verify in this order
drive → SMART → smartd → alert
Where it usually breaks
First mismatch in media/firmware → device controller → interface/link → host driver → block device → upper storage layer; preserve identity/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4320