From: Marcin Krol Date: Fri, 25 Jul 2014 16:52:28 +0000 (+0000) Subject: - don't try to assemble arrays if there are some in /proc/mdstat already X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=40dc24b6d0b361af756c619d8917788ccf114672;p=packages%2Frc-scripts.git - don't try to assemble arrays if there are some in /proc/mdstat already (removes "FAIL" when trying to activate already active arrays) --- diff --git a/rc-scripts-raid.patch b/rc-scripts-raid.patch index c2d6d76..72bf0d9 100644 --- a/rc-scripts-raid.patch +++ b/rc-scripts-raid.patch @@ -1,7 +1,7 @@ diff -ur rc-scripts-0.4.12.orig/rc.d/rc.sysinit rc-scripts-0.4.12/rc.d/rc.sysinit --- rc-scripts-0.4.12.orig/rc.d/rc.sysinit 2014-06-19 20:04:44.000000000 +0000 -+++ rc-scripts-0.4.12/rc.d/rc.sysinit 2014-07-22 16:10:23.162000000 +0000 -@@ -305,61 +305,16 @@ ++++ rc-scripts-0.4.12/rc.d/rc.sysinit 2014-07-25 16:08:09.735000000 +0000 +@@ -305,61 +305,18 @@ # mdadm - manage MD devices aka Linux Software RAID init_mdadm() { @@ -19,7 +19,9 @@ diff -ur rc-scripts-0.4.12.orig/rc.d/rc.sysinit rc-scripts-0.4.12/rc.d/rc.sysini - # assume we have md if at least one ARRAY line is present - if grep -qE "^([[:blank:]]|)ARRAY[[:blank:]]" /etc/mdadm.conf; then - have_md=1 -- fi ++ if ! grep -q -E "^md.*active" /proc/mdstat; then ++ run_cmd "Starting up RAID devices" /sbin/mdadm --assemble --scan + fi - # configured to do auto scanning - if [ $have_md = 0 ] && grep -qE "^([[:blank:]]|)DEVICE[[:blank:]]partitions" /etc/mdadm.conf; then - have_md=1 @@ -61,11 +63,10 @@ diff -ur rc-scripts-0.4.12.orig/rc.d/rc.sysinit rc-scripts-0.4.12/rc.d/rc.sysini - fi - show "Starting up RAID devices"; ok - return $rc -+ run_cmd "Starting up RAID devices" /sbin/mdadm --assemble --scan } # Init LVM -@@ -832,7 +787,10 @@ +@@ -832,7 +789,10 @@ fi fi @@ -77,7 +78,7 @@ diff -ur rc-scripts-0.4.12.orig/rc.d/rc.sysinit rc-scripts-0.4.12/rc.d/rc.sysini if ! is_no "$LVM2"; then init_lvm fi -@@ -844,10 +802,6 @@ +@@ -844,10 +804,6 @@ [ $delay_cryptsetup = 0 ] && ok || fail fi