import source from lvm2 2.02.79
[external/device-mapper.git] / test / t-lvconvert-repair-dmeventd.sh
1 #!/bin/bash
2 # Copyright (C) 2008 Red Hat, Inc. All rights reserved.
3 #
4 # This copyrighted material is made available to anyone wishing to use,
5 # modify, copy, or redistribute it subject to the terms and conditions
6 # of the GNU General Public License v.2.
7 #
8 # You should have received a copy of the GNU General Public License
9 # along with this program; if not, write to the Free Software Foundation,
10 # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
11
12 . ./test-utils.sh
13
14 prepare_vg 5
15 prepare_dmeventd
16
17 which mkfs.ext2 || exit 200
18
19 lvcreate -m 3 --ig -L 1 -n 4way $vg
20 lvchange --monitor y $vg/4way
21 disable_dev $dev2 $dev4
22 mkfs.ext2 $DM_DEV_DIR/$vg/4way
23 sleep 10 # FIXME: need a "poll" utility, akin to "check"
24 enable_dev $dev2 $dev4
25 check mirror $vg 4way
26 check mirror_legs $vg 4way 2