* [PATCH 1/1] Don't handle change event against raw devices
@ 2022-12-30 9:07 Xiao Ni
2022-12-30 10:20 ` Paul Menzel
0 siblings, 1 reply; 5+ messages in thread
From: Xiao Ni @ 2022-12-30 9:07 UTC (permalink / raw)
To: jes; +Cc: linux-raid, ncroxon
Signed-off-by: Xiao Ni <xni@redhat.com>
---
udev-md-raid-assembly.rules | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
index 39b4344b8592..748ea05dadaa 100644
--- a/udev-md-raid-assembly.rules
+++ b/udev-md-raid-assembly.rules
@@ -11,6 +11,11 @@ SUBSYSTEM!="block", GOTO="md_inc_end"
ENV{SYSTEMD_READY}=="0", GOTO="md_inc_end"
# handle potential components of arrays (the ones supported by md)
+# For member devices which are md/dm devices, we don't need to
+# handle add event. Because md/dm devices need to do some init jobs.
+# Then the change event happens.
+# When adding md/dm devices, ID_FS_TYPE only be linux_raid_member
+# after change event happens.
ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc"
# "noiswmd" on kernel command line stops mdadm from handling
@@ -28,6 +33,11 @@ GOTO="md_inc_end"
LABEL="md_inc"
+# We only handle add event on raw disks. If we handle change event on raw disk,
+# the tool parted can't change partition table unless clear superblock on
+# member disks
+ACTION=="change", KERNEL!="dm-*|md*", GOTO="md_inc_end"
+
# remember you can limit what gets auto/incrementally assembled by
# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
ACTION!="remove", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}"
--
2.32.0 (Apple Git-132)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Don't handle change event against raw devices
2022-12-30 9:07 [PATCH 1/1] Don't handle change event against raw devices Xiao Ni
@ 2022-12-30 10:20 ` Paul Menzel
2022-12-30 10:37 ` Xiao Ni
0 siblings, 1 reply; 5+ messages in thread
From: Paul Menzel @ 2022-12-30 10:20 UTC (permalink / raw)
To: Xiao Ni; +Cc: jes, linux-raid, ncroxon
Dear Xiao,
Thank you for the patch.
Am 30.12.22 um 10:07 schrieb Xiao Ni:
It’d be great if you described the problem.
> Signed-off-by: Xiao Ni <xni@redhat.com>
> ---
> udev-md-raid-assembly.rules | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
> index 39b4344b8592..748ea05dadaa 100644
> --- a/udev-md-raid-assembly.rules
> +++ b/udev-md-raid-assembly.rules
> @@ -11,6 +11,11 @@ SUBSYSTEM!="block", GOTO="md_inc_end"
> ENV{SYSTEMD_READY}=="0", GOTO="md_inc_end"
>
> # handle potential components of arrays (the ones supported by md)
> +# For member devices which are md/dm devices, we don't need to
> +# handle add event. Because md/dm devices need to do some init jobs.
> +# Then the change event happens.
> +# When adding md/dm devices, ID_FS_TYPE only be linux_raid_member
A verb is missing. Maybe: … can only be …
> +# after change event happens.
> ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc"
>
> # "noiswmd" on kernel command line stops mdadm from handling
> @@ -28,6 +33,11 @@ GOTO="md_inc_end"
>
> LABEL="md_inc"
>
> +# We only handle add event on raw disks. If we handle change event on raw disk,
> +# the tool parted can't change partition table unless clear superblock on
1. *the* partition table
2. Please excuse my ignorance, but what is a “clear superblock”?
> +# member disks
Add a dot/period at the end of sentences?
> +ACTION=="change", KERNEL!="dm-*|md*", GOTO="md_inc_end"
> +
> # remember you can limit what gets auto/incrementally assembled by
> # mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
> ACTION!="remove", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Don't handle change event against raw devices
2022-12-30 10:20 ` Paul Menzel
@ 2022-12-30 10:37 ` Xiao Ni
2023-01-04 15:48 ` Jes Sorensen
0 siblings, 1 reply; 5+ messages in thread
From: Xiao Ni @ 2022-12-30 10:37 UTC (permalink / raw)
To: Paul Menzel; +Cc: jes, linux-raid, ncroxon
On Fri, Dec 30, 2022 at 6:20 PM Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>
> Dear Xiao,
>
>
> Thank you for the patch.
>
> Am 30.12.22 um 10:07 schrieb Xiao Ni:
>
> It’d be great if you described the problem.
Hi Paul
Thanks. I'll describe more in next version.
>
> > Signed-off-by: Xiao Ni <xni@redhat.com>
> > ---
> > udev-md-raid-assembly.rules | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
> > index 39b4344b8592..748ea05dadaa 100644
> > --- a/udev-md-raid-assembly.rules
> > +++ b/udev-md-raid-assembly.rules
> > @@ -11,6 +11,11 @@ SUBSYSTEM!="block", GOTO="md_inc_end"
> > ENV{SYSTEMD_READY}=="0", GOTO="md_inc_end"
> >
> > # handle potential components of arrays (the ones supported by md)
> > +# For member devices which are md/dm devices, we don't need to
> > +# handle add event. Because md/dm devices need to do some init jobs.
> > +# Then the change event happens.
> > +# When adding md/dm devices, ID_FS_TYPE only be linux_raid_member
>
> A verb is missing. Maybe: … can only be …
>
> > +# after change event happens.
> > ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc"
> >
> > # "noiswmd" on kernel command line stops mdadm from handling
> > @@ -28,6 +33,11 @@ GOTO="md_inc_end"
> >
> > LABEL="md_inc"
> >
> > +# We only handle add event on raw disks. If we handle change event on raw disk,
> > +# the tool parted can't change partition table unless clear superblock on
>
> 1. *the* partition table
> 2. Please excuse my ignorance, but what is a “clear superblock”?
It means clearing superblock with command mdadm --zero-superblock
>
> > +# member disks
>
> Add a dot/period at the end of sentences?
>
> > +ACTION=="change", KERNEL!="dm-*|md*", GOTO="md_inc_end"
> > +
> > # remember you can limit what gets auto/incrementally assembled by
> > # mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
> > ACTION!="remove", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}"
>
Best Regards
Xiao
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Don't handle change event against raw devices
2022-12-30 10:37 ` Xiao Ni
@ 2023-01-04 15:48 ` Jes Sorensen
2023-01-04 16:06 ` Xiao Ni
0 siblings, 1 reply; 5+ messages in thread
From: Jes Sorensen @ 2023-01-04 15:48 UTC (permalink / raw)
To: Xiao Ni, Paul Menzel; +Cc: linux-raid, ncroxon
On 12/30/22 05:37, Xiao Ni wrote:
> On Fri, Dec 30, 2022 at 6:20 PM Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>>
>> Dear Xiao,
>>
>>
>> Thank you for the patch.
>>
>> Am 30.12.22 um 10:07 schrieb Xiao Ni:
>>
>> It’d be great if you described the problem.
>
> Hi Paul
>
> Thanks. I'll describe more in next version.
>>
Hi Xiao,
Did you post an updated version?
Thanks,
Jes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] Don't handle change event against raw devices
2023-01-04 15:48 ` Jes Sorensen
@ 2023-01-04 16:06 ` Xiao Ni
0 siblings, 0 replies; 5+ messages in thread
From: Xiao Ni @ 2023-01-04 16:06 UTC (permalink / raw)
To: Jes Sorensen, Paul Menzel; +Cc: linux-raid, ncroxon
在 2023/1/4 下午11:48, Jes Sorensen 写道:
> On 12/30/22 05:37, Xiao Ni wrote:
>> On Fri, Dec 30, 2022 at 6:20 PM Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>>> Dear Xiao,
>>>
>>>
>>> Thank you for the patch.
>>>
>>> Am 30.12.22 um 10:07 schrieb Xiao Ni:
>>>
>>> It’d be great if you described the problem.
>> Hi Paul
>>
>> Thanks. I'll describe more in next version.
> Hi Xiao,
>
> Did you post an updated version?
>
> Thanks,
> Jes
>
>
>
Hi Jes
I'll send the new version soon.
Regards
Xiao
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-04 16:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-30 9:07 [PATCH 1/1] Don't handle change event against raw devices Xiao Ni
2022-12-30 10:20 ` Paul Menzel
2022-12-30 10:37 ` Xiao Ni
2023-01-04 15:48 ` Jes Sorensen
2023-01-04 16:06 ` Xiao Ni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.