hyperreal.coffee

Mounting RAID1 mirror

Assemble the RAID array.

1sudo mdadm --assemble --run /dev/md0 /dev/sda1 /dev/sdb1

Mount the RAID device.

1sudo mount /dev/md0 /mnt

Configure msmtp for mdmonitor.service (Ubuntu 24.04)

1sudo apt install msmtp msmtp-mta

Edit /etc/msmtprc.

 1# Resend account
 2account resend
 3host smtp.resend.com
 4from admin@hyperreal.coffee
 5port 2587
 6tls on
 7tls_starttls on
 8tls_trust_file /etc/ssl/certs/ca-certificates.crt
 9auth on
10user resend
11password APIKEY GO HERE
12syslog LOG_MAIL

Edit /etc/mdadm.conf.

1MAILADDR hyperreal@moonshadow.dev
2MAILFROM admin@hyperreal.coffee
3PROGRAM msmtp
4
5ARRAY ...
6ARRAY ...

Rename sendmail and symlink msmtp to sendmail.

1sudo mv /usr/sbin/sendmail /usr/sbin/sendmail.bak
2sudo ln -s /usr/bin/msmtp /usr/sbin/sendmail

Send a test email.

1sudo mdadm --monitor --scan --test --oneshot

Restart mdmonitor.service.

Reply to this post by email ↪