[mdadm/f16: 2/3] Fix problem with failed disks in failed RAID volume not being removed
Jes Sorensen
jsorensen at fedoraproject.org
Tue Dec 11 15:54:38 UTC 2012
commit ca9ac096b583563de3528055b19a51cc2525d7e7
Author: Jes Sorensen <Jes.Sorensen at redhat.com>
Date: Tue Dec 11 16:48:28 2012 +0100
Fix problem with failed disks in failed RAID volume not being removed
Resolves bz886123
Signed-off-by: Jes Sorensen <Jes.Sorensen at redhat.com>
mdadm.rules | 12 ++++++++++--
mdadm.spec | 9 ++++++++-
2 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/mdadm.rules b/mdadm.rules
index 0045d99..3083dca 100644
--- a/mdadm.rules
+++ b/mdadm.rules
@@ -26,8 +26,12 @@ ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end"
# array members either)
SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="linux_raid_member", \
RUN+="/sbin/mdadm -I $env{DEVNAME}"
-SUBSYSTEM=="block", ACTION=="remove", ENV{ID_FS_TYPE}=="linux_raid_member", \
+SUBSYSTEM=="block", ACTION=="remove", ENV{ID_PATH}=="?*", \
+ ENV{ID_FS_TYPE}=="linux_raid_member", \
RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
+SUBSYSTEM=="block", ACTION=="remove", ENV{ID_PATH}!="?*", \
+ ENV{ID_FS_TYPE}=="linux_raid_member", \
+ RUN+="/sbin/mdadm -If $name"
# Next, check to make sure the BIOS raid stuff wasn't turned off via cmdline
IMPORT{cmdline}="noiswmd"
@@ -36,8 +40,12 @@ ENV{noiswmd}=="?*", GOTO="md_imsm_inc_end"
ENV{nodmraid}=="?*", GOTO="md_imsm_inc_end"
SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="isw_raid_member", \
RUN+="/sbin/mdadm -I $env{DEVNAME}"
-SUBSYSTEM=="block", ACTION=="remove", ENV{ID_FS_TYPE}=="isw_raid_member", \
+SUBSYSTEM=="block", ACTION=="remove", ENV{ID_PATH}=="?*", \
+ ENV{ID_FS_TYPE}=="isw_raid_member", \
RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
+SUBSYSTEM=="block", ACTION=="remove", ENV{ID_PATH}!="?*", \
+ ENV{ID_FS_TYPE}=="isw_raid_member", \
+ RUN+="/sbin/mdadm -If $name"
LABEL="md_imsm_inc_end"
# Next make sure that this isn't a dm device we should skip for some reason
diff --git a/mdadm.spec b/mdadm.spec
index 85a0a90..dbf98c7 100644
--- a/mdadm.spec
+++ b/mdadm.spec
@@ -1,7 +1,7 @@
Summary: The mdadm program controls Linux md devices (software RAID arrays)
Name: mdadm
Version: 3.2.6
-Release: 5%{?dist}
+Release: 6%{?dist}
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz
Source1: mdmonitor.init
Source2: raid-check
@@ -161,6 +161,13 @@ rm -rf %{buildroot}
%changelog
* Mon Dec 10 2012 Jes Sorensen <Jes.Sorensen at redhat.com> - 3.2.6-5
+- Fix issue with udev scripts where if an raid volume with one of
+ the disks failing, the failed disk is still present in the volume
+ and container. The raid volume stays is in normal state (should be
+ degraded) and the rebuild cannot start.
+- Resolves bz886123
+
+* Mon Dec 10 2012 Jes Sorensen <Jes.Sorensen at redhat.com> - 3.2.6-5
- mdadm-sysvinit is obsolete given that we no longer support booting
using sysvinit scripts
- Resolves bz884993
More information about the scm-commits
mailing list