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

master
Harald Hoyer 2009-08-31 11:40:05 +02:00
parent 73e649b5f5
commit f4c36b28f6
1 changed files with 8 additions and 3 deletions

View File

@ -10,9 +10,14 @@ if $UDEV_QUEUE_EMPTY >/dev/null 2>&1; then
case $md in
/dev/md*p*) ;;
*)
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