Hi Devuaners
On a server I use several Linux Software RAIDs that consist of other Software
RAIDs. I happen to have too many too old disks, so I do RAID1 over RAID6 and
other such jokes.
Mostly the RAIDs fail to get assembled after a reboot and I recently figured
out why: The standard SysV RAID shutdown script /etc/init.d/mdadm-waitidle
fails to cleanly stop nested RAIDs, because it can't resolve their
dependencies and doesn't stop them in the right order. I wrote a script that
runs just before mdadm-waitidle to stop all nested RAIDs. This fixed the
problem for me.
I just wanted to share that script in case it helps someone else:
https://ente.limmat.ch/ftp/pub/software/bash/mdadm-stop-stacked/
Copy it to /etc/init.d/, make it owned by root and executable, generate the
links in /etc/rcX.d using update-rc.d, update dependency based boot order with
insserv and enjoy rebooting without a busybox root prompt to reassemble
manually...
Regards, Adrian.