mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
test: Clean-up pvmove-basic for atomic pvmove test
The way I was testing for the existence of pvmove mimages was incorrect for rhel5. This patch makes it more generic/universal.
This commit is contained in:
parent
e96a4856e6
commit
57faf97e6f
@ -71,7 +71,7 @@ check_and_cleanup_lvs_() {
|
|||||||
vgchange -an $vg
|
vgchange -an $vg
|
||||||
lvremove -ff $vg
|
lvremove -ff $vg
|
||||||
(dm_table | not grep $vg) || \
|
(dm_table | not grep $vg) || \
|
||||||
die "ERROR: lvremove did leave some some mappings in DM behind!"
|
die "ERROR: lvremove did leave some mappings in DM behind!"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
@ -346,16 +346,13 @@ pvmove $mode "$dev1"
|
|||||||
#COMM "pvmove fails activating mirror, properly restores state before pvmove"
|
#COMM "pvmove fails activating mirror, properly restores state before pvmove"
|
||||||
dmsetup create $vg-pvmove0 --notable
|
dmsetup create $vg-pvmove0 --notable
|
||||||
not pvmove $mode -i 1 "$dev2"
|
not pvmove $mode -i 1 "$dev2"
|
||||||
echo BARF
|
|
||||||
dmsetup ls
|
|
||||||
dmsetup info --noheadings -c -o suspended $vg-$lv1
|
dmsetup info --noheadings -c -o suspended $vg-$lv1
|
||||||
test $(dmsetup info --noheadings -c -o suspended $vg-$lv1) = "Active"
|
test $(dmsetup info --noheadings -c -o suspended $vg-$lv1) = "Active"
|
||||||
if [ -e /dev/mapper/$vg-pvmove0_mimage_0 ]; then
|
if dmsetup info $vg-pvmove0_mimage_0 > /dev/null; then
|
||||||
dmsetup remove $vg-pvmove0 /dev/mapper/$vg-pvmove0_mimage*
|
dmsetup remove $vg-pvmove0 $vg-pvmove0_mimage_0 $vg-pvmove0_mimage_1
|
||||||
else
|
else
|
||||||
dmsetup remove $vg-pvmove0
|
dmsetup remove $vg-pvmove0
|
||||||
fi
|
fi
|
||||||
dmsetup ls
|
|
||||||
|
|
||||||
lvremove -ff $vg
|
lvremove -ff $vg
|
||||||
done
|
done
|
Loading…
x
Reference in New Issue
Block a user