Blame 0046-90mdraid-containers-are-not-runnable.patch

Harald Hoyer 55891e
From 5f6a71b38af7550d11c790abd5ca0bd0cf7b7f05 Mon Sep 17 00:00:00 2001
Harald Hoyer 55891e
From: Michal Soltys <soltys@ziu.info>
Harald Hoyer 55891e
Date: Tue, 6 Sep 2011 00:17:25 +0200
Harald Hoyer 55891e
Subject: [PATCH] 90mdraid: containers are not runnable
Harald Hoyer 55891e
Harald Hoyer 55891e
Remove whole "start a container logic".
Harald Hoyer 55891e
Harald Hoyer 55891e
Containers once assembled, always remain in 'inactive' state.
Harald Hoyer 55891e
Any attempt to run a container with mdadm -IR is a no-op, and any
Harald Hoyer 55891e
attempt with just mdadm -R ends with an error.
Harald Hoyer 55891e
Harald Hoyer 55891e
Signed-off-by: Michal Soltys <soltys@ziu.info>
Harald Hoyer 55891e
---
Harald Hoyer 55891e
 modules.d/90mdraid/65-md-incremental-imsm.rules |   20 --------------------
Harald Hoyer 55891e
 modules.d/90mdraid/md_finished.sh               |    2 +-
Harald Hoyer 55891e
 modules.d/90mdraid/mdcontainer_start.sh         |   12 ------------
Harald Hoyer 55891e
 modules.d/90mdraid/module-setup.sh              |    1 -
Harald Hoyer 55891e
 4 files changed, 1 insertions(+), 34 deletions(-)
Harald Hoyer 55891e
 delete mode 100755 modules.d/90mdraid/mdcontainer_start.sh
Harald Hoyer 55891e
Harald Hoyer 55891e
diff --git a/modules.d/90mdraid/65-md-incremental-imsm.rules b/modules.d/90mdraid/65-md-incremental-imsm.rules
Harald Hoyer 55891e
index 7c1d503..5e94a57 100644
Harald Hoyer 55891e
--- a/modules.d/90mdraid/65-md-incremental-imsm.rules
Harald Hoyer 55891e
+++ b/modules.d/90mdraid/65-md-incremental-imsm.rules
Harald Hoyer 55891e
@@ -66,23 +66,3 @@ RUN+="/sbin/initqueue --finished --unique --name md_finished /sbin/md_finished.s
Harald Hoyer 55891e
 RUN+="/sbin/initqueue --timeout --onetime --unique /sbin/mdraid_start"
Harald Hoyer 55891e
 
Harald Hoyer 55891e
 LABEL="end_raidstart"
Harald Hoyer 55891e
-
Harald Hoyer 55891e
-#
Harald Hoyer 55891e
-# Handle container raid arrays
Harald Hoyer 55891e
-#
Harald Hoyer 55891e
-ACTION=="add|change", \
Harald Hoyer 55891e
-	KERNEL=="md[0-9]*|md/*", \
Harald Hoyer 55891e
-	ENV{DEVTYPE}!="partition", \
Harald Hoyer 55891e
-	ENV{MD_LEVEL}=="container", \
Harald Hoyer 55891e
-        ENV{rd_MDADMCONF}!="?*", \
Harald Hoyer 55891e
-        ENV{rd_NO_MD}!="?*", \
Harald Hoyer 55891e
-	GOTO="do_container"
Harald Hoyer 55891e
-
Harald Hoyer 55891e
-GOTO="end_container"
Harald Hoyer 55891e
-
Harald Hoyer 55891e
-LABEL="do_container"
Harald Hoyer 55891e
-
Harald Hoyer 55891e
-RUN+="/sbin/initqueue --finished --unique --name md_finished /sbin/md_finished.sh"
Harald Hoyer 55891e
-RUN+="/sbin/initqueue --timeout --onetime --unique --name mdcontainer_start-%k /sbin/mdcontainer_start $env{DEVNAME}"
Harald Hoyer 55891e
-
Harald Hoyer 55891e
-LABEL="end_container"
Harald Hoyer 55891e
diff --git a/modules.d/90mdraid/md_finished.sh b/modules.d/90mdraid/md_finished.sh
Harald Hoyer 55891e
index cde0966..ce355be 100755
Harald Hoyer 55891e
--- a/modules.d/90mdraid/md_finished.sh
Harald Hoyer 55891e
+++ b/modules.d/90mdraid/md_finished.sh
Harald Hoyer 55891e
@@ -1,7 +1,7 @@
Harald Hoyer 55891e
 #!/bin/sh
