2017-07-02 22:38:32 +03:00
#!/usr/bin/env bash
2012-10-09 15:51:30 +04:00
# Copyright (C) 2012 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,
2016-01-21 13:49:46 +03:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2012-10-09 15:51:30 +04:00
2018-05-24 17:49:48 +03:00
2015-10-27 17:10:06 +03:00
SKIP_WITH_LVMPOLLD = 1
2012-10-09 15:51:30 +04:00
2015-10-27 17:10:06 +03:00
. lib/inittest
2015-05-09 02:59:18 +03:00
2014-05-20 21:54:48 +04:00
aux have_raid 1 3 0 || skip
2012-10-09 15:51:30 +04:00
2013-06-15 13:21:03 +04:00
aux prepare_vg 5
2012-10-09 15:51:30 +04:00
for deactivate in true false; do
2013-06-15 13:21:03 +04:00
# Extend RAID10 (2-stripes, 2-mirror)
2012-10-09 15:51:30 +04:00
lvcreate --type raid10 -m 1 -i 2 -l 2 -n $lv1 $vg
2013-06-15 13:21:03 +04:00
test $deactivate && lvchange -an $vg /$lv1
2012-10-09 15:51:30 +04:00
lvresize -l +2 $vg /$lv1
#check raid_images_contiguous $vg $lv1
2024-03-25 15:18:20 +03:00
# Reduce RAID10 (2-stripes, 2-mirror)
NOT_RESIZE =
2024-03-25 17:01:48 +03:00
aux have_raid 1 9 0 || NOT_RESIZE = not # missing shrink support
$NOT_RESIZE lvresize --fs ignore -y -l -2 $vg /$lv1
2012-10-09 15:51:30 +04:00
#check raid_images_contiguous $vg $lv1
lvremove -ff $vg
done