FS#48331 - [mdadm] mdmonitor.service not started when using mdadm_udev initcpio hook on RAID-1 root
Attached to Project:
Arch Linux
Opened by Jonathan Liu (net147) - Thursday, 25 February 2016, 04:19 GMT
Last edited by Toolybird (Toolybird) - Sunday, 11 June 2023, 04:18 GMT
Opened by Jonathan Liu (net147) - Thursday, 25 February 2016, 04:19 GMT
Last edited by Toolybird (Toolybird) - Sunday, 11 June 2023, 04:18 GMT
|
Details
Description:
Normally the udev rules in the mdadm package are supposed to trigger the start of mdmonitor.service but this doesn't seem to work when a RAID-1 root is assembled in the initcpio. Probably because there isn't a systemd environment, mdmonitor.service and related dependencies in the initcpio... Perhaps we should add an Install section to mdmonitor.service so that it can be explicitly enabled and started on boot in this case? Additional info: * mdadm 3.3.4-1 Steps to reproduce: 1. Install Arch Linux on mdadm RAID-1 and configure mdadm.conf for mail notifications as described in https://wiki.archlinux.org/index.php/RAID#Installing_Arch_Linux_on_RAID 2. Reboot 3. systemctl status mdmonitor.service |
This task depends upon
Closed by Toolybird (Toolybird)
Sunday, 11 June 2023, 04:18 GMT
Reason for closing: Not a bug
Additional comments about closing: Config error. See comments.
Sunday, 11 June 2023, 04:18 GMT
Reason for closing: Not a bug
Additional comments about closing: Config error. See comments.
[Install]
WantedBy=multi-user.target
Then the mdmonitor.service can be explicitly enabled:
systemctl enable mdmonitor.service
systemctl start mdmonitor.service
It would be bad if a RAID array failed without getting a notification because of this bug...
What makes this even worse is that if you try to enable mdmonitor.service as is, then systemctl will silently fail to create the symlink instead of giving an error about not being able to enable the service, which gives the user a false sense of security. The lack of error message is, of course, a systemd problem, but it's still worth noting.
The only thing that appeared to changed is systemctl reaction, which as of June 2018 provides very explicit warning about not being able to enable mdmonitor.service. Right now I'm using Jonathan's workaround to start the monitoring service, but I hope for more “default” solution.
[1] https://wiki.archlinux.org/title/RAID#Email_notifications