On 20/12/2024 17:44, k...@aspodata.se wrote:
If I understand things correctly, with this mechanism one can have the kernel assemble the RAID arrays at boot up time with a modern metadata, but still without needing the initramfs. My arrays are still at metadata 0.90.
Please tell if you make booting with metadata 1.2 work. I havn't tested that.
It is NOT supported. The kernel has no code to do so, you need an initramfs. That said, nowadays I believe you can actually load the initramfs into the kernel so it's one monolithic blob ...
By the way, as to the other point of putting /dev/sda etc on the kernel command line, it's the kernel that's messing up and scrambling which physical disk is which logical sda sdb et al device, so explicitly specifying that will have exactly NO effect when your hardware/software combo changes again. I guess it was the fact your rescue disk booted from CDROM or whatever made THAT sda, and pushed the other disks out of the way.
sda, sdb, sdc et al are allocated AT RANDOM by the kernel. It just so happens that the "seed" rarely changes, so in normal use the same values happen to get chosen every time - until something DOES change, and then you wonder why everything falls over. The same is also true of md127, md126 et al. If your raid counts up from md1, md2 etc then those I believe are stable, but I haven't seen them for pretty much the entire time I've been involved in mdraid (maybe a decade or so?)
You need to use those UUID/GUID things. I know it's a hassle finding out whether it's a guid or a uuid, and what it is, and all that crud, but trust me they don't change, you can shuffle your disks, stick in another SATA card, move it from SATA to USB (BAD move - don't even think of it !!!), and the system will still find the correct disk.
Cheers, Wol