RAID
2024-10-24
Mount RAID1 mirror
/dev/sda1
/dev/sdb1
Assemble the RAID array:
sudo mdadm --assemble --run /dev/md0 /dev/sda1 /dev/sdb1
Mount the RAID device:
sudo mount /dev/md0 /mnt
Configure msmtp for mdmonitor.service (Ubuntu 24.04)
sudo apt install msmtp msmtp-mta
Edit /etc/msmtprc
.
# Resend account
account resend
host smtp.resend.com
from admin@hyperreal.coffee
port 2587
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user resend
password APIKEY GO HERE
syslog LOG_MAIL
Edit /etc/mdadm.conf
.
MAILADDR hyperreal@moonshadow.dev
MAILFROM admin@hyperreal.coffee
PROGRAM msmtp
ARRAY ...
ARRAY ...
Rename sendmail and symlink msmtp to sendmail.
sudo mv /usr/sbin/sendmail /usr/sbin/sendmail.bak
sudo ln -s /usr/bin/msmtp /usr/sbin/sendmail
Send a test email.
sudo mdadm --monitor --scan --test --oneshot
Restart mdmonitor.service.
sudo systemctl restart mdmonitor.service