2
# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
4
# This copyrighted material is made available to anyone wishing to use,
5
# modify, copy, or redistribute it subject to the terms and conditions
6
# of the GNU General Public License v.2.
8
# You should have received a copy of the GNU General Public License
9
# along with this program; if not, write to the Free Software Foundation,
10
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
12
# Test vgsplit operation, including different LV types
24
aux have_raid 1 3 0 || skip
29
# vgsplit can be done into a new or existing VG
34
# We can have PVs or LVs on the cmdline
38
COMM "vgsplit correctly splits RAID LV into $i VG ($j args)"
39
create_vg_ $vg1 "$dev1" "$dev2" "$dev3"
40
test $i = existing && create_vg_ $vg2 "$dev5"
42
lvcreate -an -Zn -l 64 --type raid5 -i 2 -n $lv1 $vg1
44
not vgsplit $vg1 $vg2 "$dev1"
45
not vgsplit $vg1 $vg2 "$dev2"
46
not vgsplit $vg1 $vg2 "$dev1" "$dev2"
47
vgsplit $vg1 $vg2 "$dev1" "$dev2" "$dev3"
49
vgsplit -n $lv1 $vg1 $vg2
51
if [ $i = existing ]; then
52
check pvlv_counts $vg2 4 1 0
54
check pvlv_counts $vg2 3 1 0