Blame 0011-mdraid-cleanup-do-not-stop-mdraid-container.patch

Harald Hoyer 3fb223
From 906dedf4d57f03545094e75482072b12873926f8 Mon Sep 17 00:00:00 2001
Harald Hoyer 3fb223
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 3fb223
Date: Mon, 7 Sep 2009 17:53:37 +0200
Harald Hoyer 3fb223
Subject: [PATCH 11/12] mdraid-cleanup: do not stop mdraid container
Harald Hoyer 3fb223
Harald Hoyer 3fb223
---
Harald Hoyer 3fb223
 modules.d/90mdraid/mdraid-cleanup.sh |   15 +++++++++++++--
Harald Hoyer 3fb223
 1 files changed, 13 insertions(+), 2 deletions(-)
Harald Hoyer 3fb223
Harald Hoyer 3fb223
diff --git a/modules.d/90mdraid/mdraid-cleanup.sh b/modules.d/90mdraid/mdraid-cleanup.sh
Harald Hoyer 3fb223
index 9c4469d..dc3b86f 100755
Harald Hoyer 3fb223
--- a/modules.d/90mdraid/mdraid-cleanup.sh
Harald Hoyer 3fb223
+++ b/modules.d/90mdraid/mdraid-cleanup.sh
Harald Hoyer 3fb223
@@ -1,4 +1,15 @@
Harald Hoyer 3fb223
 # stop everything which is not busy
Harald Hoyer 3fb223
-for i in /dev/md*; do
Harald Hoyer 3fb223
-    mdadm --stop $i >/dev/null 2>&1
Harald Hoyer 3fb223
+for i in /dev/md* /dev/md/*; do
Harald Hoyer 3fb223
+    [ -b $i ] || continue
Harald Hoyer 3fb223
+
Harald Hoyer 3fb223
+    mddetail=$(udevadm info --query=property --name=$i)
Harald Hoyer 3fb223
+    case "$mddetail" in 
Harald Hoyer 3fb223
+	*MD_LEVEL=container*) 
Harald Hoyer 3fb223
+	    ;;
Harald Hoyer 3fb223
+	*DEVTYPE=partition*)
Harald Hoyer 3fb223
+	    ;;
Harald Hoyer 3fb223
+	*)
Harald Hoyer 3fb223
+	    mdadm --stop $i >/dev/null 2>&1
Harald Hoyer 3fb223
+	    ;;
Harald Hoyer 3fb223
+    esac
Harald Hoyer 3fb223
 done
Harald Hoyer 3fb223
-- 
Harald Hoyer 3fb223
1.6.2.5
Harald Hoyer 3fb223