💾 Archived View for chirale.org › 2018-07-30_1238.gmi captured on 2024-08-18 at 17:31:45. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-05-12)

-=-=-=-=-=-=-

Use external mail server for mdadm

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

Configure mdadm with the new SMTP

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.

Send test message with mdadm

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!

alertrecipient@example.com

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: ...

See also

Problem solved? Give a tip to keep this blog up and running.

https://web.archive.org/web/20180730000000*/http://chirale.org/2018/07/25/use-external-smtp-server-for-system-mails-on-linux/

https://web.archive.org/web/20180730000000*/https://dustymabe.com/2012/01/29/monitor-raid-arrays-and-get-e-mail-alerts-using-mdadm/

<li><a href=

https://web.archive.org/web/20180730000000*/https://www.howtoforge.com/how-to-configure-software-raid-to-send-an-email-when-something-is-wrong-with-raid

<li><a href=

https://web.archive.org/web/20180730000000*/https://wiki.hetzner.de/index.php/Softwareraid/en

</ul> <div class=

https://web.archive.org/web/20180730000000*/https://subscribe.wordpress.com/memberships/?blog=1488255&amp;plan=6754&amp;lang=en&amp;pid=1238&amp;redirect=https%3A%2F%2Fchirale.wordpress.com%2Ffeed