Browse Source

mdraid_start: check if raid is already active before trying to run it

master
Harald Hoyer 16 years ago
parent
commit
f4c36b28f6
  1. 11
      modules.d/90mdraid/mdraid_start.sh

11
modules.d/90mdraid/mdraid_start.sh

@ -10,9 +10,14 @@ if $UDEV_QUEUE_EMPTY >/dev/null 2>&1; then @@ -10,9 +10,14 @@ if $UDEV_QUEUE_EMPTY >/dev/null 2>&1; then
case $md in
/dev/md*p*) ;;
*)
info "Starting MD RAID array $md"
mdadm -R $md 2>&1 | vinfo
mdadm -IR $md 2>&1 | vinfo
if mdadm --query --test --detail $md 2>&1|grep -q 'does not appear to be active'; then
info "Starting MD RAID array $md"
mdadm -R $md 2>&1 | vinfo
if mdadm --query --test --detail $md 2>&1|grep -q 'does not appear to be active'; then
mdadm -IR $md 2>&1 | vinfo
fi
udevsettle
fi
esac
done
fi

Loading…
Cancel
Save