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