Hello, Karl. On Fri, Dec 20, 2024 at 18:44:53 +0100, k...@aspodata.se wrote: > Alan Mackenzie: > > On Fri, Dec 20, 2024 at 15:50:53 +0100, k...@aspodata.se wrote: > ... > > Because I didn't know about it. I found out about it this morning, and > > immediately tested it by setting up an > > "md=126,/dev/nvme0n1p4,/dev/nvme1n1p4" on the kernel command line, using > > the rescue disk to make the "preferred minor"s wrong, and testing it. > > It worked!
> > 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. I've just tried it, with metadata 1.2, and it doesn't work. I got error messages at boot up to the effect that the component partitions were lacking valid version 0.0 super blocks. People without initramfs appear not to be in the sights of the maintainers of this software. They could so easily have made the assembly of metadata 1.2 components on the kernel command line work. :-( By the way, do you know an easy way for copying an entire filesystem, such as the root system, but without copying other systems mounted in it? I tried for some while with rsync and various combinations of find's and xargs's, and in the end booted up into the rescue disc to do it. I shouldn't have to do that. > /// > ... > > > And... what is the need for dynamic minors now when dev_t is 32bits: > > Dynamic minors? I don't think I follow you, here. > If you partition the md device, the partitions will get a device with a > dynamic minor. > # mdadm -C /dev/md11 -n 1 -l 1 --force /dev/sdc2 > # mdadm -C /dev/md10 -n 1 -l 1 -e 0 --force /dev/sdc1 > ... create partitions > # fdisk -l /dev/md10 > ... > Device Boot Start End Sectors Size Id Type > /dev/md10p1 2048 22527 20480 10M 83 Linux > /dev/md10p2 22528 192383 169856 82.9M 83 Linux > # fdisk -l /dev/md11 > ... > Device Boot Start End Sectors Size Id Type > /dev/md11p1 2048 206847 204800 100M 83 Linux > /dev/md11p2 206848 1757183 1550336 757M 83 Linux > # cat /sys/block/md10/md10p1/dev > 259:0 > # cat /sys/block/md10/md10p2/dev > 259:1 > # cat /sys/block/md11/md11p1/dev > 259:2 > # cat /sys/block/md11/md11p2/dev > 259:3 > $ grep -A2 '259 block' > /Net/git/linux-stable/Documentation/admin-guide/devices.txt > 259 block Block Extended Major > Used dynamically to hold additional partition minor > numbers and allow large numbers of partitions per device > So, to boot to a md device partition (as /) might be a hit and miss > unless you use some initramfs magic. OK, thanks for the explanation. My root partition is an entire device, /dev/md126. I've only had problems with it when accidents have happened, like yesterday evening. > Regards, > /Karl Hammar -- Alan Mackenzie (Nuremberg, Germany).