Skip to content

Commit

Permalink
Add procedure for creating a DRBD cluster resource (#353)
Browse files Browse the repository at this point in the history
And adjust crm steps for earlier versions

bsc#1211587
jsc#DOCTEAM-998
  • Loading branch information
tahliar committed Oct 24, 2023
1 parent 4c99fd5 commit 339e53a
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion xml/ha_drbd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
<title>Adjustments Needed</title>
<para>
The following procedure uses the server names &node1; and &node2;,
and the cluster resource name <literal>r0</literal>. It sets up
and the DRBD resource name <literal>r0</literal>. It sets up
&node1; as the primary node and <filename>/dev/disk/by-id/example-disk1</filename> for
storage. Make sure to modify the instructions to use your own nodes and
file names.
Expand Down Expand Up @@ -742,6 +742,45 @@ r0 role:Primary
</step>
</procedure>
</sect2>
<sect2 xml:id="sec-ha-drbd-configure-cluster-resource">
<title>Creating Cluster Resources for DRBD</title>
<para>
After you have initialized your DRBD device, create a cluster resource to manage
the DRBD device, and a promotable clone to allow this resource to run on both nodes:
</para>
<procedure xml:id="pro-ha-drbd-configure-cluster-resource">
<title>Creating cluster resources for DRBD</title>
<step>
<para>
Start the <command>crm</command> interactive shell:
</para>
<screen>&prompt.root;<command>crm configure</command></screen>
</step>
<step>
<para>
Create a primitive for the DRBD resource <literal>r0</literal>:
</para>
<screen>&prompt.crm.conf;<command>primitive drbd-r0 ocf:linbit:drbd \
params drbd_resource="r0" \
op monitor interval=15 role=Master \
op monitor interval=30 role=Slave</command></screen>
</step>
<step>
<para>
Create a promotable clone for the <literal>drbd-r0</literal> primitive:
</para>
<screen>&prompt.crm.conf;<command>ms ms-drbd-r0 drbd-r0 \
meta master-max="1" master-node-max="1" \
clone-max="2" clone-node-max="1" notify="true" interleave=true</command></screen>
</step>
<step>
<para>
Commit this configuration:
</para>
<screen>&prompt.crm.conf;<command>commit</command></screen>
</step>
</procedure>
</sect2>
</sect1>

<sect1 xml:id="sec-ha-drbd-migrate">
Expand Down

0 comments on commit 339e53a

Please sign in to comment.