]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
Don't fail if arrays are already assembled (ex raid10 with 4 devices, one device...
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 3 Jul 2018 13:13:45 +0000 (15:13 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 3 Jul 2018 13:13:45 +0000 (15:13 +0200)
rc.d/rc.sysinit

index 99bb078ee10ada6c3495557a28e994ac5033dd49..6fdca19f8448013b5544ac579ba22b48031374c2 100755 (executable)
@@ -326,8 +326,15 @@ init_mdadm() {
        fi
 
        show "Starting up RAID devices"; busy
-       /sbin/mdadm --assemble --scan --auto=yes
+       mdadm_out=$(/sbin/mdadm --assemble --scan --auto=yes 2>&1)
        rc=$?
+
+       if (echo -n "$mdadm_out" | grep -q "Found some drive for an array that is already active:"); then
+               rc=0
+       fi
+
+       echo -n "$MDADM_OUT" >&2
+
        if [ "$rc" -eq 0 -o "$rc" -eq 2 ]; then
                # rc is used later too, so set sane value
                rc=0
This page took 0.110747 seconds and 4 git commands to generate.