The following is an example configuration that can help you setting up your resources for use of either OCFS2, cLVM, or both. The configuration below does not represent a complete cluster configuration but is only an extract, including all resources needed for OCFS2 and cLVM, and ignoring any other resources that you might need. Attributes and attribute values may need adjustment to your specific setup.
Example C.1. Cluster Configuration for OCFS2 and cLVM¶
primitive clvm ocf:lvm2:clvmd \
params daemon_timeout="30"
primitive dlm ocf:pacemaker:controld \
op monitor interval="60" timeout="60"
primitive o2cb ocf:ocfs2:o2cb \
op monitor interval="60" timeout="60"
primitive ocfs2-1 ocf:heartbeat:Filesystem \
params device="/dev/sdb1" directory="/mnt/shared" fstype="ocfs2" options="acl" \
op monitor interval="20" timeout="40"
primitive sbd_stonith stonith:external/sbd \
params pcmk_delay_max="15" \
op monitor interval="15" timeout="15"
primitive vg1 ocf:heartbeat:LVM \
params volgrpname="cluster-vg" \
op monitor interval="60" timeout="60"
group base-group dlm o2cb clvm vg1 ocfs2-1
clone base-clone base-group \
meta interleave="true"
The configuration with a base group (including several primitives) and a base clone simplifies the overall setup: The base group has internal colocation and ordering and can always remain the same, apart from two resources:
vg1—the resource for the
volume group. Only configure this resource if your setup includes cVLM.
Otherwise omit it from the cluster configuration and from the base
group.
ocfs2-1—the resource for
mounting the OCFS2 file system. Only configure this resource if your
setup includes OCFS2. Otherwise omit it from the cluster configuration
and from the base group.
All of the other resources mentioned in Example C.1, “Cluster Configuration for OCFS2 and cLVM” can be configured and be running in the cluster regardless of your setup.