public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test t-mirror-basic.sh
@ 2008-11-10 12:37 mornfall
0 siblings, 0 replies; 2+ messages in thread
From: mornfall @ 2008-11-10 12:37 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall@sourceware.org 2008-11-10 12:37:53
Modified files:
test : t-mirror-basic.sh
Log message:
bz429342 lvcreate --nosync
bz192865 lvconvert logtype of an inactive mirror lv
(both by jstava)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-mirror-basic.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6
--- LVM2/test/t-mirror-basic.sh 2008/11/10 12:32:00 1.5
+++ LVM2/test/t-mirror-basic.sh 2008/11/10 12:37:53 1.6
@@ -168,6 +168,13 @@
mirrorlog_is_on_ $vg/$lv1 $dev3
check_and_cleanup_lvs_
+#COMM "lvcreate --nosync is in 100% sync after creation (bz429342)"
+prepare_lvs_
+lvcreate -l2 -m1 --nosync -n $lv1 $vg $dev1 $dev2 $dev3:0-1 2>out
+grep "New mirror won't be synchronised." out
+lvs -o copy_percent --noheadings $vg/$lv1 |grep 100.00
+check_and_cleanup_lvs_
+
# ---
# convert
@@ -186,20 +193,25 @@
mimages_are_redundant_ $vg $lv1
check_and_cleanup_lvs_
+for status in active inactive; do
+# bz192865 lvconvert log of an inactive mirror lv
#COMM "convert from disklog to corelog"
prepare_lvs_
lvcreate -l2 -m1 -n $lv1 $vg $dev1 $dev2 $dev3:0-1
-lvconvert --mirrorlog core $vg/$lv1
+ test $status = "inactive" && lvchange -an $vg/$lv1
+ yes | lvconvert --mirrorlog core $vg/$lv1
mimages_are_redundant_ $vg $lv1
check_and_cleanup_lvs_
#COMM "convert from corelog to disklog"
prepare_lvs_
lvcreate -l2 -m1 --mirrorlog core -n $lv1 $vg $dev1 $dev2
+ test $status = "inactive" && lvchange -an $vg/$lv1
lvconvert --mirrorlog disk $vg/$lv1 $dev3:0-1
mimages_are_redundant_ $vg $lv1
mirrorlog_is_on_ $vg/$lv1 $dev3
check_and_cleanup_lvs_
+done
# ---
# resize
^ permalink raw reply [flat|nested] 2+ messages in thread
* LVM2/test t-mirror-basic.sh
@ 2008-01-26 0:25 agk
0 siblings, 0 replies; 2+ messages in thread
From: agk @ 2008-01-26 0:25 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-01-26 00:25:45
Modified files:
test : t-mirror-basic.sh
Log message:
.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-mirror-basic.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3
--- LVM2/test/t-mirror-basic.sh 2008/01/17 02:20:48 1.2
+++ LVM2/test/t-mirror-basic.sh 2008/01/26 00:25:45 1.3
@@ -302,6 +302,27 @@
test_expect_success "(cleanup previous test)" \
'check_and_cleanup_lvs_'
+# ---
+# resync
+# FIXME: using dm-delay to properly check whether the resync really started
+
+test_expect_success "force resync 2-way active mirror" \
+ 'prepare_lvs_ &&
+ lvcreate -l2 -m1 -n $lv1 $vg $(pv_ 1) $(pv_ 2) $(pv_ 3):0-1 &&
+ mirrorlog_is_on_ $vg/$lv1 $(pv_ 3) &&
+ yes | lvchange --resync $vg/$lv1 &&
+ mirrorlog_is_on_ $vg/$lv1 $(pv_ 3) &&
+ check_and_cleanup_lvs_'
+
+test_expect_success "force resync 2-way inactive mirror" \
+ 'prepare_lvs_ &&
+ lvcreate -l2 -m1 -n $lv1 $vg $(pv_ 1) $(pv_ 2) $(pv_ 3):0-1 &&
+ lvchange -an $vg/$lv1 &&
+ mirrorlog_is_on_ $vg/$lv1 $(pv_ 3) &&
+ lvchange --resync $vg/$lv1 &&
+ mirrorlog_is_on_ $vg/$lv1 $(pv_ 3) &&
+ check_and_cleanup_lvs_'
+
# ---------------------------------------------------------------------
test_done
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-10 12:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-10 12:37 LVM2/test t-mirror-basic.sh mornfall
-- strict thread matches above, loose matches on Subject: below --
2008-01-26 0:25 agk
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).