Skip to content

smartmontools🔗

Get information about device🔗

Scan for devices:

sudo smartctl --scan

In order to check if the device supports SMART and if SMART is enabled, use option --info or -i:

sudo smartctl --info /dev/sda

If the device is not in the smartctl database, update the database with:

sudo /usr/sbin/update-smart-drivedb

Enable SMART🔗

sudo smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda

Get the capabilities of the device🔗

Get the capabilities of the device with option --capabilities or -c:

sudo smartctl --capabilities /dev/sda

Get the health status of the device with option --health or -H:

sudo smartctl --health /dev/sda

Dump all information about the device🔗

To get all SMART information about the device with option --all or -a:

sudo smartctl --all /dev/sda

Get all the information above and all non-SMART information about the device with option --xall or -x:

sudo smartctl --xall /dev/sda

Print device error log with option --log=error or -l error:

sudo smartctl --log=error /dev/sda

Performing self tests🔗

Start self test with option --test or -t:

sudo smartctl --test=long /dev/sda

Get results of test:

sudo smartctl --log=selftest /dev/sda

Access disks in RAID system🔗

MegaRAID🔗

Get list of disk in RAID:

sudo /opt/MegaRAID/storcli/storcli64 /c0 /eall /sall show

Use the DID as disk number in the smartctl command:

sudo smartctl --info --device=megaraid,40 /dev/sda