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: smartd runs smart self-tests on a schedule and mails you the warnings

Smart
~/tips/tip-smart-smartd-conf-schedule

DEVICESCAN -a -m root -s (S/../.././02|L/../../6/03)

Lets the smartd daemon test drives on a schedule and mail you the warnings.

Checking by hand works until I forget. The smartd daemon from smartmontools does it on a schedule.

# /etc/smartd.conf
DEVICESCAN -a -m root -s (S/../.././02|L/../../6/03)

sudo systemctl restart smartmontools

-a monitors all the attributes and logs, -m root sends the warnings by mail, and -s sets a short test every day at 02:00 and a long test on Saturday at 03:00. Mail only arrives if the machine can send mail, so test it with -M test on the line. On Debian and Ubuntu the service is called smartmontools, and some other distributions call it smartd.

Further reading: smartd.conf manual page

Going deeper: Keep a domain pointed at your home with Cloudflare DDNS on Unraid

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