mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-03 17:47:44 +03:00
add vgrename by uuid test (Jaroslav Stava)
fix vgsplit rejects last mda copy test (Jaroslav Stava)
This commit is contained in:
parent
7f23ab94e2
commit
9c910b7be2
@ -31,7 +31,8 @@ test_expect_success \
|
|||||||
f4=$(pwd)/4 && d4=$(loop_setup_ "$f4") &&
|
f4=$(pwd)/4 && d4=$(loop_setup_ "$f4") &&
|
||||||
vg1=$(this_test_)-1-$$ &&
|
vg1=$(this_test_)-1-$$ &&
|
||||||
vg2=$(this_test_)-2-$$ &&
|
vg2=$(this_test_)-2-$$ &&
|
||||||
pvcreate $d1 $d2 $d3 $d4'
|
pvcreate $d1 $d2 &&
|
||||||
|
pvcreate --metadatacopies 0 $d3 $d4'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'vgrename normal operation - rename vg1 to vg2' \
|
'vgrename normal operation - rename vg1 to vg2' \
|
||||||
@ -40,6 +41,16 @@ test_expect_success \
|
|||||||
check_vg_field_ $vg2 vg_name $vg2 &&
|
check_vg_field_ $vg2 vg_name $vg2 &&
|
||||||
vgremove $vg2'
|
vgremove $vg2'
|
||||||
|
|
||||||
|
test_expect_success \
|
||||||
|
"vgrename by uuid (bz231187)" '
|
||||||
|
vgcreate $vg1 $d1 $d3 &&
|
||||||
|
UUID=$(vgs --noheading -o vg_uuid $vg1) &&
|
||||||
|
check_vg_field_ $vg1 vg_uuid $UUID &&
|
||||||
|
vgrename $UUID $vg2 &&
|
||||||
|
check_vg_field_ $vg2 vg_name $vg2 &&
|
||||||
|
vgremove $vg2
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# indent-tabs-mode: nil
|
# indent-tabs-mode: nil
|
||||||
|
@ -40,12 +40,11 @@ test_expect_success \
|
|||||||
lv2=$(this_test_)-test-lv2-$$ &&
|
lv2=$(this_test_)-test-lv2-$$ &&
|
||||||
lv3=$(this_test_)-test-lv3-$$'
|
lv3=$(this_test_)-test-lv3-$$'
|
||||||
|
|
||||||
for mdatype in 2
|
for mdatype in 1 2
|
||||||
do
|
do
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
"(lvm$mdatype) setup PVs" \
|
"(lvm$mdatype) setup PVs" \
|
||||||
'pvcreate -M$mdatype $d1 $d2 $d3 $d4 &&
|
'pvcreate -M$mdatype $d1 $d2 $d3 $d4'
|
||||||
pvcreate -M$mdatype --metadatacopies 0 $d5'
|
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
"(lvm$mdatype) vgsplit accepts new vg as destination of split" \
|
"(lvm$mdatype) vgsplit accepts new vg as destination of split" \
|
||||||
@ -200,19 +199,24 @@ test_expect_success \
|
|||||||
status=$?; echo status=$status; test $status = 5 &&
|
status=$?; echo status=$status; test $status = 5 &&
|
||||||
vgremove -f $vg2 &&
|
vgremove -f $vg2 &&
|
||||||
vgremove -f $vg1'
|
vgremove -f $vg1'
|
||||||
|
done
|
||||||
|
|
||||||
|
test_expect_success \
|
||||||
|
"(lvm2) setup PVs" '
|
||||||
|
pvcreate -M$mdatype --metadatacopies 0 $d5'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
"(lvm2) vgsplit rejects to give away pv with the last mda copy" '
|
"(lvm2) vgsplit rejects to give away pv with the last mda copy" '
|
||||||
vgcreate -M$mdatype $vg1 $d5 $d2 &&
|
vgcreate -M2 $vg1 $d5 $d2 &&
|
||||||
lvcreate -l 10 -n $lv1 $vg1 &&
|
lvcreate -l 10 -n $lv1 $vg1 &&
|
||||||
lvchange -an $vg1/$lv1 &&
|
lvchange -an $vg1/$lv1 &&
|
||||||
vg_validate_pvlv_counts_ $vg1 2 1 0 &&
|
vg_validate_pvlv_counts_ $vg1 2 1 0 &&
|
||||||
vgsplit $vg1 $vg2 $d5;
|
{ vgsplit $vg1 $vg2 $d5;
|
||||||
status=$?; echo status=$status; test $status != 0 &&
|
status=$?; echo status=$status; test $status != 0 &&
|
||||||
vg_validate_pvlv_counts_ $vg1 2 1 0 &&
|
vg_validate_pvlv_counts_ $vg1 2 1 0 &&
|
||||||
vgremove -ff $vg1
|
vgremove -ff $vg1
|
||||||
|
}
|
||||||
'
|
'
|
||||||
done
|
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'(lvm2) vgsplit rejects split because metadata types differ' \
|
'(lvm2) vgsplit rejects split because metadata types differ' \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user