summaryrefslogtreecommitdiffstats
path: root/templates/clvm
diff options
context:
space:
mode:
Diffstat (limited to 'templates/clvm')
-rw-r--r--templates/clvm59
1 files changed, 59 insertions, 0 deletions
diff --git a/templates/clvm b/templates/clvm
new file mode 100644
index 0000000..96c4fff
--- /dev/null
+++ b/templates/clvm
@@ -0,0 +1,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"