You are not logged in.
Pages: 1
Hi everyone,
I've been here in the past, I hope you'll be able to help as my many searches on the Internet didn't get me the right answer.
I have a RAID5 array built with mdadm.
I've configured mailx and msmtp to be able to receive message (from smartmontools and mdadm).
When I try the command I put in rc.local it works.
mdadm --monitor --scan --daemonise --delay 120 --test
This works when I use it with sudo.
And when I do:
sudo /etc/rc.local
It works too.
Here are the permissions on the file:
-rwxr-xr-x 1 root root 138 Aug 19 19:27 /etc/rc.local
But when I boot the machine, nothing is sent (I used the --test command, so it HAS to send a test email when run)
Kind regards,
Naunaud.
Offline
Perhaps it requires an application of raid params using mkinitcpio as outlined in the wiki to enable mdadm during boot sequence.
I am not sure of your apps however so I could be way off in no man's land!!
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
Well, the RAID5 is only for storage, the system is on another disk outside the RAID, so I'm not sure what you're talking about. I've read the wiki:
http://wiki.archlinux.org/index.php/Con … Using_raid
Is that what you're referring to ?
And as rc.local is the last script run on the machin before any login, I was hoping it would work.
Kind regards,
Naunaud.
Offline
Mmm, now that I'm thinking about it, could it be that the mailing functions are not available by the time of the rc.local run ?
Kind regards,
Naunaud.
Offline
rc.local is run last, so network etc should all be up an running (unless you're using something like NetworkManager in your DE to manage the network of course).
Any reason you're doing this in rc.local instead of using the daemon designed for this? (/etc/rc.d/mdadm)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
rc.local is run last, so network etc should all be up an running (unless you're using something like NetworkManager in your DE to manage the network of course).
Any reason you're doing this in rc.local instead of using the daemon designed for this? (/etc/rc.d/mdadm)
Well, if I launch the daemon with rc.conf, it doesn't seem to monitor anything...
When I set a drive faulty, there's no email report.
Is there another tool to monitor a RAID created with mdadm ?
Offline
Have you setup /etc/mdadm.conf? The daemon works for me after I configure that:
MAILADDR my_email_address@gmail.com
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=0.90 UUID=46649049:2fe1a3ab:d28dda9b:ac5154d8
ARRAY /dev/md1 level=raid1 num-devices=2 metadata=0.90 UUID=817f74b4:7a3fddc2:9c15dca4:e5d40b5e
ARRAY /dev/md2 level=raid1 num-devices=2 metadata=0.90 UUID=e2f167e5:8097e2b8:38f93247:422d0e7b
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Have you setup /etc/mdadm.conf? The daemon works for me after I configure that:
MAILADDR my_email_address@gmail.com ARRAY /dev/md0 level=raid1 num-devices=2 metadata=0.90 UUID=46649049:2fe1a3ab:d28dda9b:ac5154d8 ARRAY /dev/md1 level=raid1 num-devices=2 metadata=0.90 UUID=817f74b4:7a3fddc2:9c15dca4:e5d40b5e ARRAY /dev/md2 level=raid1 num-devices=2 metadata=0.90 UUID=e2f167e5:8097e2b8:38f93247:422d0e7b
Has it ever send you a mail in case of failure ?
(and yes my mdadm is configured like that)
I'll just put the daemon in rc.conf then and wait for a real failure!
Kind regards,
Naunaud.
Offline
Yes, I used to get email regularly when I had faulty RAM locking the computer, which would cause mdadm to rebuild after a hot-reset
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Yes, I used to get email regularly when I had faulty RAM locking the computer, which would cause mdadm to rebuild after a hot-reset
Ok, thanks for you answer !
Archlinux <3
Offline
Pages: 1