* mdadm 4.3 rejects /dev/md128 and larger numbers
@ 2024-03-04 13:19 Andreas Klauer
2024-03-04 15:00 ` Mariusz Tkaczyk
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Klauer @ 2024-03-04 13:19 UTC (permalink / raw)
To: linux-raid; +Cc: Andreas Klauer
Hello,
since mdadm 4.3, trying to use numbers larger than 127 results in:
mdadm: Value "/dev/md3032" cannot be set as devname.
Reason: Not POSIX compatible. Value ignored.
Because in util.c :: is_devname_numbered() (commit 25aa73291):
if (val > 127)
return false;
The kernel seems to be fine with MINORMASK (2^20 - 1).
If so, instead of 127, the limit here should be 1048575?
I don't need a million arrays. But I do have more arrays than
average because I use partitions instead of one big array
for everything. And some flexibility in using distinct number
ranges per group of arrays makes /proc/mdstat easier to read.
Regards,
Andreas Klauer
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mdadm 4.3 rejects /dev/md128 and larger numbers
2024-03-04 13:19 mdadm 4.3 rejects /dev/md128 and larger numbers Andreas Klauer
@ 2024-03-04 15:00 ` Mariusz Tkaczyk
0 siblings, 0 replies; 2+ messages in thread
From: Mariusz Tkaczyk @ 2024-03-04 15:00 UTC (permalink / raw)
To: Andreas Klauer; +Cc: linux-raid
On Mon, 4 Mar 2024 14:19:29 +0100
Andreas Klauer <Andreas.Klauer@metamorpher.de> wrote:
> Hello,
>
> since mdadm 4.3, trying to use numbers larger than 127 results in:
>
> mdadm: Value "/dev/md3032" cannot be set as devname.
> Reason: Not POSIX compatible. Value ignored.
>
> Because in util.c :: is_devname_numbered() (commit 25aa73291):
>
> if (val > 127)
> return false;
>
> The kernel seems to be fine with MINORMASK (2^20 - 1).
> If so, instead of 127, the limit here should be 1048575?
>
> I don't need a million arrays. But I do have more arrays than
> average because I use partitions instead of one big array
> for everything. And some flexibility in using distinct number
> ranges per group of arrays makes /proc/mdstat easier to read.
>
> Regards,
> Andreas Klauer
>
Hello Andreas,
Indeed, that it the case I missed. Sorry for bringing regression.
In the longer term, for better user experience I would like promote conception
called "named arrays", so could you please try to create "/dev/md/md_3032" and
test and see if that works for you?
The difference is that you will not be restricted to numbered devices, you can
also use asci letters like: "md_myarray", "md_do_not_touch".
Of course, it is kind of regression so I'm open to fix it for you but if I will
be able to convince you to use named arrays format (and help me fix issues!)
then whole community will gain.
You have to enable it first, but please note that it is not widely used now:
echo CREATE name=yes > /etc/mdadm.conf
Please test it and let me know!
Thanks,
Mariusz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-04 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-04 13:19 mdadm 4.3 rejects /dev/md128 and larger numbers Andreas Klauer
2024-03-04 15:00 ` Mariusz Tkaczyk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).