NVMe drives
$ apt install nvme-cli smartmontools
$ nvme smart-log /dev/nvme0- critical_warning should be 0.
- percentage_used is the wear indicator; datacenter drives are rated for heavy writes, but watch the trend.
- media_errors should stay at 0.
- available_spare should stay above its threshold.
Hard drives
$ smartctl -a /dev/sdaWatch four attributes: Reallocated_Sector_Ct, Current_Pending_Sector, Offline_Uncorrectable (all ideally 0) and UDMA_CRC_Error_Count (a rising value points to a cable or backplane).
Run a self-test
$ smartctl -t long /dev/sda # hours on large drives
$ smartctl -l selftest /dev/sda # read the result laterWhen to open a ticket
Any failed self-test, a non-zero critical warning, growing reallocated or pending sectors, or a drive dropping out of an array. Include the smartctl or nvme smart-log output: it lets us swap the drive within 2 hours without further diagnosis.
