An existing Dual-Primary DRBD resourcemay
be added to Pacemaker resource management with the following
crm
configuration:
primitive p_drbd_ocfs2 ocf:linbit:drbd \ params drbd_resource="ocfs2" ms ms_drbd_ocfs2 p_drbd_ocfs2 \ meta master-max=2 clone-max=2 notify=true
![]() | Important |
---|---|
Note the |
In order to manage OCFS2 and the kernel Distributed Lock Manager (DLM), Pacemaker uses a total of three different resource agents:
ocf:pacemaker:controld
— Pacemaker’s interface to the DLM;
ocf:ocfs2:o2cb
— Pacemaker’s interface to OCFS2 cluster
management;
ocf:heartbeat:Filesystem
— the generic filesystem management
resource agent which supports cluster file systems when configured
as a Pacemaker clone.
You may enable all nodes in a Pacemaker cluster for OCFS2 management
by creating a cloned group of resources, with the following
crm
configuration:
primitive p_controld ocf:pacemaker:controld primitive p_o2cb ocf:ocfs2:o2cb group g_ocfs2mgmt p_controld p_o2cb clone cl_ocfs2mgmt g_ocfs2mgmt meta interleave=true
Once this configuration is committed, Pacemaker will start instances
of the controld
and o2cb
resource types on all nodes in the cluster.
Pacemaker manages OCFS2 filesystems using the conventional
ocf:heartbeat:Filesystem
resource agent, albeit in clone mode. To
put an OCFS2 filesystem under Pacemaker management, use the following
crm
configuration:
primitive p_fs_ocfs2 ocf:heartbeat:Filesystem \ params device="/dev/drbd/by-res/ocfs2/0" directory="/srv/ocfs2" \ fstype="ocfs2" options="rw,noatime" clone cl_fs_ocfs2 p_fs_ocfs2
![]() | Note |
---|---|
This example assumes a single-volume resource. |
In order to tie all OCFS2-related resources and clones together, add the following contraints to your Pacemaker configuration:
order o_ocfs2 ms_drbd_ocfs2:promote cl_ocfs2mgmt:start cl_fs_ocfs2:start colocation c_ocfs2 cl_fs_ocfs2 cl_ocfs2mgmt ms_drbd_ocfs2:Master