mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
tests: update to md dev name
Use /dev/md33 instead of /dev/md0 to reduce chances of conflicting with an existing name. Only call 'mdadm --stop /dev/md33' for cleanup and don't use 'mdadm --stop --scan' to avoid stopping other md devs.
This commit is contained in:
parent
b138a87f43
commit
c2ff8876f9
@ -421,13 +421,15 @@ teardown_devs() {
|
||||
teardown_udev_cookies
|
||||
|
||||
test ! -f MD_DEV || cleanup_md_dev
|
||||
|
||||
test ! -f WAIT_MD_DEV || mddev=$(< WAIT_MD_DEV)
|
||||
udev_wait
|
||||
mdadm --stop --scan || true
|
||||
test ! -f WAIT_MD_DEV || mdadm --stop $mddev || true
|
||||
udev_wait
|
||||
test ! -f DEVICES || teardown_devs_prefixed "$PREFIX"
|
||||
test ! -f RAMDISK || { modprobe -r brd || true ; }
|
||||
|
||||
mdadm --stop --scan || true
|
||||
test ! -f WAIT_MD_DEV || mdadm --stop $mddev || 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()
|
||||
@ -792,6 +794,7 @@ wait_md_create() {
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo "$md" > WAIT_MD_DEV
|
||||
}
|
||||
|
||||
prepare_backing_dev() {
|
||||
|
@ -32,7 +32,9 @@ wipefs -V || skip
|
||||
|
||||
test -f /proc/mdstat && grep -q raid0 /proc/mdstat || \
|
||||
modprobe raid0 || skip
|
||||
not grep md0 /proc/mdstat || skip
|
||||
|
||||
mddev="/dev/md33"
|
||||
not grep $mddev /proc/mdstat || skip
|
||||
|
||||
aux lvmconf 'devices/md_component_detection = 1'
|
||||
|
||||
@ -64,7 +66,6 @@ pvcreate "$dev3"
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "auto"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 0 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -137,7 +138,6 @@ aux udev_wait
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "start"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 0 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -210,7 +210,6 @@ aux udev_wait
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "auto"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 0 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -266,7 +265,6 @@ aux udev_wait
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "start"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 0 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -327,7 +325,6 @@ aux udev_wait
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "start"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 0 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -374,7 +371,6 @@ aux aux udev_wait
|
||||
cat /proc/mdstat
|
||||
# for some reason enabling dev2 starts an odd md dev
|
||||
mdadm --stop "$mddev" || true
|
||||
mdadm --stop --scan
|
||||
cat /proc/mdstat
|
||||
wipefs -a "$dev1" || true
|
||||
wipefs -a "$dev2" || true
|
||||
@ -389,7 +385,6 @@ aux udev_wait
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "auto"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 0 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -441,7 +436,6 @@ aux aux udev_wait
|
||||
cat /proc/mdstat
|
||||
# for some reason enabling dev2 starts an odd md dev
|
||||
mdadm --stop "$mddev" || true
|
||||
mdadm --stop --scan
|
||||
cat /proc/mdstat
|
||||
wipefs -a "$dev1" || true
|
||||
wipefs -a "$dev2" || true
|
||||
|
@ -37,7 +37,9 @@ wipefs -V || skip
|
||||
|
||||
test -f /proc/mdstat && grep -q raid1 /proc/mdstat || \
|
||||
modprobe raid1 || skip
|
||||
not grep md0 /proc/mdstat || skip
|
||||
|
||||
mddev="/dev/md33"
|
||||
not grep $mddev /proc/mdstat || skip
|
||||
|
||||
aux lvmconf 'devices/md_component_detection = 1'
|
||||
|
||||
@ -69,7 +71,6 @@ pvcreate "$dev3"
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "auto"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 1 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -143,7 +144,6 @@ aux udev_wait
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "start"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 1 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -229,7 +229,6 @@ aux udev_wait
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "auto"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 1 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -294,7 +293,6 @@ aux udev_wait
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "start"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 1 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -363,7 +361,6 @@ wipefs -a "$dev2" || true
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "start"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 1 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -421,7 +418,6 @@ aux udev_wait
|
||||
cat /proc/mdstat
|
||||
# for some reason enabling dev2 starts an odd md dev
|
||||
mdadm --stop "$mddev" || true
|
||||
mdadm --stop --scan
|
||||
cat /proc/mdstat
|
||||
wipefs -a "$dev1" || true
|
||||
wipefs -a "$dev2" || true
|
||||
@ -435,7 +431,6 @@ wipefs -a "$dev2" || true
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "auto"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 1 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -487,7 +482,6 @@ aux udev_wait
|
||||
cat /proc/mdstat
|
||||
# for some reason enabling dev2 starts an odd md dev
|
||||
mdadm --stop "$mddev" || true
|
||||
mdadm --stop --scan
|
||||
cat /proc/mdstat
|
||||
wipefs -a "$dev1" || true
|
||||
wipefs -a "$dev2" || true
|
||||
@ -502,7 +496,6 @@ wipefs -a "$dev2" || true
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "auto"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 1 --chunk=64 --raid-devices=3 "$dev1" "$dev2" "$dev4"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -567,7 +560,6 @@ aux udev_wait
|
||||
|
||||
aux lvmconf 'devices/md_component_checks = "start"'
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 1 --chunk=64 --raid-devices=3 "$dev1" "$dev2" "$dev4"
|
||||
aux wait_md_create "$mddev"
|
||||
pvcreate "$mddev"
|
||||
@ -628,7 +620,6 @@ aux udev_wait
|
||||
cat /proc/mdstat
|
||||
# for some reason enabling dev2 starts an odd md dev
|
||||
mdadm --stop "$mddev" || true
|
||||
mdadm --stop --scan
|
||||
cat /proc/mdstat
|
||||
wipefs -a "$dev1" || true
|
||||
wipefs -a "$dev2" || true
|
||||
|
@ -32,7 +32,9 @@ wipefs -V || skip
|
||||
|
||||
test -f /proc/mdstat && grep -q raid1 /proc/mdstat || \
|
||||
modprobe raid1 || skip
|
||||
not grep md0 /proc/mdstat || skip
|
||||
|
||||
mddev="/dev/md33"
|
||||
not grep $mddev /proc/mdstat || skip
|
||||
|
||||
aux lvmconf 'devices/md_component_detection = 1'
|
||||
|
||||
@ -52,7 +54,6 @@ aux prepare_devs 3
|
||||
# create 2 disk MD raid1 array
|
||||
# by default using metadata format 1.0 with data at the end of device
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 1 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
vgcreate $vg "$mddev"
|
||||
@ -177,7 +178,6 @@ aux udev_wait
|
||||
# When a raid0 md array is stopped, the components will not look like
|
||||
# duplicate PVs as they do with raid1.
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 0 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
vgcreate $vg "$mddev"
|
||||
@ -308,7 +308,6 @@ aux lvmconf 'devices/obtain_device_list_from_udev = 1'
|
||||
# When a raid0 md array is stopped, the components will not look like
|
||||
# duplicate PVs as they do with raid1.
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 0 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
|
||||
|
@ -22,7 +22,8 @@ wipefs -V || skip
|
||||
|
||||
test -f /proc/mdstat && grep -q raid0 /proc/mdstat || \
|
||||
modprobe raid0 || skip
|
||||
not grep md0 /proc/mdstat || skip
|
||||
mddev="/dev/md33"
|
||||
not grep $mddev /proc/mdstat || skip
|
||||
|
||||
aux lvmconf 'devices/md_component_detection = 1'
|
||||
aux extend_filter_md "a|/dev/md|"
|
||||
@ -30,7 +31,6 @@ aux extend_filter_md "a|/dev/md|"
|
||||
aux prepare_devs 2
|
||||
|
||||
# create 2 disk MD raid0 array (stripe_width=128K)
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 0 --chunk=64 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
|
||||
@ -122,7 +122,6 @@ aux udev_wait
|
||||
# Test newer topology-aware alignment detection w/ --dataalignment override
|
||||
if aux kernel_at_least 2 6 33 ; then
|
||||
|
||||
mddev="/dev/md0"
|
||||
mdadm --create --metadata=1.0 "$mddev" --level 0 --chunk=1024 --raid-devices=2 "$dev1" "$dev2"
|
||||
aux wait_md_create "$mddev"
|
||||
pvdev="$mddev"
|
||||
|
Loading…
Reference in New Issue
Block a user