Testing in cluster makes sense only with clustered VG.
# Utilities
create_vg_() {
- vgcreate -c n -s 128k "$vg" "${DEVICES[@]}"
+ vgcreate -s 128k "$vg" "${DEVICES[@]}"
}
# ---------------------------------------------------------------------
# Common environment setup/cleanup for each sub testcases
prepare_lvs_() {
- lvcreate -l2 -n $lv1 $vg "$dev1"
+ lvcreate -aey -l2 -n $lv1 $vg "$dev1"
check lv_on $vg $lv1 "$dev1"
- lvcreate -l9 -i3 -n $lv2 $vg "$dev2" "$dev3" "$dev4"
+ lvcreate -aey -l9 -i3 -n $lv2 $vg "$dev2" "$dev3" "$dev4"
check lv_on $vg $lv2 "$dev2" "$dev3" "$dev4"
lvextend -l+2 $vg/$lv1 "$dev2"
check lv_on $vg $lv1 "$dev1" "$dev2"
# original content should be preserved
restore_lvs_() {
vgcfgrestore -f bak-$$ $vg
- vgchange -ay $vg
+ vgchange -aey $vg
}
lvs_not_changed_() {
pvcreate "${DEVICES[@]}"
pvcreate --metadatacopies 0 "$dev1" "$dev2"
create_vg_
-lvcreate -l4 -n $lv1 $vg "$dev1"
+lvcreate -aey -l4 -n $lv1 $vg "$dev1"
pvmove $mode "$dev1"
#COMM "pvmove fails activating mirror, properly restores state before pvmove"
aux prepare_pvs 5 20
get_devs
-vgcreate -c n -s 128k "$vg" "${DEVICES[@]}"
+vgcreate -s 128k "$vg" "${DEVICES[@]}"
for mode in "--atomic" ""
do
# 3) Move only the second LV by name
# Testing pvmove of RAID1 LV
-lvcreate -l 2 -n ${lv1}_foo $vg "$dev1"
-lvcreate --regionsize 16K -l 2 --type raid1 -m 1 -n $lv1 $vg "$dev1" "$dev2"
+lvcreate -aey -l 2 -n ${lv1}_foo $vg "$dev1"
+lvcreate -aey --regionsize 16K -l 2 --type raid1 -m 1 -n $lv1 $vg "$dev1" "$dev2"
check lv_tree_on $vg ${lv1}_foo "$dev1"
check lv_tree_on $vg $lv1 "$dev1" "$dev2"
aux mkdev_md5sum $vg $lv1
lvremove -ff $vg
# Testing pvmove of RAID10 LV
-lvcreate -l 2 -n ${lv1}_foo $vg "$dev1"
-lvcreate -l 4 --type raid10 -i 2 -m 1 -n $lv1 $vg \
+lvcreate -aey -l 2 -n ${lv1}_foo $vg "$dev1"
+lvcreate -aey -l 4 --type raid10 -i 2 -m 1 -n $lv1 $vg \
"$dev1" "$dev2" "$dev3" "$dev4"
check lv_tree_on $vg ${lv1}_foo "$dev1"
check lv_tree_on $vg $lv1 "$dev1" "$dev2" "$dev3" "$dev4"
lvremove -ff $vg
# Testing pvmove of RAID5 LV
-lvcreate -l 2 -n ${lv1}_foo $vg "$dev1"
-lvcreate -l 4 --type raid5 -i 2 -n $lv1 $vg \
+lvcreate -aey -l 2 -n ${lv1}_foo $vg "$dev1"
+lvcreate -aey -l 4 --type raid5 -i 2 -n $lv1 $vg \
"$dev1" "$dev2" "$dev3"
check lv_tree_on $vg ${lv1}_foo "$dev1"
check lv_tree_on $vg $lv1 "$dev1" "$dev2" "$dev3"
aux prepare_pvs 5 20
get_devs
-vgcreate -c n -s 128k "$vg" "${DEVICES[@]}"
+vgcreate -s 128k "$vg" "${DEVICES[@]}"
for mode in "--atomic" ""
do
# Testing pvmove of thin LV
-lvcreate -l 2 -n ${lv1}_foo $vg "$dev1"
-lvcreate -T $vg/${lv1}_pool -l 4 -V 8 -n $lv1 "$dev1"
+lvcreate -aey -l 2 -n ${lv1}_foo $vg "$dev1"
+lvcreate -aey -T $vg/${lv1}_pool -l 4 -V 8 -n $lv1 "$dev1"
check lv_tree_on $vg ${lv1}_foo "$dev1"
check lv_tree_on $vg $lv1 "$dev1"
aux mkdev_md5sum $vg $lv1
lvremove -ff $vg
# Testing pvmove of thin LV on RAID
-lvcreate -l 2 -n ${lv1}_foo $vg "$dev1"
-lvcreate --type raid1 -m 1 -l 4 -n ${lv1}_raid1_pool $vg "$dev1" "$dev2"
-lvcreate --type raid1 -m 1 -L 2 -n ${lv1}_raid1_meta $vg "$dev1" "$dev2"
+lvcreate -aey -l 2 -n ${lv1}_foo $vg "$dev1"
+lvcreate -aey --type raid1 -m 1 -l 4 -n ${lv1}_raid1_pool $vg "$dev1" "$dev2"
+lvcreate -aey --type raid1 -m 1 -L 2 -n ${lv1}_raid1_meta $vg "$dev1" "$dev2"
lvconvert --yes --thinpool $vg/${lv1}_raid1_pool \
--poolmetadata ${lv1}_raid1_meta
-lvcreate -T $vg/${lv1}_raid1_pool -V 8 -n $lv1
+lvcreate -aey -T $vg/${lv1}_raid1_pool -V 8 -n $lv1
check lv_tree_on $vg ${lv1}_foo "$dev1"
check lv_tree_on $vg $lv1 "$dev1" "$dev2"
aux mkdev_md5sum $vg $lv1