master - thin: vgsplit support for thins
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fe22089edff17158e6d9264cd671395b2ad6e060 Commit: fe22089edff17158e6d9264cd671395b2ad6e060 Parent: ebf0898d69f53664fa5c1f88207aa8bc970b84fc Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Jun 13 12:05:53 2013 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Jun 13 14:51:00 2013 +0200
thin: vgsplit support for thins
Support vgsplit for VGs with thin pools and thin volumes.
In case the thin data and thin metadata volumes are moved to a new VG, move there also all related thin volumes and check that external origins are also present in this new VG.
--- WHATS_NEW | 1 + test/shell/vgsplit-thin.sh | 39 +++++++++++++++++++++++++++++++ tools/vgsplit.c | 55 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Add support for thin volumes in vgsplit. Also filter partitions on mpath components if multipath_component_detection=1. Add lvresize support for online thin pool metadata volume resize. Add helper functions find_pool_lv() and pool_can_resize_metadata().
test/shell/vgsplit-thin.sh new file +39 -0
@@ -0,0 +1,39 @@ +#!/bin/sh +# Copyright (C) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# Test vgsplit command options for validity + +. lib/test + +aux have_thin 1 0 0 || skip + +aux prepare_devs 5 + +vgcreate $vg1 $(cat DEVICES) +lvcreate -T -L8M $vg1/pool1 -V10M -n $lv1 "$dev1" "$dev2" +lvcreate -T -L8M $vg1/pool2 -V10M -n $lv2 "$dev3" "$dev4" + +# Test with external origin if available +lvcreate -l1 -an -pr --zero n -n eorigin $vg1 "$dev5" +aux have_thin 1 5 0 && lvcreate -an -s $vg1/eorigin -n $lv3 --thinpool $vg1/pool1 + +# Cannot move active thin +not vgsplit $vg1 $vg2 "$dev1" "$dev2" "$dev5" + +vgchange -an $vg1 +not vgsplit $vg1 $vg2 "$dev1" +not vgsplit $vg1 $vg2 "$dev2" "$dev3" +vgsplit $vg1 $vg2 "$dev1" "$dev2" "$dev5" +lvs -a -o+devices $vg1 $vg2 + +vgmerge $vg1 $vg2 + +vgremove -ff $vg1
tools/vgsplit.c +55 -0
73 lines not on this page · raw message