As a longtime mdadm user is was just experiencing a disk error and remembered that I configured a Auto Mail reporting for mdadm on disk errors.
Therefore i just had to insert my Mail address inside /etc/mdadm/mdadm.conf
MAILADDR someone@exaplme.org
But I really missed that one out on FreeBSD. And as my ZFS RAID6 is now running over half a year i thought of what would happen if a disk would experience a failure?
I never configured any external mail address. Is there an easy way to accomplish and test this?
Like on mdadm:
sudo mdadm –monitor –scan –test
And how would i do it on Linux with ZoL (ZFS on Linux)?
EDIT: Sorry i meant AUTOMATED Reporting. not scheduled.
I know i could have build a script and parse zpool status -X every minute. but I think this is not a very elegant approach of accomplishing the reporting problem. It would be better to be notified instantly on a disk failure (like mdadm)
EDIT[2]: Thank you for your advices, but no im stuck with some scripting issues, fould someone help me with my for loop problem in /bin/sh here -> PASTEBIN
EDIT[3]: Got my for loop problem. :) (update in PASTEBIN)
Any more advices for my script?