brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: smartctl -A shows the smart attributes that predict a failing disk

Smart
~/tips/tip-smart-smartctl-a-key-attributes

sudo smartctl -A /dev/sda | grep -E '^ *(5|197|198|199) '

Filters the smart attributes down to reallocated, pending, uncorrectable and CRC error counts.

Of the dozens of attributes a drive reports, four are worth reading on every check.

sudo smartctl -A /dev/sda | grep -E '^ *(5|197|198|199) '

ID 5 is the reallocated sector count, 197 the sectors waiting to be reallocated, 198 the sectors that could not be read offline, and 199 the UDMA CRC errors. Rising values for 5, 197 or 198 point to the surface of the disk. A rising 199 usually points to the SATA cable or the connector, so swap the cable before you replace the drive. Look at the raw value, because the normalised value can look fine for a long time.

Further reading: smartctl manual page

More Smart tips sudo nvme smart-log /dev/nvme0 sudo smartctl -q silent -a /dev/sda sudo smartctl -l devstat /dev/sda sudo smartctl -l scttemphist /dev/sda sudo smartctl -t select,1000000-2000000 /dev/sda All Smart tips (19) All topics

Link