2012-03-16 13:00:05 +00:00
#!/bin/sh
2013-05-31 11:01:59 +02:00
# Copyright (C) 2010-2013 Red Hat, Inc. All rights reserved.
2010-12-21 01:14:34 +00:00
#
# This file is part of LVM2.
#
# 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 11:49:46 +01:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2010-12-21 01:14:34 +00:00
2015-10-27 15:10:06 +01:00
SKIP_WITH_LVMPOLLD = 1
2014-06-11 11:07:32 +02:00
. lib/inittest
2011-01-05 00:16:18 +00:00
2015-04-30 13:23:56 +02:00
aux kernel_at_least 2 6 33 || skip
2011-01-07 15:04:52 +00:00
2013-05-31 11:01:59 +02:00
aux prepare_pvs 2
2012-03-16 13:00:05 +00:00
2013-05-31 11:01:59 +02:00
vgcreate -s 4k $vg $( cat DEVICES)
lvcreate -aey -l 5 -n foo $vg
lvcreate -s -n snap $vg /foo -l 3 -c 4k
2010-12-14 23:20:58 +00:00
lvcreate -s -n snap2 $vg /foo -l 6 -c 4k
2015-05-02 21:14:45 +02:00
dd if = /dev/zero of = " $DM_DEV_DIR / $vg /snap2 " count = 1 bs = 1024 oflag = direct
2015-06-23 13:25:09 +02:00
# skip test with broken kernel
check lv_field $vg /snap2 data_percent "50.00" || skip
2013-08-07 15:48:31 -05:00
lvcreate -aey --type mirror -m 1 -n mirr $vg -l 1 --mirrorlog core
2015-05-02 21:14:45 +02:00
lvs -a $vg
2011-01-05 00:16:18 +00:00
aux apitest percent $vg
2011-09-19 18:40:51 +00:00
vgremove -ff $vg