Diagnostica di un Hard Disk con smartctl
Se si ricevono degli errori da smartd, si può indagare se effettivamente ci sono problemi.
Visulizzazione del log degli errori
Se un hdd non ha problemi, il log sarà certamente vuoto:
sudo smartctl -l error /dev/sda
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF READ SMART DATA SECTION === SMART Error Log Version: 1 No Errors Logged
Questo invece mostra un errore di "Unrecovarable Sector"
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF READ SMART DATA SECTION === SMART Error Log Version: 1 ATA Error Count: 6 (device log contains only the most recent five errors) ... Error 6 occurred at disk power-on lifetime: 10662 hours (444 days + 6 hours) When the command that caused the error occurred, the device was active or idle . After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 ba 32 dd 37 e0 Error: UNC 186 sectors at LBA = 0x0037dd32 = 3661106 ...
Esecuzione dei Test
Test Veloce
Verifica danni evidenti all'elettronica e meccanica.
sudo smartctl -t short /dev/sdb
- Monitorarne l'esecuzione
watch sudo smartctl -l selftest /dev/sdb
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF READ SMART DATA SECTION === SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA _of_first_error # 1 Short offline Completed without error 00% 10936 -
Test lungo
sudo smartctl -t long /dev/sdb