Skip to content

Smart

https://www.thomas-krenn.com/en/wiki/SMART_tests_with_smartctl

apt install smartmontools

General drive information:

smartctl -i /dev/sda

Short all informations, including test results:

smartctl -a /dev/sda

Health assessment

https://www.thomas-krenn.com/en/wiki/Analyzing_a_Faulty_Hard_Disk_using_Smartctl

Show self-health-indicator:

smartctl -H /dev/sda

Show most important details:

smartctl -a /dev/sda | grep -iE '(error|uncorrect|pending|recovered|fail)' | grep -v '0$'

Smart attributes explained

See also ~/projects/monitoring/prometheus/varac-alerts/custom-alerts/custom-alerts-general.yaml

Critical:

Warning:

Informational:

Tests

https://www.thomas-krenn.com/de/wiki/SMART_Tests_mit_smartctl

Show duration of tests

smartctl -c /dev/sdc

Test in background mode

smartctl -t <short|long|conveyance> /dev/sdc

Test in foreground mode

Only useful if the drive is NOT used by any other process! Also, it blocks access to smart log, so if possible, use the background mode!

smartctl -t <short|long|conveyance> -C /dev/sdc

Show test results

smartctl -l selftest /dev/sdb

Issues with USB disks entering sleep mode

Tip: Poll test results in short intervals to prevent disk from sleeping

watch smartctl -l selftest /dev/sdb

NVME disks

apt install nvme-cli

nvme list
nvme --smart-log /dev/nvme0n1
smartctl -a /dev/nvme0

USB drives

https://www.smartmontools.org/wiki/USB

smartctl -d sat -i /dev/sda

Prometheus

prometheus-community/smartctl_exporter

Other

Vendor specific

Seagate

Install OpenSeaChest:

apt install openseachest

Usage example:

openSeaChest_Info -d /dev/sg0 -i

High Raw_Read_Error_Rate and Seek_Error_Rate

  • Both 2 new Seagate IronWolf disks ST6000VN006-2ZM186 (6TB) showed, during badblocks test high rates/Prometheus alerts of:
    • smartmon_seek_error_rate_raw_value (1M - 14M)
    • smartmon_raw_read_error_rate_raw_value (0 - 240M)
  • This Seagate RAW SMART Attributes to Error Converter can be used to calculate the real numbers
    • i.e. Raw_Read_Error_Rate of 169759400: 0 errors in 169,759,400 operations
  • Use OpenSeaChest to look for the real valuse