# Copyright (C) 2009 Andrew Beekhof
# Copyright (C) 2015 Kristoffer Gronlund
#
# License: GNU General Public License (GPL)
version: 2.2
category: Script
shortdesc: GFS2 File System Base (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.

parameters:
  - name: clvm-group
    shortdesc: cLVM Resource Group ID
    longdesc: Optional ID of a cLVM resource group.
    required: False

actions:
  - cib: |
      primitive gfs-controld ocf:pacemaker:controld

      clone c-gfs gfs-controld
        meta interleave=true ordered=true

  - crm: configure modgroup {{clvm-group}} add c-gfs
    shortdesc: Add gfs controld to cLVM group
    when: clvm-group
