master - tests: add vg-check-devs-used.sh
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cc57cd39ab0e47a3e0fc6fc81c378c4d4d292093 Commit: cc57cd39ab0e47a3e0fc6fc81c378c4d4d292093 Parent: 8fad9b9e5d219861fc1f758216fb446cffe3817f Author: Peter Rajnoha <[email protected]> AuthorDate: Mon Mar 21 16:21:30 2016 +0100 Committer: Peter Rajnoha <[email protected]> CommitterDate: Mon Mar 21 16:21:30 2016 +0100
tests: add vg-check-devs-used.sh
--- test/shell/vg-check-devs-used.sh | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-)
test/shell/vg-check-devs-used.sh new file +24 -0
@@ -0,0 +1,24 @@ +#!/bin/sh +# Copyright (C) 2008-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, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +SKIP_WITH_LVMPOLLD=1 + +. lib/inittest + +aux prepare_devs 3 8 + +vgcreate $vg $dev1 $dev2 +lvcreate -l100%FREE -n $lv $vg +dd if="$dev1" of="$dev3" bs=1M +pvs --config "devices/global_filter = [ \"a|$dev2|\", \"a|$dev3|\", \"r|.*|\" ]" 2>err +grep "WARNING: Device mismatch detected for $vg/$lv which is accessing $dev1 instead of $dev3" err + +vgremove -ff $vg