"mdadm --incremental" will save state in a map file under /var/run/mdadm/map.
But in initramfs and early boot this directory does not exist.
The state is then saved in /var/run/mdadm.map.new (man page incorrectly says /var/run/mdadm.map) and not picked up later on, and hotplug devices showing up later can not be matched correctly.
This can be fixed by creating /var/run/mdadm in the initramfs *before* the udevd is started by init-premount/udev (either during creation of the initramfs image, or dynamicly (boot time consuming) in mdadm's initramfs-tools init-top/mdadm script).
The initramfs' /var/run is later copied to the real /var/run as part of the implemented boot process and /var/run/mdadm/map is carries on the a valid --incremental state.
Binary package hint: mdadm
"mdadm --incremental" will save state in a map file under /var/run/mdadm/map.
But in initramfs and early boot this directory does not exist.
The state is then saved in /var/run/ mdadm.map. new (man page incorrectly says /var/run/mdadm.map) and not picked up later on, and hotplug devices showing up later can not be matched correctly.
This can be fixed by creating /var/run/mdadm in the initramfs *before* the udevd is started by init-premount/udev (either during creation of the initramfs image, or dynamicly (boot time consuming) in mdadm's initramfs-tools init-top/mdadm script).
The initramfs' /var/run is later copied to the real /var/run as part of the implemented boot process and /var/run/mdadm/map is carries on the a valid --incremental state.