From patchwork Fri Feb 26 23:37:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonthan Brassow X-Patchwork-Id: 82510 Received: from mx01.colomx.prod.int.phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1QNnmfE017510 for ; Fri, 26 Feb 2010 23:50:24 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx01.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1QNleG3002945; Fri, 26 Feb 2010 18:47:41 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1QNbHpd021780 for ; Fri, 26 Feb 2010 18:37:17 -0500 Received: from hydrogen.msp.redhat.com (hydrogen.msp.redhat.com [10.15.80.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1QNbA1T029054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 26 Feb 2010 18:37:11 -0500 Received: from hydrogen.msp.redhat.com (localhost.localdomain [127.0.0.1]) by hydrogen.msp.redhat.com (8.14.1/8.14.1) with ESMTP id o1QNbA9B024643 for ; Fri, 26 Feb 2010 17:37:10 -0600 Received: (from jbrassow@localhost) by hydrogen.msp.redhat.com (8.14.1/8.14.1/Submit) id o1QNbA0r024642 for dm-devel@redhat.com; Fri, 26 Feb 2010 17:37:10 -0600 Date: Fri, 26 Feb 2010 17:37:10 -0600 From: Jonathan Brassow Message-Id: <201002262337.o1QNbA0r024642@hydrogen.msp.redhat.com> To: dm-devel@redhat.com X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH 9 of 10] LVM: testsuite additions for mirrored log X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 26 Feb 2010 23:50:25 +0000 (UTC) Index: LVM2/test/t-snapshots-of-mirrors.sh =================================================================== --- LVM2.orig/test/t-snapshots-of-mirrors.sh +++ LVM2/test/t-snapshots-of-mirrors.sh @@ -21,11 +21,11 @@ not lvconvert -m2 $vg/lv # Log conversion (disk -> core) lvconvert --mirrorlog core $vg/lv -# Log conversion (core -> redundant) -not lvconvert --mirrorlog redundant $vg/lv +# Log conversion (core -> mirrored) +lvconvert --mirrorlog mirrored $vg/lv -# Log conversion (redundant -> core) -# lvconvert --mirrorlog core $vg/lv +# Log conversion (mirrored -> core) +lvconvert --mirrorlog core $vg/lv # Log conversion (core -> disk) lvconvert --mirrorlog disk $vg/lv Index: LVM2/test/t-mirror-lvconvert.sh =================================================================== --- LVM2.orig/test/t-mirror-lvconvert.sh +++ LVM2/test/t-mirror-lvconvert.sh @@ -252,6 +252,38 @@ mirrorlog_is_on_ $vg/$lv1 $dev3 check_and_cleanup_lvs_ # --- +# core log to mirrored log + +# change the log type from 'core' to 'mirrored' +prepare_lvs_ +lvcreate -l2 -m1 --mirrorlog core -n $lv1 $vg $dev1 $dev2 +check_mirror_count_ $vg/$lv1 2 +not_sh check_mirror_log_ $vg/$lv1 +lvconvert --mirrorlog mirrored -i1 $vg/$lv1 $dev3 $dev4 +check_no_tmplvs_ $vg/$lv1 +check_mirror_log_ $vg/$lv1 +mimages_are_redundant_ $vg $lv1 + +# --- +# mirrored log to core log + +# change the log type from 'mirrored' to 'core' +lvconvert --mirrorlog core -i1 $vg/$lv1 $dev3 $dev4 +check_no_tmplvs_ $vg/$lv1 +not_sh check_mirror_log_ $vg/$lv1 +mimages_are_redundant_ $vg $lv1 +check_and_cleanup_lvs_ + +# --- +# Linear to mirror with mirrored log using --alloc anywhere +prepare_lvs_ +lvcreate -l2 -n $lv1 $vg $dev1 +lvconvert -m +1 --mirrorlog mirrored $vg/$lv1 $dev1 $dev2 --alloc anywhere +mimages_are_redundant_ $vg $lv1 +check_and_cleanup_lvs_ + + +# --- # check polldaemon restarts # convert inactive mirror and start polling Index: LVM2/test/t-lvcreate-operation.sh =================================================================== --- LVM2.orig/test/t-lvcreate-operation.sh +++ LVM2/test/t-lvcreate-operation.sh @@ -25,9 +25,18 @@ aux prepare_pvs 2 aux pvcreate --metadatacopies 0 $dev1 aux vgcreate -c n $vg $devs -#COMM create snapshots of LVs on --metadatacopies 0 PV (bz450651) +# --- +# Create snapshots of LVs on --metadatacopies 0 PV (bz450651) lvcreate -n$lv1 -l4 $vg $dev1 lvcreate -n$lv2 -l4 -s $vg/$lv1 -#lvremove -f $vg/$lv2 cleanup_lvs +# --- +# Create mirror on two devices with mirrored log using --alloc anywhere +lvcreate -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere $dev1 $dev2 +cleanup_lvs + +# -- +# Create mirror on one dev with mirrored log using --alloc anywhere, should fail +lvcreate -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere $dev1 +cleanup_lvs