1%name clvm
2
3# Copyright (C) 2009 Dejan Muhamedagic
4#
5# License: GNU General Public License (GPL)
6
7# Cluster-aware lvm (cloned)
8#
9# This template generates a cloned instance of clvm and one
10# volume group
11#
12# NB: You need just one clvm, regardless of how many volume
13# groups. In other words, you can use this template only for one
14# volume group and to make another one, you'll have to edit the
15# resulting configuration yourself.
16
17%required
18
19# Name the volume group (for example: vg-1)
20# The LVM resource will be in a cloned group with the rest
21# of the prerequisite resources. The clone is going to be named c-<id>
22# (e.g. c-vg-1)
23
24# For example, to name the resource vg-1, edit the line below
25# as follows:
26# %% id vg-1
27%% id
28
29# The volume group name
30# Example:
31# %% volgrpname myvolgroup
32%% volgrpname
33
34%generate
35
36primitive %_:id ocf:heartbeat:LVM
37	params volgrpname="%_:volgrpname"
38	op start timeout=60s
39	op stop timeout=60s
40	op monitor interval=30s timeout=60s
41
42primitive dlm ocf:pacemaker:controld
43	op start timeout=90s
44	op stop timeout=100s
45
46primitive clvm ocf:lvm2:clvmd
47	params daemon_timeout="30"
48	op start timeout=90s
49	op stop timeout=100s
50
51primitive cmirror ocf:lvm2:cmirrord
52	params daemon_timeout="30"
53	op start timeout=90s
54	op stop timeout=100s
55
56group g-%_:id dlm clvm cmirror %_:id
57
58clone c-%_:id g-%_:id
59	meta interleave="true" ordered="true"
60