Tizen 2.1 base
[external/device-mapper.git] / test / t-dmeventd-restart.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 lvcreate -m 2 --ig -L 1 -n 3way $vg
22 lvchange --monitor y $vg/3way
23
24 dmeventd -R -f &
25 LOCAL_DMEVENTD="$!"
26
27 sleep 1 # wait a bit, so we talk to the new dmeventd later
28
29 lvchange --monitor y --verbose $vg/3way 2>&1 | tee lvchange.out
30 grep 'already monitored' lvchange.out
31 lvchange --monitor y --verbose $vg/4way 2>&1 | tee lvchange.out
32 grep 'already monitored' lvchange.out