1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: check pvmove on single PV

This commit is contained in:
Zdenek Kabelac 2024-08-22 14:34:58 +02:00
parent 07b6174f7c
commit 7dbb362c0f

View File

@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Copyright (C) 2024 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
test_description="ensure pvmove works on single PV"
SKIP_WITH_LVMLOCKD=1
. lib/inittest
aux prepare_vg 1
lvcreate -aey -l16 -n $lv1 $vg
lvcreate -aey -l16 -n $lv2 $vg
lvs -ao+seg_pe_ranges $vg
pvmove -i0 --alloc anywhere "$dev1:12-19" "$dev1"
lvs -ao+seg_pe_ranges,seg_size_pe $vg
# both LVs should have now 2 segments 12extents + 4extents
lvs --noheadings -oseg_size_pe $vg > out
test 2 -eq "$(grep 12 out | wc -l)"
test 2 -eq "$(grep 4 out | wc -l)"
lvremove -ff $vg