2
# Copyright (C) 2011 Red Hat, Inc. All rights reserved.
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.
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
12
# set before test's clvmd is started, so it's passed in environ
13
export LVM_CLVMD_BINARY=clvmd
18
# only clvmd based test, skip otherwise
19
test -e LOCAL_CLVMD || skip
20
read LOCAL_CLVMD < LOCAL_CLVMD
24
vgcreate --clustered y $vg $(cat DEVICES)
26
lvcreate -an --zero n -n $lv1 -l1 $vg
27
lvcreate -an --zero n -n $lv2 -l1 $vg
30
lvchange -aey $vg/$lv1
31
lvchange -aey $vg/$lv2
33
"$LVM_CLVMD_BINARY" -S
35
# restarted clvmd has the same PID (no fork, only execvp)
36
NEW_LOCAL_CLVMD=$(pgrep clvmd)
37
test "$LOCAL_CLVMD" -eq "$NEW_LOCAL_CLVMD"
39
# try restart once more
41
"$LVM_CLVMD_BINARY" -S
43
# restarted clvmd has the same PID (no fork, only execvp)
44
NEW_LOCAL_CLVMD=$(pgrep clvmd)
45
test "$LOCAL_CLVMD" -eq "$NEW_LOCAL_CLVMD"
47
# FIXME: Hmm - how could we test exclusivity is preserved in singlenode ?
51
"$LVM_CLVMD_BINARY" -R