Smart-Notifier: Be Alerted To Failing Di ...

Smart-Notifier: Be Alerted To Failing Disks [Linux Essentials]

Mar 26, 2024

I opened my laptop to a message. A dreadful message. One of those things we never wish to see, and yet are glad we did in time:


For those who wish to avoid HDD / SSD failures, smartmontools provides a way to monitor your disks in order to avoid losing data. In this case, my SSD is failing at 21,000+ hours.


WARNING: disks fail unexpectedly. Sometimes without warning. Many SSD / HDD fail much earlier than example SSD on video / screenshots. Smartmontools is simple another tool at our disposal.


Regular backups still highly recommended.


SMARTMONTOOLS / SMART-NOTIFIER / GSMARTCONTROL

Installing the package 'smartmontools' (on any Linux dist) will provide the tools needed to inspect a given SSD / HDD for errors, along with reporting the history of previous errors.

Disk errors tend to occur prior to the ultimate failure of a given harddrive / SSD (solid state drive). This is what smartmontools / smart-notifier relies upon, to (hopefully) help you avoid data loss. As with anything else, nothing is 100%. Making a backup of your most important files, still strongly recommended.


Debian based Linux:

sudo apt install smartmontools smart-notifier gsmartcontrol -y


The above command installs text based smartmontools package, a graphical smartcontrol and pop up notifier: alerting us to failing disks - hopefully in time to save our data.


Next, find your disks using lsblk

TIP: find your disk in question by matching the size (GB / TB)


EXAMPLE USAGE


START TESTING / CHECKING

You can opt for either a short, or long test. The short test option takes mine roughly 2 minutes (varies dependent on hardware). Longer test option may take hours.


REVEALING RESULTS / CHECK DISK

This disk looks good.

Note the dash mark between Always and the final RAW _VALUE numbers. This particular disk has not had any failures on SMART record. And appears to be in good health (remember: disks still can fail unexpectedly).


GRAPHICAL OPTION: GSMARTCONTROL

Errors in red can signal problems with your storage device.


This SSD has pages and pages of error records. Not looking good for this Qubes installation.


SMART-NOTIFIER

And finally, ensure to have smart-notifier to alert you to possible disk failures ahead.


How about you? Did your device have any error history? Disk failures in the past?


Back with more on Linux, and open source.

Enjoy this post?

Buy πŸ₯· (RTP) Privacy Tech Tips πŸ“‘ a coffee

More from πŸ₯· (RTP) Privacy Tech Tips πŸ“‘