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

84 lines
1.7 KiB
Bash
Raw Normal View History

#!/bin/sh
# Copyright (C) 2008-2014 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# tests functionality we don't have in other special test files yet
# to improve code coverage
#
. lib/test
aux prepare_pvs 5
pvcreate --metadatacopies 0 "$dev2"
pvcreate --metadatacopies 0 "$dev3"
pvscan --uuid
# FIXME takes very long time
#pvck "$dev1"
vgcreate $vg $(cat DEVICES)
not vgscan $vg
vgscan --mknodes
vgs -o all $vg
lvcreate -l 5 -i5 -I256 -n $lv $vg
2014-03-26 03:22:23 +04:00
lvcreate -aey -l 5 -n $lv1 $vg
2014-03-26 02:55:45 +04:00
lvcreate -s -l 5 -n $lv2 $vg/$lv1
pvck "$dev1"
2014-03-26 02:55:45 +04:00
not lvscan $vg
lvscan
lvmdiskscan
2014-03-26 02:55:45 +04:00
# "-persistent y --major 254 --minor 20"
# "-persistent n"
for i in pr "p rw" an ay "-monitor y" "-monitor n" \
2012-10-15 16:31:41 +04:00
-refresh "-addtag MYTAG" "-deltag MYETAG"; do
lvchange -$i $vg/$lv
done
lvrename $vg $lv $lv-rename
not lvrename $vg
not lvrename $vg-xxx
not lvrename $vg $vg/$lv-rename $vg1/$lv
vgremove -f $vg
# test pvresize functionality
2014-03-26 02:55:45 +04:00
# missing params
not pvresize
2014-03-26 02:55:45 +04:00
# negative size
not pvresize --setphysicalvolumesize -10M "$dev1"
2014-03-26 02:55:45 +04:00
# not existing device
not pvresize --setphysicalvolumesize 10M "$dev7"
pvresize --setphysicalvolumesize 10M "$dev1"
pvresize "$dev1"
# test various lvm utils
lvm dumpconfig
lvm devtypes
lvm formats
lvm segtypes
lvm tags
# test obsoleted tools
not lvm lvmchange
not lvm lvmsadc
not lvm lvmsar
not lvm pvdata