Daily Shaarli
March 31, 2021
Check SMART available and enabled:
# smartctl --health --info /dev/sda
...
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Test duration:
# smartctl --capabilities /dev/sda
...
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 313) minutes.
Short test:
# smartctl --test short /dev/sda
*sleep 2 minutes*
# smartctl --log selftest /dev/sda
Exemple results:
=== 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% 3224 -
Long test:
# smartctl --test long /dev/sda
*sleep 313 minutes*
# smartctl --log selftest /dev/sda
Pour Windows:
CHKDSK F: /f /r
/f fixes any structural issues with the file system and directory, correcting inconsistencies between the two
/r searches for and fixes corrupted parts of the hard drive (while also running chkdsk /f). Sometimes it can’t fix the unusable or damaged sectors that it finds.
FSCK
fsck -fvn /dev/sdX # dry run
fsck -fvy /dev/sdX # apply