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