With mdadm one is advised to no longer rely on kernel level autodetection of raid arrays, but to use mdadm --assemble instead. To accomplish this task, sys-fs/mdadm installs /etc/init.d/mdraid. This script needs some adjustment, if you want to be able to properly use a raid array on bootup that has been encrypted using dmcrypt. In fact, it is vital that mdraid is being started before dmcrypt. Find attached a patch to /usr/portage/sys-fs/mdadm/mdraid.rc that does just that and works for me. Regards, Torsten
Created attachment 216967 [details, diff] Patch for sys-fs/mdadm/files/mdraid.rc
some people do raid-on-dmcrypt while others do dmcrypt-on-raid. there is no way to satisfy everyone. if you need dmcrypt before raid, then set the dependency in your own conf.d file. use rc_need as documented in `man 8 runscript`.
(In reply to comment #2) > use rc_need as documented in `man 8 runscript`. I wasn't aware of that option, or at least I got the wrong idea on how to use it. Works like a charme now, thank you!
ive added a tip to the conf.d file about rc_need