mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
tests: updates
This commit is contained in:
parent
bd805ff048
commit
a512ea6a6a
@ -78,7 +78,6 @@ should "$LVM_TEST_THIN_CHECK_CMD" "$DM_DEV_DIR/$vg/fixed"
|
|||||||
|
|
||||||
# Swap repaired metadata back
|
# Swap repaired metadata back
|
||||||
lvconvert -y -f --poolmetadata $vg/fixed --thinpool $vg/pool
|
lvconvert -y -f --poolmetadata $vg/fixed --thinpool $vg/pool
|
||||||
lvs -a $vg
|
|
||||||
|
|
||||||
# Activate pool - this should now work
|
# Activate pool - this should now work
|
||||||
should vgchange -ay $vg
|
should vgchange -ay $vg
|
||||||
|
@ -26,8 +26,8 @@ _check_mlog()
|
|||||||
not grep mlog out
|
not grep mlog out
|
||||||
}
|
}
|
||||||
|
|
||||||
aux lvmconf 'allocation/maximise_cling = 0'
|
aux lvmconf "allocation/maximise_cling = 0" \
|
||||||
aux lvmconf 'allocation/mirror_logs_require_separate_pvs = 1'
|
"allocation/mirror_logs_require_separate_pvs = 1"
|
||||||
|
|
||||||
# fail multiple devices
|
# fail multiple devices
|
||||||
|
|
||||||
|
@ -116,9 +116,9 @@ lvcreate -l 18 -n lv $vg "$dev1"
|
|||||||
lvcreate --type raid1 -m 1 -l 100%FREE -n raid1 $vg "$dev1" "$dev2"
|
lvcreate --type raid1 -m 1 -l 100%FREE -n raid1 $vg "$dev1" "$dev2"
|
||||||
check lv_field $vg/raid1 size "9.00m"
|
check lv_field $vg/raid1 size "9.00m"
|
||||||
# Ensure image size is the same as the RAID1 size
|
# Ensure image size is the same as the RAID1 size
|
||||||
check lv_field $vg/raid1 size `lvs --noheadings -o size $vg/raid1_rimage_0`
|
check lv_field $vg/raid1 size $(get lv_field $vg/raid1_rimage_0 size -a)
|
||||||
# Amount remaining in dev2 should equal the amount taken by 'lv' in dev1
|
# Amount remaining in dev2 should equal the amount taken by 'lv' in dev1
|
||||||
check pv_field "$dev2" pv_free `lvs --noheadings -o size $vg/lv`
|
check pv_field "$dev2" pv_free $(get lv_field $vg/lv size)
|
||||||
lvremove -ff $vg
|
lvremove -ff $vg
|
||||||
|
|
||||||
# Eat 18 of 37 extents from dev1, leaving 19
|
# Eat 18 of 37 extents from dev1, leaving 19
|
||||||
|
@ -20,7 +20,7 @@ aux disable_dev "$dev1"
|
|||||||
pvscan
|
pvscan
|
||||||
vgcreate $vg1 "$dev2"
|
vgcreate $vg1 "$dev2"
|
||||||
aux enable_dev "$dev1"
|
aux enable_dev "$dev1"
|
||||||
pvs
|
pvs $(cat DEVICES)
|
||||||
|
|
||||||
# reappearing device (rhbz 995440)
|
# reappearing device (rhbz 995440)
|
||||||
lvcreate -aey -m2 --type mirror -l4 --alloc anywhere --corelog -n $lv1 $vg2
|
lvcreate -aey -m2 --type mirror -l4 --alloc anywhere --corelog -n $lv1 $vg2
|
||||||
@ -30,7 +30,7 @@ lvconvert --yes --repair $vg2/$lv1
|
|||||||
aux enable_dev "$dev3"
|
aux enable_dev "$dev3"
|
||||||
|
|
||||||
# here it should fix any reappeared devices
|
# here it should fix any reappeared devices
|
||||||
lvs
|
lvs $vg1 $vg1
|
||||||
|
|
||||||
lvs -a $vg2 -o+devices 2>&1 | tee out
|
lvs -a $vg2 -o+devices 2>&1 | tee out
|
||||||
not grep reappeared out
|
not grep reappeared out
|
||||||
|
@ -45,29 +45,27 @@ done
|
|||||||
pvcreate --metadatacopies 0 "$dev1"
|
pvcreate --metadatacopies 0 "$dev1"
|
||||||
pvcreate --metadatacopies 2 "$dev2"
|
pvcreate --metadatacopies 2 "$dev2"
|
||||||
vgcreate $vg1 "$dev1" "$dev2"
|
vgcreate $vg1 "$dev1" "$dev2"
|
||||||
|
|
||||||
pvchange -u "$dev1"
|
pvchange -u "$dev1"
|
||||||
pvchange -u "$dev2"
|
pvchange -u "$dev2"
|
||||||
check pvlv_counts $vg1 2 0 0
|
UUID=$(get pv_field "$dev1" uuid)
|
||||||
|
|
||||||
# -a needs more params
|
|
||||||
not pvchange -a
|
|
||||||
# -a is searching for devs, so passing it some is error
|
|
||||||
not pvchange -a "$dev1"
|
|
||||||
not pvchange -u "$dev1-notfound"
|
|
||||||
|
|
||||||
pvchange -u --all
|
pvchange -u --all
|
||||||
|
# Checking for different UUID after pvchange
|
||||||
|
test "$UUID" != "$(get pv_field "$dev1" uuid)" || die "UUID has not changed!"
|
||||||
check pvlv_counts $vg1 2 0 0
|
check pvlv_counts $vg1 2 0 0
|
||||||
|
|
||||||
# "pvchange rejects uuid change under an active lv"
|
# '-a' needs more params
|
||||||
|
invalid pvchange -a
|
||||||
|
# '-a' is searching for devs, so specifying device is invalid
|
||||||
|
invalid pvchange -a "$dev1"
|
||||||
|
fail pvchange -u "$dev1-notfound"
|
||||||
|
|
||||||
|
# pvchange rejects uuid change under an active lv
|
||||||
lvcreate -l 16 -i 2 -n $lv --alloc anywhere $vg1
|
lvcreate -l 16 -i 2 -n $lv --alloc anywhere $vg1
|
||||||
check pvlv_counts $vg1 2 1 0
|
check pvlv_counts $vg1 2 1 0
|
||||||
not pvchange -u "$dev1"
|
not pvchange -u "$dev1"
|
||||||
lvchange -an $vg1/$lv
|
|
||||||
pvchange -u "$dev1"
|
|
||||||
|
|
||||||
# "cleanup"
|
vgremove -f $vg1
|
||||||
lvremove -f $vg1/$lv
|
|
||||||
vgremove $vg1
|
|
||||||
|
|
||||||
# "pvchange reject --addtag to lvm1 pv"
|
# "pvchange reject --addtag to lvm1 pv"
|
||||||
pvcreate -M1 "$dev1"
|
pvcreate -M1 "$dev1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user