* Re: [PATCH v2 0/6] mdadm: POSIX portable naming rules
@ 2024-01-01 12:32 Stefan Fleischmann
2024-01-03 8:53 ` Mariusz Tkaczyk
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Fleischmann @ 2024-01-01 12:32 UTC (permalink / raw)
To: Mariusz Tkaczyk; +Cc: Jes Sorensen, linux-raid
On 6/1/23 03:27, Mariusz Tkaczyk wrote:
> Hi Jes,
> To avoid problem with udev and VROC UEFI driver I developed stronger
> naming policy, basing on POSIX portable names standard. Verification is
> added for names and config entries. In case of an issue, user can update
> name to make it compatible (for IMSM and native).
>
> The changes here may cause /dev/md/ link will be different than before
> mdadm update. To make any of that happen user need to use unusual naming
> convention, like:
> - special, non standard signs like, $,%,&,* or space.
> - '-' used as first sign.
> - locals.
>
> Note: I didn't analyze configurations with "names=1". If name cannot be
> determined mdadm should fallback to default numbered dev creation.
>
> If you are planning release soon then feel free to merge it after the
> release. It is a potential regression point.
>
> It is a new version of [1] but it is strongly rebuild. Here is a list
> of changes:
> 1. negative and positive test scenarios for both create and config
> entries are added.
> 2. Save parsed parameters in dedicated structs. It is a way to control
> what is parsed, assuming that we should use dedicated set_* function.
> 3. Verification for config entries is added.
> 5. Improved error logging for names:
> - during creation, these messages are errors, printed to stderr.
> - for config entries, messages are just a warnings printed to stdout.
> 6. Error messages reworked.
> 7. Updates in manual.
>
> [1] https://lore.kernel.org/linux-raid/20221221115019.26276-1-mariusz.tkaczyk@linux.intel.com/
>
> Mariusz Tkaczyk (6):
> tests: create names_template
> tests: create 00confnames
> mdadm: set ident.devname if applicable
> mdadm: refactor ident->name handling
> mdadm: define ident_set_devname()
> mdadm: Follow POSIX Portable Character Set
Hi,
it seems to me that the behavior after this change is inconsistent. The
default naming scheme for a created device is still <HOSTNAME>:<ID>. When
I create a new MD device with:
# mdadm --version
mdadm - v4.2 - 2021-12-30 - Debian 4.2+20231121-1
# mdadm --create /dev/md32 -l 1 -n 2 /dev/loop2 /dev/loop3
[...]
# mdadm --detail /dev/md32
/dev/md32:
Version : 1.2
Creation Time : Mon Jan 1 12:33:05 2024
[...]
Name : gondolin:32 (local to host gondolin)
UUID : d84b8e26:3675a722:61869b83:670699da
The name set automatically by mdadm is not allowed by the new naming
rules, and mdadm complains about that later on. So for consistency one
would either have to include : in the allowed character list or change
the default naming scheme. Or am I missing something here?
Happy new year!
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/6] mdadm: POSIX portable naming rules
2024-01-01 12:32 [PATCH v2 0/6] mdadm: POSIX portable naming rules Stefan Fleischmann
@ 2024-01-03 8:53 ` Mariusz Tkaczyk
0 siblings, 0 replies; 6+ messages in thread
From: Mariusz Tkaczyk @ 2024-01-03 8:53 UTC (permalink / raw)
To: Stefan Fleischmann; +Cc: Jes Sorensen, linux-raid
On Mon, 1 Jan 2024 13:32:55 +0100
Stefan Fleischmann <sfle@kth.se> wrote:
> On 6/1/23 03:27, Mariusz Tkaczyk wrote:
> > Hi Jes,
> > To avoid problem with udev and VROC UEFI driver I developed stronger
> > naming policy, basing on POSIX portable names standard. Verification is
> > added for names and config entries. In case of an issue, user can update
> > name to make it compatible (for IMSM and native).
> >
> > The changes here may cause /dev/md/ link will be different than before
> > mdadm update. To make any of that happen user need to use unusual naming
> > convention, like:
> > - special, non standard signs like, $,%,&,* or space.
> > - '-' used as first sign.
> > - locals.
> >
> > Note: I didn't analyze configurations with "names=1". If name cannot be
> > determined mdadm should fallback to default numbered dev creation.
> >
> > If you are planning release soon then feel free to merge it after the
> > release. It is a potential regression point.
> >
> > It is a new version of [1] but it is strongly rebuild. Here is a list
> > of changes:
> > 1. negative and positive test scenarios for both create and config
> > entries are added.
> > 2. Save parsed parameters in dedicated structs. It is a way to control
> > what is parsed, assuming that we should use dedicated set_* function.
> > 3. Verification for config entries is added.
> > 5. Improved error logging for names:
> > - during creation, these messages are errors, printed to stderr.
> > - for config entries, messages are just a warnings printed to stdout.
> > 6. Error messages reworked.
> > 7. Updates in manual.
> >
> > [1]
> > https://lore.kernel.org/linux-raid/20221221115019.26276-1-mariusz.tkaczyk@linux.intel.com/
> >
> > Mariusz Tkaczyk (6):
> > tests: create names_template
> > tests: create 00confnames
> > mdadm: set ident.devname if applicable
> > mdadm: refactor ident->name handling
> > mdadm: define ident_set_devname()
> > mdadm: Follow POSIX Portable Character Set
>
>
> Hi,
>
> it seems to me that the behavior after this change is inconsistent. The
> default naming scheme for a created device is still <HOSTNAME>:<ID>. When
> I create a new MD device with:
>
> # mdadm --version
> mdadm - v4.2 - 2021-12-30 - Debian 4.2+20231121-1
> # mdadm --create /dev/md32 -l 1 -n 2 /dev/loop2 /dev/loop3
> [...]
> # mdadm --detail /dev/md32
> /dev/md32:
> Version : 1.2
> Creation Time : Mon Jan 1 12:33:05 2024
> [...]
> Name : gondolin:32 (local to host gondolin)
> UUID : d84b8e26:3675a722:61869b83:670699da
>
> The name set automatically by mdadm is not allowed by the new naming
> rules, and mdadm complains about that later on. So for consistency one
> would either have to include : in the allowed character list or change
> the default naming scheme. Or am I missing something here?
>
> Happy new year!
> Stefan
Hi Stefan,
Yeah, I noticed this problem recently but I do not fixed it yet. For sure it
will be fixed before release.
It does not prompt about the name in metadata but about name entry in config
file. I analyzed the usage on name from config and it seems to be something
which can be dropped but I will reconsider it deeper later.
Could you please test if removing "name=hostanme:id" from ARRAYLINE in
mdadm.conf fixes issue for you?
Thanks,
Mariusz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/6] mdadm: POSIX portable naming rules
2023-06-01 7:27 Mariusz Tkaczyk
2023-06-01 8:57 ` Paul Menzel
@ 2023-10-26 21:31 ` Jes Sorensen
1 sibling, 0 replies; 6+ messages in thread
From: Jes Sorensen @ 2023-10-26 21:31 UTC (permalink / raw)
To: Mariusz Tkaczyk; +Cc: linux-raid, colyli
On 6/1/23 03:27, Mariusz Tkaczyk wrote:
> Hi Jes,
> To avoid problem with udev and VROC UEFI driver I developed stronger
> naming policy, basing on POSIX portable names standard. Verification is
> added for names and config entries. In case of an issue, user can update
> name to make it compatible (for IMSM and native).
>
> The changes here may cause /dev/md/ link will be different than before
> mdadm update. To make any of that happen user need to use unusual naming
> convention, like:
> - special, non standard signs like, $,%,&,* or space.
> - '-' used as first sign.
> - locals.
>
> Note: I didn't analyze configurations with "names=1". If name cannot be
> determined mdadm should fallback to default numbered dev creation.
>
> If you are planning release soon then feel free to merge it after the
> release. It is a potential regression point.
>
> It is a new version of [1] but it is strongly rebuild. Here is a list
> of changes:
> 1. negative and positive test scenarios for both create and config
> entries are added.
> 2. Save parsed parameters in dedicated structs. It is a way to control
> what is parsed, assuming that we should use dedicated set_* function.
> 3. Verification for config entries is added.
> 5. Improved error logging for names:
> - during creation, these messages are errors, printed to stderr.
> - for config entries, messages are just a warnings printed to stdout.
> 6. Error messages reworked.
> 7. Updates in manual.
>
> [1] https://lore.kernel.org/linux-raid/20221221115019.26276-1-mariusz.tkaczyk@linux.intel.com/
>
> Mariusz Tkaczyk (6):
> tests: create names_template
> tests: create 00confnames
> mdadm: set ident.devname if applicable
> mdadm: refactor ident->name handling
> mdadm: define ident_set_devname()
> mdadm: Follow POSIX Portable Character Set
Applied!
Thanks,
Jes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/6] mdadm: POSIX portable naming rules
2023-06-01 8:57 ` Paul Menzel
@ 2023-06-01 9:52 ` Mariusz Tkaczyk
0 siblings, 0 replies; 6+ messages in thread
From: Mariusz Tkaczyk @ 2023-06-01 9:52 UTC (permalink / raw)
To: Paul Menzel; +Cc: jes, linux-raid, colyli
On Thu, 1 Jun 2023 10:57:47 +0200
Paul Menzel <pmenzel@molgen.mpg.de> wrote:
> Dear Mariusz,
>
>
> Am 01.06.23 um 09:27 schrieb Mariusz Tkaczyk:
>
> > To avoid problem with udev and VROC UEFI driver I developed stronger
> > naming policy, basing on POSIX portable names standard. Verification is
>
> s/basing/based/
Noted, thanks.
>
> > added for names and config entries. In case of an issue, user can update
> > name to make it compatible (for IMSM and native).
>
> What is the VROC UEFI driver, and what is the problem exactly to risk
> regressions on the user side? Why can’t the UEFI driver be fixed?
Thanks for your question. I should mark this as [RFC].
VROC solution (called IMSM here, or super-intel) comes with UEFI support. You
can manipulate arrays in UEFI, for example you can create an array to have it
available as installation destination for new OS.
I decided that it is worth to mention that we have UEFI driver and there are
some differences in allowed names. Now I think, that it is irrelevant in this
context because my main concern is udevd. The "POSIX portable names" are strict
and that should prevent any differences in names.
Current form is aggressive (do not allow at all) and if you think that I should
lower the requirements or bring the option to pass without verification to
ensure backward compatibility- will do, just let me know.
I would like to add exceptions based on community input because it affect
multiple metadata formats.
I think that we should require to follow those rules for new arrays.
Thanks,
Mariusz
>
>
> Kind regards,
>
> Paul
>
>
> > The changes here may cause /dev/md/ link will be different than before
> > mdadm update. To make any of that happen user need to use unusual naming
> > convention, like:
> > - special, non standard signs like, $,%,&,* or space.
> > - '-' used as first sign.
> > - locals.
> >
> > Note: I didn't analyze configurations with "names=1". If name cannot be
> > determined mdadm should fallback to default numbered dev creation.
> >
> > If you are planning release soon then feel free to merge it after the
> > release. It is a potential regression point.
> >
> > It is a new version of [1] but it is strongly rebuild. Here is a list
> > of changes:
> > 1. negative and positive test scenarios for both create and config
> > entries are added.
> > 2. Save parsed parameters in dedicated structs. It is a way to control
> > what is parsed, assuming that we should use dedicated set_* function.
> > 3. Verification for config entries is added.
> > 5. Improved error logging for names:
> > - during creation, these messages are errors, printed to stderr.
> > - for config entries, messages are just a warnings printed to stdout.
> > 6. Error messages reworked.
> > 7. Updates in manual.
> >
> > [1]
> > https://lore.kernel.org/linux-raid/20221221115019.26276-1-mariusz.tkaczyk@linux.intel.com/
> >
> > Mariusz Tkaczyk (6):
> > tests: create names_template
> > tests: create 00confnames
> > mdadm: set ident.devname if applicable
> > mdadm: refactor ident->name handling
> > mdadm: define ident_set_devname()
> > mdadm: Follow POSIX Portable Character Set
> >
> > Build.c | 21 ++--
> > Create.c | 35 +++----
> > Detail.c | 17 ++-
> > config.c | 184 +++++++++++++++++++++++++++------
> > lib.c | 76 +++++++++++---
> > mdadm.8.in | 70 ++++++-------
> > mdadm.c | 73 +++++--------
> > mdadm.conf.5.in | 4 -
> > mdadm.h | 36 ++++---
> > super-intel.c | 47 +++++----
> > tests/00confnames | 107 +++++++++++++++++++
> > tests/00createnames | 89 ++++------------
> > tests/templates/names_template | 80 ++++++++++++++
> > 13 files changed, 551 insertions(+), 288 deletions(-)
> > create mode 100644 tests/00confnames
> > create mode 100644 tests/templates/names_template
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/6] mdadm: POSIX portable naming rules
2023-06-01 7:27 Mariusz Tkaczyk
@ 2023-06-01 8:57 ` Paul Menzel
2023-06-01 9:52 ` Mariusz Tkaczyk
2023-10-26 21:31 ` Jes Sorensen
1 sibling, 1 reply; 6+ messages in thread
From: Paul Menzel @ 2023-06-01 8:57 UTC (permalink / raw)
To: Mariusz Tkaczyk; +Cc: jes, linux-raid, colyli
Dear Mariusz,
Am 01.06.23 um 09:27 schrieb Mariusz Tkaczyk:
> To avoid problem with udev and VROC UEFI driver I developed stronger
> naming policy, basing on POSIX portable names standard. Verification is
s/basing/based/
> added for names and config entries. In case of an issue, user can update
> name to make it compatible (for IMSM and native).
What is the VROC UEFI driver, and what is the problem exactly to risk
regressions on the user side? Why can’t the UEFI driver be fixed?
Kind regards,
Paul
> The changes here may cause /dev/md/ link will be different than before
> mdadm update. To make any of that happen user need to use unusual naming
> convention, like:
> - special, non standard signs like, $,%,&,* or space.
> - '-' used as first sign.
> - locals.
>
> Note: I didn't analyze configurations with "names=1". If name cannot be
> determined mdadm should fallback to default numbered dev creation.
>
> If you are planning release soon then feel free to merge it after the
> release. It is a potential regression point.
>
> It is a new version of [1] but it is strongly rebuild. Here is a list
> of changes:
> 1. negative and positive test scenarios for both create and config
> entries are added.
> 2. Save parsed parameters in dedicated structs. It is a way to control
> what is parsed, assuming that we should use dedicated set_* function.
> 3. Verification for config entries is added.
> 5. Improved error logging for names:
> - during creation, these messages are errors, printed to stderr.
> - for config entries, messages are just a warnings printed to stdout.
> 6. Error messages reworked.
> 7. Updates in manual.
>
> [1] https://lore.kernel.org/linux-raid/20221221115019.26276-1-mariusz.tkaczyk@linux.intel.com/
>
> Mariusz Tkaczyk (6):
> tests: create names_template
> tests: create 00confnames
> mdadm: set ident.devname if applicable
> mdadm: refactor ident->name handling
> mdadm: define ident_set_devname()
> mdadm: Follow POSIX Portable Character Set
>
> Build.c | 21 ++--
> Create.c | 35 +++----
> Detail.c | 17 ++-
> config.c | 184 +++++++++++++++++++++++++++------
> lib.c | 76 +++++++++++---
> mdadm.8.in | 70 ++++++-------
> mdadm.c | 73 +++++--------
> mdadm.conf.5.in | 4 -
> mdadm.h | 36 ++++---
> super-intel.c | 47 +++++----
> tests/00confnames | 107 +++++++++++++++++++
> tests/00createnames | 89 ++++------------
> tests/templates/names_template | 80 ++++++++++++++
> 13 files changed, 551 insertions(+), 288 deletions(-)
> create mode 100644 tests/00confnames
> create mode 100644 tests/templates/names_template
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 0/6] mdadm: POSIX portable naming rules
@ 2023-06-01 7:27 Mariusz Tkaczyk
2023-06-01 8:57 ` Paul Menzel
2023-10-26 21:31 ` Jes Sorensen
0 siblings, 2 replies; 6+ messages in thread
From: Mariusz Tkaczyk @ 2023-06-01 7:27 UTC (permalink / raw)
To: jes; +Cc: linux-raid, colyli
Hi Jes,
To avoid problem with udev and VROC UEFI driver I developed stronger
naming policy, basing on POSIX portable names standard. Verification is
added for names and config entries. In case of an issue, user can update
name to make it compatible (for IMSM and native).
The changes here may cause /dev/md/ link will be different than before
mdadm update. To make any of that happen user need to use unusual naming
convention, like:
- special, non standard signs like, $,%,&,* or space.
- '-' used as first sign.
- locals.
Note: I didn't analyze configurations with "names=1". If name cannot be
determined mdadm should fallback to default numbered dev creation.
If you are planning release soon then feel free to merge it after the
release. It is a potential regression point.
It is a new version of [1] but it is strongly rebuild. Here is a list
of changes:
1. negative and positive test scenarios for both create and config
entries are added.
2. Save parsed parameters in dedicated structs. It is a way to control
what is parsed, assuming that we should use dedicated set_* function.
3. Verification for config entries is added.
5. Improved error logging for names:
- during creation, these messages are errors, printed to stderr.
- for config entries, messages are just a warnings printed to stdout.
6. Error messages reworked.
7. Updates in manual.
[1] https://lore.kernel.org/linux-raid/20221221115019.26276-1-mariusz.tkaczyk@linux.intel.com/
Mariusz Tkaczyk (6):
tests: create names_template
tests: create 00confnames
mdadm: set ident.devname if applicable
mdadm: refactor ident->name handling
mdadm: define ident_set_devname()
mdadm: Follow POSIX Portable Character Set
Build.c | 21 ++--
Create.c | 35 +++----
Detail.c | 17 ++-
config.c | 184 +++++++++++++++++++++++++++------
lib.c | 76 +++++++++++---
mdadm.8.in | 70 ++++++-------
mdadm.c | 73 +++++--------
mdadm.conf.5.in | 4 -
mdadm.h | 36 ++++---
super-intel.c | 47 +++++----
tests/00confnames | 107 +++++++++++++++++++
tests/00createnames | 89 ++++------------
tests/templates/names_template | 80 ++++++++++++++
13 files changed, 551 insertions(+), 288 deletions(-)
create mode 100644 tests/00confnames
create mode 100644 tests/templates/names_template
--
2.26.2
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-03 8:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-01 12:32 [PATCH v2 0/6] mdadm: POSIX portable naming rules Stefan Fleischmann
2024-01-03 8:53 ` Mariusz Tkaczyk
-- strict thread matches above, loose matches on Subject: below --
2023-06-01 7:27 Mariusz Tkaczyk
2023-06-01 8:57 ` Paul Menzel
2023-06-01 9:52 ` Mariusz Tkaczyk
2023-10-26 21:31 ` Jes Sorensen
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).