2017-07-02 22:38:32 +03:00
#!/usr/bin/env bash
2015-04-25 01:38:06 +03:00
# Copyright (C) 2014-2015 Red Hat, Inc. All rights reserved.
2014-09-09 19:25:29 +04:00
#
# 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
2014-09-09 19:25:29 +04:00
2016-02-23 01:13:42 +03:00
SKIP_WITH_LVMLOCKD = 1
2015-10-27 02:45:37 +03:00
SKIP_WITHOUT_LVMETAD = 1
SKIP_WITH_LVMPOLLD = 1
2014-09-09 19:25:29 +04:00
2015-10-27 02:45:37 +03:00
. lib/inittest
2014-09-09 19:25:29 +04:00
test -f /proc/mdstat && grep -q raid0 /proc/mdstat || \
modprobe raid0 || skip
aux prepare_devs 2
# create 2 disk MD raid0 array (stripe_width=128K)
2015-04-25 01:38:06 +03:00
aux prepare_md_dev 0 64 2 " $dev1 " " $dev2 "
2014-09-09 19:25:29 +04:00
2015-04-25 01:38:06 +03:00
aux lvmconf 'devices/md_component_detection = 1'
aux extend_filter_LVMTEST
aux extend_filter "a|/dev/md.*|"
2014-09-09 19:25:29 +04:00
2015-04-25 01:38:06 +03:00
pvdev = $( < MD_DEV_PV)
2014-09-09 19:25:29 +04:00
2015-04-25 01:38:06 +03:00
pvcreate " $pvdev "
2014-09-09 19:25:29 +04:00
# ensure that lvmetad can only see the toplevel MD device
2015-04-23 21:26:19 +03:00
pvs | tee out
grep " $pvdev " out
2015-04-25 01:38:06 +03:00
not grep " $dev1 " out
not grep " $dev2 " out