SMART — dyski które umierają bez ostrzeżenia
SMART (Self-Monitoring, Analysis and Reporting Technology) — dysk sam się monitoruje.
Setup (5 minut): 1. smartctl -a /dev/sda — status dysku 2. smartd (daemon) — check co N godzin 3. /etc/smartd.conf (config): DEVICESCAN -m user@email.com -M test 4. systemctl enable --now smartd 5. Test: echo 'a@b.c' > /etc/smartd.conf; systemctl restart smartd
SMART attributes (najważniejsze): - Reallocated_Sector_Ct (realokowane sektory) — >0 = problem - Current_Pending_Sector (pending) — >0 = problem - UltraDMA_CRC_Error (błędy linku) — >0 = problem - Temperature_Celsius (temperatura) — >50°C = problem
Cron (dzienny check): 0 4 * * * smartctl -H /dev/sda >> /var/log/smart.log 2>&1
Ciekawostka: HDD = Reallocated_Sector_Ct jest kluczowy. SSD = Wear_Leveling_Count + Available_Spare. NVMe = smartctl -a /dev/nvme0 (inny output). smartmontools (pakiety: smartmontools, smartd).