Knowledge base / Linux & server administration
Knowledge base / Linux & server administration
Most disks warn before they fail. smartctl (package smartmontools) reads those warnings.
smartctl -H /dev/sda smartctl -a /dev/sda # SATA/SAS: full report smartctl -a /dev/nvme0n1 # NVMe
Reallocated_Sector_Ct, Current_Pending_Sector and Offline_Uncorrectable should be 0. Any value that keeps growing means the disk is failing.Percentage Used (wear), Media and Data Integrity Errors and Critical Warning.Disks are hidden behind the controller. Use the device type, for example smartctl -a -d megaraid,0 /dev/sda for LSI/Broadcom, or the vendor tool (storcli, ssacli, iDRAC/iLO).
smartctl -t long /dev/sda # results later in smartctl -a
Enable smartd so you get an email when a disk starts failing, or add SMART checks to your monitoring. On a managed plan, we monitor this for you and arrange the replacement.