Created attachment 554130 [details] emerge --info After upgrade to systemd-239-r2 it was impossible to login if I waited to long or partitions are not mounted and services not running if I login fast enough. After searching a while I think I found the reason. systemd has a job mdadm-last-resort which seems to be allways called and starts to unmount all mdadm-devices and also stopping nearly all services. I found the solution in a debian-bug-report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892257 Applying the patch mentioned to /lib/systemd/system/mdadm-last-resort\@.service resolved the boot-problems. Relevant part of the Patch is: +-Conflicts=sys-devices-virtual-block-%i.device ++ConditionPathExists=!/sys/devices/virtual/block/%i/md/sync_action Appended output of emerge --info and also output of journalctl -b with LogLevel=debug from a failed boot
Created attachment 554132 [details] journalctl -b with loglevel debug
This is a bug in sys-fs/mdadm. It has been fixed in the latest version (4.1).
Thanks for the information. I added ~adm64-keyword for mdadm and mdadm-last-resort\@.service has the change and everything works as expected. Perhaps mdadm-4.1 should be stabilized ..... but perhaps I am the only one with systemd and mdadm so it is not necessary anymore
Agreed, we should stabilize 4.1 or backport the change to the current stable version.
Yes backporting would be a very good Idea. I can confirm that this change is working with current stable mdadm, it is a small change and perhaps it saves someone some time to debug this startup-problems.