forked from pool/mdadm
90d4e6869d
- Update mdadm to latest upstream state upto commit 582945c2d3bb. (jsc#PED-7542) 1) The testing changes are not included here. 2) Code clean up, and more helper routines added for Manage.c, Monitor.c, mdadm.c, ReadMe.c, super-intel.c, super0.c, super1.c, Create.c, Incremental.c and so on. 3) Man page update for mdadm.8.in. 4) Several memory leak and double free fixes. 5) Check /etc/initrd-release for whether systemd running on an initrd. - Manage: Block unsafe member failing 0062-Manage-Block-unsafe-member-failing.patch - Mdmonitor: Split alert() into separate functions 0063-Mdmonitor-Split-alert-into-separate-functions.patch - Monitor: block if monitor modes are combined. 0064-Monitor-block-if-monitor-modes-are-combined.patch - Update mdadm Monitor manual. 0065-Update-mdadm-Monitor-manual.patch - mdadm: create ident_init() 0066-mdadm-create-ident_init.patch - mdadm: Add option validation for --update-subarray 0067-mdadm-Add-option-validation-for-update-subarray.patch - Fix --update-subarray on active volume 0068-Fix-update-subarray-on-active-volume.patch - Add code specific update options to enum. 0069-Add-code-specific-update-options-to-enum.patch - super-ddf: Remove update_super_ddf. 0070-super-ddf-Remove-update_super_ddf.patch - super0: refactor the code for enum 0071-super0-refactor-the-code-for-enum.patch - super1: refactor the code for enum OBS-URL: https://build.opensuse.org/request/show/1137473 OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=231
55 lines
2.1 KiB
Diff
55 lines
2.1 KiB
Diff
From 24d329fc97a64ec185ef27e59730f3f058c09029 Mon Sep 17 00:00:00 2001
|
|
From: Xiao Ni <xni@redhat.com>
|
|
Date: Thu, 5 Jan 2023 00:29:20 +0800
|
|
Subject: [PATCH] mdadm/udev: Don't handle change event on raw devices
|
|
|
|
The raw devices are ready when add event happpens and the raid
|
|
can be assembled. So there is no need to handle change events.
|
|
And it can cause some inconvenient problems.
|
|
|
|
For example, the OS is installed on md0(/root) and md1(/home).
|
|
md0 and md1 are created on partitions. When it wants to re-install
|
|
OS, anaconda can't clear the storage configure. It deletes one
|
|
partition and does some jobs. The change event happens. Now
|
|
the raid device is assembled again. It can't delete the other
|
|
partitions.
|
|
|
|
So in this patch, we don't handle change event on raw devices
|
|
anymore.
|
|
|
|
Signed-off-by: Xiao Ni <xni@redhat.com>
|
|
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
|
|
---
|
|
udev-md-raid-assembly.rules | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
|
|
index 39b4344..d4a7f0a 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 can 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,9 @@ GOTO="md_inc_end"
|
|
|
|
LABEL="md_inc"
|
|
|
|
+# Bare disks are ready when add event happens, the raid can be assembled.
|
|
+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.35.3
|
|
|