Since the goal is to keep it as low-cost as possible, I've decided to use an old core2 duo motherboard & case with several old HDDs put in a raid via MDADM. I'll likely install XCFE, but it'll run 99% of the time without a desktop just in terminal mode. I'll create a SAMBA share out of the raid, and then it'll basically be left alone - - only connecting to my friend's local LAN as storage for their Windows machines.
My question is whether it's possible to have some type of automatic check of the MDADM raid to verify that the disks haven't failed? Since this won't be using a dedicated raid card with indicator lights for each disk, it'll be necessary to check them from time to time. I know how to check
sudo mdadm --detail /dev/md0
, but I'm not sure if there's a simple way to
- 1. Check the output
2. If a disk has failed or the RAID is degraded, send an email.