1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/test/shell/lvconvert-mirror-updown.sh

43 lines
1.1 KiB
Bash
Raw Normal View History

2017-07-02 22:38:32 +03:00
#!/usr/bin/env bash
# Copyright (C) 2018 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,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Demonstrate problem when upconverting and cutting leg in clvmd
. lib/inittest
aux prepare_pvs 3 100
2017-07-06 20:41:25 +03:00
get_devs
vgcreate $SHARED -s 64k "$vg" "${DEVICES[@]}"
# Use zero devices for big mirror legs
aux zero_dev "$dev2" "$(get first_extent_sector "$dev2"):"
aux zero_dev "$dev3" "$(get first_extent_sector "$dev3"):"
lvcreate -aey -L90 --type mirror --corelog --regionsize 16k -m1 -n $lv1 $vg "$dev1" "$dev2"
lvconvert -m+1 -b $vg/$lv1 "$dev3"
# We want here ongoing conversion
2015-03-11 17:42:44 +03:00
lvs -a -o+seg_pe_ranges $vg
# Now it should be able to drop 2nd. leg
lvconvert -m-1 $vg/$lv1 "$dev2"
lvs -a $vg
vgremove -f $vg