2
# Copyright (C) 2012 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
# 'Exercise some lvcreate diagnostics'
16
aux target_at_least dm-raid 1 1 0 || skip
20
lvcreate -s -l 20%FREE -n $lv1 $vg --virtualsize 256T
21
lvcreate -s -l 20%FREE -n $lv2 $vg --virtualsize 256T
22
lvcreate -s -l 20%FREE -n $lv3 $vg --virtualsize 256T
23
lvcreate -s -l 20%FREE -n $lv4 $vg --virtualsize 256T
24
lvcreate -s -l 20%FREE -n $lv5 $vg --virtualsize 256T
26
#FIXME this should be 1024T
27
#check lv_field $vg/$lv size "128.00m"
29
aux lvmconf 'devices/filter = [ "a/dev\/mapper\/.*$/", "a/dev\/LVMTEST/", "r/.*/" ]'
31
pvcreate $DM_DEV_DIR/$vg/$lv[12345]
32
vgcreate -c n $vg1 $DM_DEV_DIR/$vg/$lv[12345]
37
# Create large RAID LVs
39
# We need '--nosync' or our virtual devices won't work
40
lvcreate --type raid1 -m 1 -L 200T -n $lv1 $vg1 --nosync
41
check lv_field $vg1/$lv1 size "200.00t"
44
for segtype in raid4 raid5 raid6; do
45
lvcreate --type $segtype -i 3 -L 750T -n $lv1 $vg1 --nosync
46
check lv_field $vg1/$lv1 size "750.00t"
51
# Convert large linear to RAID1 (belong in different test script?)
53
lvcreate -L 200T -n $lv1 $vg1
54
# Need to deactivate or the up-convert will start sync'ing
55
lvchange -an $vg1/$lv1
56
lvconvert --type raid1 -m 1 $vg1/$lv1
57
check lv_field $vg1/$lv1 size "200.00t"
61
# Extending large RAID LV (belong in different script?)
63
lvcreate --type raid1 -m 1 -L 200T -n $lv1 $vg1 --nosync
64
check lv_field $vg1/$lv1 size "200.00t"
65
lvextend -L +200T $vg1/$lv1
66
check lv_field $vg1/$lv1 size "400.00t"