mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: enable vg repair tests with lvmlockd
This commit is contained in:
parent
6cd0523337
commit
05ee83579b
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
@ -74,7 +74,7 @@ vgremove -f $vg
|
||||
pvremove -ff "${DEVICES[@]}"
|
||||
pvcreate "${DEVICES[@]}"
|
||||
aux backup_dev "$dev2"
|
||||
vgcreate $vg "$dev1"
|
||||
vgcreate $SHARED $vg "$dev1"
|
||||
vgextend $vg "$dev2"
|
||||
aux restore_dev "$dev2"
|
||||
vgscan $cache
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
|
||||
. lib/inittest
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
|
||||
. lib/inittest
|
||||
|
||||
@ -32,7 +32,7 @@ vgremove -ff $vg
|
||||
|
||||
# 3-way, disk log
|
||||
# multiple failures, partial replace
|
||||
vgcreate $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5"
|
||||
vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5"
|
||||
lvcreate -aey --mirrorlog disk --type mirror -m 2 --ignoremonitoring --nosync -L 1 -n 3way $vg "$dev1" "$dev2" "$dev3" "$dev4"
|
||||
aux disable_dev "$dev1" "$dev2"
|
||||
lvconvert -y --repair $vg/3way 2>&1 | tee 3way.out
|
||||
@ -43,7 +43,7 @@ check mirror $vg 3way
|
||||
aux enable_dev "$dev1" "$dev2"
|
||||
vgremove -ff $vg
|
||||
|
||||
vgcreate $vg "$dev1" "$dev2" "$dev3"
|
||||
vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3"
|
||||
lvcreate -aey --mirrorlog disk --type mirror -m 1 --ignoremonitoring --nosync -l 1 -n 2way $vg "$dev1" "$dev2" "$dev3"
|
||||
aux disable_dev "$dev1"
|
||||
lvconvert -y --repair $vg/2way 2>&1 | tee 2way.out
|
||||
@ -61,7 +61,7 @@ test -e LOCAL_CLVMD && exit 0
|
||||
|
||||
# Test repair of inactive mirror with log failure
|
||||
# Replacement should fail, but convert should succeed (switch to corelog)
|
||||
vgcreate $vg "$dev1" "$dev2" "$dev3" "$dev4"
|
||||
vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" "$dev4"
|
||||
lvcreate -aey --type mirror -m 2 --ignoremonitoring -l 2 -n mirror2 $vg "$dev1" "$dev2" "$dev3" "$dev4":0
|
||||
vgchange -a n $vg
|
||||
pvremove -ff -y "$dev4"
|
||||
@ -73,7 +73,7 @@ vgremove -ff $vg
|
||||
if aux kernel_at_least 3 0 0; then
|
||||
# 2-way, mirrored log
|
||||
# Double log failure, full replace
|
||||
vgcreate $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
|
||||
vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
|
||||
lvcreate -aey --mirrorlog mirrored --type mirror -m 1 --ignoremonitoring --nosync -L 1 -n 2way $vg \
|
||||
"$dev1" "$dev2" "$dev3":0 "$dev4":0
|
||||
aux disable_dev "$dev3" "$dev4"
|
||||
@ -88,7 +88,7 @@ fi
|
||||
|
||||
# 3-way, mirrored log
|
||||
# Single log failure, replace
|
||||
vgcreate $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
|
||||
vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
|
||||
lvcreate -aey --mirrorlog mirrored --type mirror -m 2 --ignoremonitoring --nosync -L 1 -n 3way $vg \
|
||||
"$dev1" "$dev2" "$dev3" "$dev4":0 "$dev5":0
|
||||
aux disable_dev "$dev4"
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
@ -10,14 +10,14 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_devs 3
|
||||
|
||||
vgcreate --metadatasize 128k $vg1 "$dev1" "$dev2" "$dev3"
|
||||
vgcreate $SHARED --metadatasize 128k $vg1 "$dev1" "$dev2" "$dev3"
|
||||
|
||||
vgreduce $vg1 "$dev1"
|
||||
dd if="$dev1" of=badmda bs=256K count=1
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_CLVMD=1
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
@ -30,18 +30,18 @@ do
|
||||
pvcreate -M$mdatype "$dev1" "$dev2"
|
||||
|
||||
# (lvm$mdatype) vgreduce removes only the specified pv from vg (bz427382)" '
|
||||
vgcreate -M$mdatype $vg1 "$dev1" "$dev2"
|
||||
vgcreate $SHARED -M$mdatype $vg1 "$dev1" "$dev2"
|
||||
vgreduce $vg1 "$dev1"
|
||||
check pv_field "$dev2" vg_name $vg1
|
||||
vgremove -f $vg1
|
||||
|
||||
# (lvm$mdatype) vgreduce rejects removing the last pv (--all)
|
||||
vgcreate -M$mdatype $vg1 "$dev1" "$dev2"
|
||||
vgcreate $SHARED -M$mdatype $vg1 "$dev1" "$dev2"
|
||||
not vgreduce --all $vg1
|
||||
vgremove -f $vg1
|
||||
|
||||
# (lvm$mdatype) vgreduce rejects removing the last pv
|
||||
vgcreate -M$mdatype $vg1 "$dev1" "$dev2"
|
||||
vgcreate $SHARED -M$mdatype $vg1 "$dev1" "$dev2"
|
||||
not vgreduce $vg1 "$dev1" "$dev2"
|
||||
vgremove -f $vg1
|
||||
|
||||
@ -55,13 +55,13 @@ pvcreate -M$mdatype "$dev1" "$dev2"
|
||||
pvcreate --metadatacopies 0 -M$mdatype "$dev3" "$dev4"
|
||||
|
||||
# (lvm$mdatype) vgreduce rejects removing pv with the last mda copy (bz247448)
|
||||
vgcreate -M$mdatype $vg1 "$dev1" "$dev3"
|
||||
vgcreate $SHARED -M$mdatype $vg1 "$dev1" "$dev3"
|
||||
not vgreduce $vg1 "$dev1"
|
||||
vgremove -f $vg1
|
||||
|
||||
#COMM "(lvm$mdatype) vgreduce --removemissing --force repares to linear (bz221921)"
|
||||
# (lvm$mdatype) setup: create mirror & damage one pv
|
||||
vgcreate -M$mdatype $vg1 "$dev1" "$dev2" "$dev3"
|
||||
vgcreate $SHARED -M$mdatype $vg1 "$dev1" "$dev2" "$dev3"
|
||||
lvcreate -aey -n $lv1 --type mirror -m1 -l 4 $vg1
|
||||
lvcreate -n $lv2 -l 4 $vg1 "$dev2"
|
||||
lvcreate -n $lv3 -l 4 $vg1 "$dev3"
|
||||
@ -79,7 +79,7 @@ not vgs $vg1 # just double-check it's really gone
|
||||
|
||||
#COMM "vgreduce rejects --removemissing --mirrorsonly --force when nonmirror lv lost too"
|
||||
# (lvm$mdatype) setup: create mirror + linear lvs
|
||||
vgcreate -M$mdatype "$vg1" "${DEVICES[@]}"
|
||||
vgcreate $SHARED -M$mdatype "$vg1" "${DEVICES[@]}"
|
||||
lvcreate -n $lv2 -l 4 $vg1
|
||||
lvcreate -aey --type mirror -m1 -n $lv1 -l 4 $vg1 "$dev1" "$dev2" "$dev3"
|
||||
lvcreate -n $lv3 -l 4 $vg1 "$dev3"
|
||||
|
Loading…
Reference in New Issue
Block a user