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.

///

...
> >  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.

Regards,
/Karl Hammar



Reply via email to