2012-03-16 17:00:05 +04:00
#!/bin/sh
2016-02-25 23:58:43 +03:00
# Copyright (C) 2007-2016 Red Hat, Inc. All rights reserved.
2008-04-02 16:17:30 +04:00
#
# 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,
2016-01-21 13:49:46 +03:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2008-04-02 16:17:30 +04:00
2016-02-23 01:13:42 +03:00
SKIP_WITH_LVMLOCKD = 1
2015-10-27 17:10:06 +03:00
SKIP_WITH_LVMPOLLD = 1
2008-04-02 16:17:30 +04:00
2015-10-27 17:10:06 +03:00
. lib/inittest
2015-05-09 02:59:18 +03:00
2014-02-26 06:14:18 +04:00
aux prepare_vg 2 80
2008-04-02 16:17:30 +04:00
2008-09-29 20:02:50 +04:00
lvcreate -L 10M -n lv -i2 $vg
lvresize -l +4 $vg /lv
2016-02-25 23:58:43 +03:00
not lvextend -L+0 $vg /lv
not lvextend -l+0 $vg /lv
2008-09-29 20:02:50 +04:00
lvremove -ff $vg
2008-04-02 16:17:30 +04:00
2008-09-29 20:02:50 +04:00
lvcreate -L 64M -n $lv -i2 $vg
not lvresize -v -l +4 xxx/$lv
2014-02-26 06:14:18 +04:00
# Check stripe size is reduced to extent size when it's bigger
ESIZE = $( get vg_field $vg vg_extent_size --units b)
lvextend -L+64m -i 2 -I$(( ${ ESIZE %%B } * 2 )) B $vg /$lv 2>& 1 | tee err
grep "Reducing stripe size" err
2014-04-22 14:47:14 +04:00
lvremove -ff $vg
2014-10-07 11:54:47 +04:00
lvcreate -L 10M -n lv $vg " $dev1 "
lvextend -L +10M $vg /lv " $dev2 "
2014-04-22 14:47:14 +04:00
# Attempt to reduce with lvextend and vice versa:
not lvextend -L 16M $vg /lv
not lvreduce -L 32M $vg /lv
lvremove -ff $vg