summaryrefslogtreecommitdiffstats
path: root/templates/clvm
blob: 96c4fff5e89ea04063f735e8f66d1c425b762a28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%name clvm

# Copyright (C) 2009 Dejan Muhamedagic
#
# License: GNU General Public License (GPL)

# Cluster-aware lvm (cloned)
#
# This template generates a cloned instance of clvm and one
# volume group
#
# NB: You need just one clvm, regardless of how many volume
# groups. In other words, you can use this template only for one
# volume group and to make another one, you'll have to edit the
# resulting configuration yourself.

%required

# Name the volume group (for example: vg-1)
# The LVM resource will be in a cloned group with the rest
# of the prerequisite resources. The clone is going to be named c-<id>
# (e.g. c-vg-1)

# For example, to name the resource vg-1, edit the line below
# as follows:
# %% id vg-1
%% id 

# The volume group name
# Example:
# %% volgrpname myvolgroup
%% volgrpname 

%generate

primitive %_:id ocf:heartbeat:LVM
	params volgrpname="%_:volgrpname"
	op start timeout=60s
	op stop timeout=60s
	op monitor interval=30s timeout=60s

primitive dlm ocf:pacemaker:controld
	op start timeout=90s
	op stop timeout=100s

primitive clvm ocf:lvm2:clvmd
	params daemon_timeout="30"
	op start timeout=90s
	op stop timeout=100s

primitive cmirror ocf:lvm2:cmirrord
	params daemon_timeout="30"
	op start timeout=90s
	op stop timeout=100s

group g-%_:id dlm clvm cmirror %_:id

clone c-%_:id g-%_:id
	meta interleave="true" ordered="true"