import source from lvm2 2.02.79
[external/device-mapper.git] / test / t-vgsplit-stacked.sh
1 # Copyright (C) 2010 Red Hat, Inc. All rights reserved.
2 #
3 # This copyrighted material is made available to anyone wishing to use,
4 # modify, copy, or redistribute it subject to the terms and conditions
5 # of the GNU General Public License v.2.
6 #
7 # You should have received a copy of the GNU General Public License
8 # along with this program; if not, write to the Free Software Foundation,
9 # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
10
11 . ./test-utils.sh
12
13 prepare_lvmconf '[ "a/dev\/mirror/", "a/dev\/mapper\/.*$/", "a/dev\/LVMTEST/", "r/.*/" ]'
14 aux prepare_devs 3
15
16 pvcreate $devs
17 vgcreate $vg1 $dev1 $dev2
18 lvcreate -n $lv1 -l 100%FREE $vg1
19
20 #top VG
21 pvcreate $DM_DEV_DIR/$vg1/$lv1
22 vgcreate $vg $DM_DEV_DIR/$vg1/$lv1 $dev3
23
24 vgchange -a n $vg
25 vgchange -a n $vg1
26
27 # this should fail but not segfault, RHBZ 481793.
28 not vgsplit $vg $vg1 $dev3