public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test t-metadata.sh
@ 2010-10-26 12:52 mornfall
0 siblings, 0 replies; 2+ messages in thread
From: mornfall @ 2010-10-26 12:52 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall@sourceware.org 2010-10-26 12:52:25
Modified files:
test : t-metadata.sh
Log message:
Let's rely on the exit code and do not test for empty output.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-metadata.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6
--- LVM2/test/t-metadata.sh 2010/08/16 23:21:20 1.5
+++ LVM2/test/t-metadata.sh 2010/10/26 12:52:25 1.6
@@ -36,13 +36,11 @@
lvcreate -n $lv1 -l 2 -i5 -I256 $vg
lvcreate -n $lv2 -m2 -l 2 $vg
#lvchange -an $vg
- lvchange -an $vg/$lv1 >out$mdacp 2>&1
- lvchange -an $vg/$lv2 >>out$mdacp 2>&1
- test ! -s out$mdacp
+ lvchange -an $vg/$lv1
+ lvchange -an $vg/$lv2
vgchange -ay $vg
lvchange -vvvv -an $vg/$lv1 >out$mdacp 2>&1
lvchange -vvvv -an $vg/$lv2 >>out$mdacp 2>&1
- eval run$mdacp=$(wc -l <out$mdacp)
vgremove -f $vg
done
not grep "Cached VG .* incorrect PV list" out0
^ permalink raw reply [flat|nested] 2+ messages in thread
* LVM2/test t-metadata.sh
@ 2010-08-16 23:21 snitzer
0 siblings, 0 replies; 2+ messages in thread
From: snitzer @ 2010-08-16 23:21 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: snitzer@sourceware.org 2010-08-16 23:21:20
Modified files:
test : t-metadata.sh
Log message:
Add some v1 to v2 metadata upgrade testing.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-metadata.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5
--- LVM2/test/t-metadata.sh 2009/12/28 18:33:04 1.4
+++ LVM2/test/t-metadata.sh 2010/08/16 23:21:20 1.5
@@ -51,5 +51,32 @@
pvcreate -M1 $dev1
pvcreate -M1 $dev2
pvcreate -M1 $dev3
+pv3_uuid=$(pvs --noheadings -o pv_uuid $dev3)
vgcreate -M1 -c n $vg $dev1 $dev2 $dev3
pvchange --uuid $dev1
+
+# verify pe_start of all M1 PVs
+pv_align="128.00k"
+check_pv_field_ $dev1 pe_start $pv_align
+check_pv_field_ $dev2 pe_start $pv_align
+check_pv_field_ $dev3 pe_start $pv_align
+
+pvs --units k -o name,pe_start,vg_mda_size,vg_name
+
+# upgrade from v1 to v2 metadata
+vgconvert -M2 $vg
+
+# verify pe_start of all M2 PVs
+check_pv_field_ $dev1 pe_start $pv_align
+check_pv_field_ $dev2 pe_start $pv_align
+check_pv_field_ $dev3 pe_start $pv_align
+
+pvs --units k -o name,pe_start,vg_mda_size,vg_name
+
+# create backup and then restore $dev3
+vgcfgbackup -f $TESTDIR/bak-%s $vg
+pvcreate -ff -y --restorefile $TESTDIR/bak-$vg --uuid $pv3_uuid $dev3
+vgcfgrestore -f $TESTDIR/bak-$vg $vg
+
+# verify pe_start of $dev3
+check_pv_field_ $dev3 pe_start $pv_align
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-26 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-26 12:52 LVM2/test t-metadata.sh mornfall
-- strict thread matches above, loose matches on Subject: below --
2010-08-16 23:21 snitzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).