Harald Hoyer 55891e
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
Harald Hoyer 55891e
 # ex: ts=8 sw=4 sts=4 et filetype=sh
Harald Hoyer 55891e
-for f in $hookdir/initqueue/settled/mdcontainer_start* $hookdir/initqueue/settled/mdraid_start* $hookdir/initqueue/settled/mdadm_auto*; do
Harald Hoyer 55891e
+for f in $hookdir/initqueue/settled/mdraid_start* $hookdir/initqueue/settled/mdadm_auto*; do
Harald Hoyer 55891e
     [ -e $f ] && exit 1
Harald Hoyer 55891e
 done
Harald Hoyer 55891e
 
Harald Hoyer 55891e
diff --git a/modules.d/90mdraid/mdcontainer_start.sh b/modules.d/90mdraid/mdcontainer_start.sh
Harald Hoyer 55891e
deleted file mode 100755
Harald Hoyer 55891e
index e7dd3ef..0000000
Harald Hoyer 55891e
--- a/modules.d/90mdraid/mdcontainer_start.sh
Harald Hoyer 55891e
+++ /dev/null
Harald Hoyer 55891e
@@ -1,12 +0,0 @@
Harald Hoyer 55891e
-#!/bin/sh
Harald Hoyer 55891e
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
Harald Hoyer 55891e
-# ex: ts=8 sw=4 sts=4 et filetype=sh
Harald Hoyer 55891e
-type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
Harald Hoyer 55891e
-
Harald Hoyer 55891e
-md=$1
Harald Hoyer 55891e
-udevadm control --stop-exec-queue
Harald Hoyer 55891e
-# and activate any containers
Harald Hoyer 55891e
-mdadm -IR $md 2>&1 | vinfo
Harald Hoyer 55891e
-ln -s $(command -v mdraid-cleanup) $hookdir/pre-pivot/30-mdraid-cleanup.sh 2>/dev/null
Harald Hoyer 55891e
-ln -s $(command -v mdraid-cleanup) $hookdir/pre-pivot/31-mdraid-cleanup.sh 2>/dev/null
Harald Hoyer 55891e
-udevadm control --start-exec-queue
Harald Hoyer 55891e
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
Harald Hoyer 55891e
index 91a0769..2dba8cb 100755
Harald Hoyer 55891e
--- a/modules.d/90mdraid/module-setup.sh
Harald Hoyer 55891e
+++ b/modules.d/90mdraid/module-setup.sh
Harald Hoyer 55891e
@@ -77,7 +77,6 @@ install() {
Harald Hoyer 55891e
     inst_hook pre-udev 30 "$moddir/mdmon-pre-udev.sh"
Harald Hoyer 55891e
 
Harald Hoyer 55891e
     inst "$moddir/mdraid_start.sh" /sbin/mdraid_start
Harald Hoyer 55891e
-    inst "$moddir/mdcontainer_start.sh" /sbin/mdcontainer_start
Harald Hoyer 55891e
     inst "$moddir/mdadm_auto.sh" /sbin/mdadm_auto
Harald Hoyer 55891e
     inst "$moddir/md_finished.sh" /sbin/md_finished.sh
Harald Hoyer 55891e
     inst_hook pre-trigger 30 "$moddir/parse-md.sh"