teardown_udev_cookies
test ! -f MD_DEV || cleanup_md_dev
-
- test ! -f WAIT_MD_DEV || mddev=$(< WAIT_MD_DEV)
udev_wait
- test ! -f WAIT_MD_DEV || mdadm --stop $mddev || true
+ mdadm --stop --scan || true
udev_wait
test ! -f DEVICES || teardown_devs_prefixed "$PREFIX"
test ! -f RAMDISK || { modprobe -r brd || true ; }
- test ! -f WAIT_MD_DEV || mdadm --stop $mddev || true
+ mdadm --stop --scan || true
# NOTE: SCSI_DEBUG_DEV test must come before the LOOP test because
# prepare_scsi_debug_dev() also sets LOOP to short-circuit prepare_loop()
break
fi
done
- echo "$md" > WAIT_MD_DEV
}
wipefs_a() {
cat /proc/mdstat
# for some reason enabling dev2 starts an odd md dev
mdadm --stop "$mddev" || true
+mdadm --stop --scan
cat /proc/mdstat
aux wipefs_a "$dev1" || true
aux wipefs_a "$dev2" || true
cat /proc/mdstat
# for some reason enabling dev2 starts an odd md dev
mdadm --stop "$mddev" || true
+mdadm --stop --scan
cat /proc/mdstat
aux wipefs_a "$dev1" || true
aux wipefs_a "$dev2" || true
cat /proc/mdstat
# for some reason enabling dev2 starts an odd md dev
mdadm --stop "$mddev" || true
+mdadm --stop --scan
cat /proc/mdstat
aux wipefs_a "$dev1" || true
aux wipefs_a "$dev2" || true
cat /proc/mdstat
# for some reason enabling dev2 starts an odd md dev
mdadm --stop "$mddev" || true
+mdadm --stop --scan
cat /proc/mdstat
aux wipefs_a "$dev1" || true
aux wipefs_a "$dev2" || true
cat /proc/mdstat
# for some reason enabling dev2 starts an odd md dev
mdadm --stop "$mddev" || true
+mdadm --stop --scan
cat /proc/mdstat
aux wipefs_a "$dev1" || true
aux wipefs_a "$dev2" || true