mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: test vgimportclone and -n option
This commit is contained in:
parent
75420282e1
commit
5bd63df237
@ -71,3 +71,28 @@ lvchange -ay $vg1/$lv1 $vg2/$lv1
|
||||
vgchange -an $vg1 $vg2
|
||||
|
||||
vgremove -ff $vg1 $vg2
|
||||
|
||||
# Verify that if we provide the -n|--basevgname,
|
||||
# the number suffix is not added unnecessarily.
|
||||
vgcreate --metadatasize 128k A${vg1}B "$dev1"
|
||||
|
||||
# vg1B is not the same as Avg1B - we don't need number suffix
|
||||
dd if="$dev1" of="$dev2" bs=256K count=1
|
||||
aux notify_lvmetad "$dev2"
|
||||
vgimportclone -n ${vg1}B "$dev2"
|
||||
check pv_field "$dev2" vg_name ${vg1}B
|
||||
|
||||
# Avg1 is not the same as Avg1B - we don't need number suffix
|
||||
dd if="$dev1" of="$dev2" bs=256K count=1
|
||||
aux notify_lvmetad "$dev2"
|
||||
vgimportclone -n A${vg1} "$dev2"
|
||||
check pv_field "$dev2" vg_name A${vg1}
|
||||
|
||||
# Avg1B is the same as Avg1B - we need to add the number suffix
|
||||
dd if="$dev1" of="$dev2" bs=256K count=1
|
||||
aux notify_lvmetad "$dev2"
|
||||
vgimportclone -n A${vg1}B "$dev2"
|
||||
aux vgs
|
||||
check pv_field "$dev2" vg_name A${vg1}B1
|
||||
|
||||
vgremove -ff A${vg1}B A${vg1}B1
|
||||
|
Loading…
Reference in New Issue
Block a user