On Fri, Dec 30, 2022 at 6:20 PM Paul Menzel <pmenzel@xxxxxxxxxxxxx> 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@xxxxxxxxxx> > > --- > > 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