blob: 673cd062a1f6b3d1b07dc17ed2c22762af12cf7d (
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
60
61
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
|