Skip to content

Instantly share code, notes, and snippets.

@jonvargas
Created July 17, 2015 18:29
Show Gist options
  • Save jonvargas/efffb5ce059e54a96bdc to your computer and use it in GitHub Desktop.
Save jonvargas/efffb5ce059e54a96bdc to your computer and use it in GitHub Desktop.
CRM Config for NFS SLES HA Cluster
node 167772676: rcp-portal-storage-sles12-a
node 167772677: rcp-portal-storage-sles12-b
primitive base-fs Filesystem \
params device="/dev/nfs_vg/nfs_lv" directory="/srv/nfs/example" fstype=btrfs \
op monitor interval=10s
primitive exportfs exportfs \
params fsid=1 directory="/srv/nfs/example" options="rw,mountpoint,no_root_squash" clientspec="*" wait_for_leasetime_on_stop=true \
op monitor interval=30s
primitive exportfs-root exportfs \
params fsid=0 directory="/srv/nfs" options="rw,crossmnt" clientspec="*" wait_for_leasetime_on_stop=true \
op monitor interval=30s
primitive p_drbd_nfs ocf:linbit:drbd \
params drbd_resource=nfs \
op monitor interval=15 role=Master \
op monitor interval=30 role=Slave
primitive p_lvm_nfs LVM \
params volgrpname=nfs_vg \
op monitor interval=30s
primitive p_nfsserver nfsserver \
op monitor interval=30s
primitive virtual-ip IPaddr2 \
params ip=10.0.2.3 cidr_netmask=24 lvs_support=false \
op start interval=0 timeout=20 \
op stop interval=0 timeout=20 \
op monitor interval=10 timeout=20
group g_nfs p_lvm_nfs base-fs exportfs virtual-ip \
meta target-role=Started
ms ms_drbd_nfs p_drbd_nfs \
meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true
clone c-rootfs exportfs-root
clone cl_ocf_heartbeat_nfsserver p_nfsserver
colocation c_nfs_on_drbd inf: g_nfs ms_drbd_nfs:Master
colocation nfs-with-rootfs inf: g_nfs c-rootfs
order o_drbd_before_nfs inf: ms_drbd_nfs:promote g_nfs:start
order rootfs-before-nfs inf: c-rootfs g_nfs:start
property cib-bootstrap-options: \
stonith-enabled=false \
no-quorum-policy=ignore \
placement-strategy=balanced \
dc-version=1.1.12-ad083a8 \
cluster-infrastructure=corosync \
cluster-name=hacluster \
last-lrm-refresh=1437124602
rsc_defaults rsc-options: \
resource-stickiness=200 \
migration-threshold=3
op_defaults op-options: \
timeout=600 \
record-pending=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment