Thread (5 messages) 5 messages, 3 authors, 2023-01-04

Re: [PATCH 1/1] Don't handle change event against raw devices

From: Xiao Ni <hidden>
Date: 2022-12-30 10:39:01

On Fri, Dec 30, 2022 at 6:20 PM Paul Menzel [off-list ref] 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.
quoted
Signed-off-by: Xiao Ni <redacted>
---
  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 …
quoted
+# 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
quoted
+# member disks
Add a dot/period at the end of sentences?
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help