How is 'mdadm' stopped from doing an auto scan at startup?
Debian 10 VM has no software based RAID config, neither is there any intention of creating a software based (mdadm) RAID array.
mdadm is installed purely as a dependency for cockpit-storaged
mdadm service is disabled.
mdadm-waitidle service is disabled.
With 'dpkg-reconfigure mdadm' the 'MD monitoring deamon' is disabled.
Yet on restarts, the message "mdadm: no arrays found in config file or automatically" considerably delays the boot process.
Deleting the mdadm config file /etc/mdadm/mdadm.conf has no effect.
Specifying 'DEVICE = /dev/xvda1' and/or 'ARRAY = ' followed by 'update-initramfs -u' has no effect.
Uninstalling mdadm solves the issue, yet breaks cockpit's storage services.
As such, how does one stop mdadm doing an automatic scan at startup ?
Solution 1:
MD array auto assembly is done via udev rules, so it happens on boot as well as when devices are hot-added to the system. Frustratingly, they never make this explicitly clear in the manpages, but you should be able to edit /etc/mdadm.conf
so that it's exactly this:
AUTO -all
That should stop your scanning woes. If this scan turns out to be happening as part of the initial root mount, from initramfs, then you may have to update your initramfs as you mentioned in your question.