Quote Originally Posted by incindre View Post
Hiya BVZ,

Great post, I was completely lost without it!
I ran into some difficulties during the setup of the RAID Array. I'm trying to create RAID10 and simply substituted 'level 5' for 'level 10' during the setup. It wouldn't mount to any mount point I created. I installed Webmin, deleted the array and rebuilt (using webmin) and I'm all sweet now (or so I hope).
I'm now setting up the systems to monitor the health of the server and was wondering what the point of your 'Hourly' 'Daily' 'Weekly' scripts are, and if they are of any great importance. I've followed your instructions to the letter (and triple checked that my email address is spelled correctly) but when I test any of the scripts in the ~/ directory it sends no email and states "line 3: mail: command not found" (MDADM reporting to the same Gmail address is working fine however).

I'm a Ubuntu novice using Server 12.04, could someone shed some light on this?
Hey incindre,

Sorry for the delay in getting back to you. I really only have time on the weekends now to look into this stuff (work and volunteering is getting out of hand).

I'm glad you managed to get your raid set up. I haven't tried Webmin, but it sounds pretty cool.

The hourly etc. scripts are not super important. They are simply scripts that get launched once an hour, day, or week (depending on the script) that launch other scripts. The idea was as follows:

create four directories (continuous, hourly, daily, weekly).

create four scripts (continuous, hourly, daily, weekly).

These four scripts would be called by cron on an continuous, hourly, daily, weekly basis (respectively). Each of these scripts does just one thing, it looks into its associated directory and runs any scripts it may find in that directory. If there are no scripts in the directory, it does nothing and then goes back into hibernation till the next time it is called.

All the actual work is done by the scripts that you drop into each of these directories. The idea was that makes it easier to just write a script (should you need a script to do something on a repetitive basis) and drop it into the directory to activate it (or move it out of the directory to deactivate it).



Could you post your script here? I'll try to carve out a little time to look at it. Make sure you remove or obscure any personal information (like your email and/or password).

Could you also post the results of the following command? Type: "which mail" at the command prompt and then copy the results and include them in your post.

Finally, could you also post the results of the following command? Type "dpkg --get-selections | grep msmtp" at the command prompt and then copy the results and include them in your post.

Based on the error you are reporting, though, it sounds like you don't have msmtp set up properly (or installed at all). But you indicated that mdadm is properly sending emails so I am a little lost.



I'll try to look at it as quickly as possible. I know how frustrating it can be to have the system not behave but not know where to turn to even get started debugging it.