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