summaryrefslogtreecommitdiffstats
path: root/scripts/gfs2/main.yml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scripts/gfs2/main.yml62
1 files changed, 62 insertions, 0 deletions
diff --git a/scripts/gfs2/main.yml b/scripts/gfs2/main.yml
new file mode 100644
index 0000000..673cd06
--- /dev/null
+++ b/scripts/gfs2/main.yml
@@ -0,0 +1,62 @@
+# Copyright (C) 2009 Andrew Beekhof
+# Copyright (C) 2015 Kristoffer Gronlund
+#
+# License: GNU General Public License (GPL)
+version: 2.2
+shortdesc: GFS2 File System (Cloned)
+longdesc: >-
+ This template generates a cloned instance of the GFS2 file system.
+ The file system should be on the device, unless cLVM is used.
+
+category: File System
+parameters:
+ - name: id
+ shortdesc: File System Resource ID
+ longdesc: "NB: The clone is going to be named c-<id> (e.g. c-bigfs)"
+ example: bigfs
+ required: true
+ type: resource
+ - name: directory
+ shortdesc: Mount Point
+ example: /mnt/bigfs
+ required: true
+ type: string
+ - name: device
+ shortdesc: Device
+ required: true
+ type: string
+ - name: options
+ shortdesc: Mount Options
+ type: string
+ required: false
+ - name: dlm
+ shortdesc: Create DLM Resource and Cloned Group
+ longdesc: If set, create the DLM resource and cloned resource group.
+ type: boolean
+ default: true
+ - name: group
+ shortdesc: Cloned Group Resource ID
+ longdesc: ID of cloned group
+ required: false
+ type: resource
+ default: g-dlm
+actions:
+ - when: dlm
+ cib: |
+ primitive dlm ocf:pacemaker:controld
+ op start timeout=90
+ op stop timeout=60
+ group {{group}} dlm
+ clone c-dlm {{group}} meta interleave=true
+ - cib: |
+ primitive {{id}} ocf:heartbeat:Filesystem
+ directory="{{directory}}"
+ fstype="gfs2"
+ device="{{device}}"
+ {{#options}}options="{{options}}"{{/options}}
+ op start timeout=60s
+ op stop timeout=60s
+ op monitor interval=20s timeout=40s
+
+ - crm: configure modgroup {{group}} add {{id}}
+ shortdesc: Add the GFS2 File System to the Cloned Group