💾 Archived View for chirale.org › 2018-07-30_1238.gmi captured on 2024-05-12 at 15:09:13. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
mdadm is the utility to check and report failures on RAID disks. The usual way this Linux application send its message is a plain old e-mail. In this howto you’ll find the instruction to use an external mail server with mdadm.
First, replace sendmail with an external email account. After you’ve configured and tested msmtp you’re ready to configure mdadm.
replace sendmail with an external email account
Change /etc/mdadm/mdadm.conf to
# instruct the monitoring daemon where to send mail alerts # MAILADDR root MAILADDR alertrecipient@example.com MAILFROM senderaddress@example.com
Where:
Actually, using /etc/aliases and assigning root to the right recipient should allow you to avoid this step but you’ve to test yourself.
Type this command to emulate a disk failure message from mdadm:
sudo mdadm --monitor --scan --test -1
If you receive the message in the alertrecipient@example.com this job is finally done!
This is an automatically generated mail message from mdadm running on YOURSERVERHOSTNAME A TestMessage event had been detected on md device /dev/md/Faithfully yours, etc. P.S. The /proc/mdstat file currently contains the following: Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] md0 : active raid... md1 : active raid... unused devices: ...
Problem solved? Give a tip to keep this blog up and running.
https://web.archive.org/web/20180730000000*/https://wiki.hetzner.de/index.php/Softwareraid/en