Skip to content

Commit

Permalink
Deduplicate DRBD STONITH config
Browse files Browse the repository at this point in the history
  • Loading branch information
tahliar committed Jul 12, 2024
1 parent 6e1fbf6 commit 2cc772c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 69 deletions.
12 changes: 7 additions & 5 deletions xml/article_nfs_storage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,17 @@
</callout>
<callout arearefs="co-ha-quick-nfs-fencing-policy">
<para>
Specifies the fencing policy. For clusters with a &stonith; device
configured, use <literal>resource-and-stonith</literal>.
Specifies the fencing policy. To be supported, &sleha; clusters must have a
&stonith; device configured. Therefore, use <literal>resource-and-stonith</literal>.
</para>
</callout>
<callout arearefs="co-ha-quick-nfs-fencing-handlers">
<para>
Enables resource-level fencing. If the DRBD replication link
becomes disconnected, &pace; tries to promote the DRBD resource
to another node. For more information, see <xref linkend="sec-ha-drbd-fencing"/>.
Enables resource-level fencing to prevent &pace; from starting a service
with outdated data. If the DRBD replication link
becomes disconnected, the <command>crm-fence-peer.9.sh</command> script
stops the DRBD resource from being promoted to another node until the replication link
becomes connected again and DRBD completes its synchronization process.
</para>
</callout>
<callout arearefs="co-ha-quick-nfs-connectionmesh">
Expand Down
71 changes: 7 additions & 64 deletions xml/ha_drbd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -403,15 +403,17 @@ NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
</callout>
<callout arearefs="co-drbd-config-fencing-policy">
<para>
Specifies the fencing policy. For clusters with a &stonith; device
configured, use <literal>resource-and-stonith</literal>.
Specifies the fencing policy. To be supported, &sleha; clusters must have a
&stonith; device configured. Therefore, use <literal>resource-and-stonith</literal>.
</para>
</callout>
<callout arearefs="co-drbd-config-fencing-handlers">
<para>
Enables resource-level fencing. If the DRBD replication link
becomes disconnected, &pace; tries to promote the DRBD resource
to another node. For more information, see <xref linkend="sec-ha-drbd-fencing"/>.
Enables resource-level fencing to prevent &pace; from starting a service
with outdated data. If the DRBD replication link becomes disconnected, the
<command>crm-fence-peer.9.sh</command> script stops the DRBD resource from
being promoted to another node until the replication link becomes connected
again and DRBD completes its synchronization process.
</para>
</callout>
</calloutlist>
Expand Down Expand Up @@ -773,65 +775,6 @@ resource r0-U {
</example>
</sect1>

<sect1 xml:id="sec-ha-drbd-fencing">
<title>Using resource-level fencing with &stonith;</title>
<para>
When a DRBD replication link becomes interrupted, &pace; tries to promote
the DRBD resource to another node. To prevent &pace; from starting a service
with outdated data, enable resource-level fencing in the DRBD configuration
file.
</para>
<para>
The fencing policy can have different values (see man page <command>drbdsetup</command> and the
<option>--fencing</option> option).
As a &productname; cluster is normally used with a &stonith; device, the value
<constant>resource-and-stonith</constant> is used in
<xref linkend="ex-ha-drbd-fencing"/>.
</para>

<example xml:id="ex-ha-drbd-fencing">
<title>Configuration of DRBD with resource-level fencing using the Cluster
Information Base (CIB)</title>
<screen>resource <replaceable>RESOURCE</replaceable> {
net {
fencing resource-and-stonith;
# ...
}
handlers {
fence-peer "/usr/lib/drbd/crm-fence-peer.9.sh";
after-resync-target "/usr/lib/drbd/crm-unfence-peer.9.sh";
# ...
}
...
}</screen>
</example>
<para>If the DRBD replication link becomes disconnected, DRBD does the
following:</para>
<orderedlist>
<listitem>
<para>DRBD calls the <command>crm-fence-peer.9.sh</command> script.</para>
</listitem>
<listitem>
<para>The script contacts the cluster manager.
</para>
</listitem>
<listitem>
<para>The script determines the &pace; resource associated with this
DRBD resource.</para>
</listitem>
<listitem>
<para>The script ensures that the DRBD resource no longer gets
promoted to any other node. It stays on the currently active one.</para>
</listitem>
<listitem>
<para>If the replication link becomes connected again and DRBD
completes its synchronization process, then the constraint is removed.
The cluster manager is now free to promote the resource.
</para>
</listitem>
</orderedlist>
</sect1>

<sect1 xml:id="sec-ha-drbd-test">
<title>Testing the DRBD service</title>

Expand Down

0 comments on commit 2cc772c

Please sign in to comment.