Skip to content

Commit

Permalink
Improve the DRBD workflow to be easier to follow (#408)
Browse files Browse the repository at this point in the history
jsc#DOCTEAM-976
  • Loading branch information
tahliar committed Aug 16, 2024
1 parent d17f2e0 commit dbe2d1a
Showing 1 changed file with 86 additions and 54 deletions.
140 changes: 86 additions & 54 deletions xml/ha_drbd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
</para>
</sect1>
<sect1 xml:id="sec-ha-drbd-configure">
<title>Setting Up DRBD Service</title>
<title>Setting Up The DRBD Service</title>
<note>
<title>Adjustments Needed</title>
<para>
Expand All @@ -199,15 +199,57 @@ NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
use an LV instead;band eg. "nfs" instead of "r0".</remark>

<para>
The following sections assumes you have two nodes, &node1;
and &node2;, and that they should use the TCP port <literal>7788</literal>.
The following sections assume that the cluster nodes use the TCP port <literal>7788</literal>.
Make sure this port is open in your firewall.
</para>

<procedure>
<step>
<para>Prepare your system:</para>
<substeps>
<orderedlist>
<title>Procedure overview</title>
<para>
To set up DRBD, perform the following procedures:
</para>
<listitem>
<para>
<xref linkend="sec-ha-drbd-prepare"/>
</para>
</listitem>
<listitem>
<para>
Configure DRBD using one of the following methods:
</para>
<itemizedlist>
<listitem>
<para>
<xref linkend="sec-ha-drbd-configure-manually"/>
</para>
</listitem>
<listitem>
<para>
<xref linkend="sec-ha-drbd-configure-yast"/>
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
<xref linkend="sec-ha-drbd-configure-init"/>
</para>
</listitem>
<listitem>
<para>
<xref linkend="sec-ha-drbd-configure-cluster-resource"/>
</para>
</listitem>
</orderedlist>

<sect2 xml:id="sec-ha-drbd-prepare">
<title>Preparing your system to use DRBD</title>
<para>
Before you start configuring DRBD, you might need to perform some or
all of the following steps:
</para>
<procedure xml:id="pro-drbd-prepare">
<title>Preparing your system to use DRBD</title>
<step>
<para>Make sure the block devices in your Linux nodes are ready
and partitioned (if needed).</para>
Expand All @@ -228,49 +270,13 @@ NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
<screen>&prompt.root;<command>crm maintenance on</command></screen>
<para> If you skip this step when your cluster already uses
DRBD, a syntax error in the live configuration leads
to a service shutdown. </para>
<para>As an alternative, you can also use
<command>drbdadm</command>
<option>-c <replaceable>FILE</replaceable></option> to
test a configuration file.</para>
to a service shutdown.
Alternatively, you can also use
<command>drbdadm -c <replaceable>FILE</replaceable></command>
to test a configuration file.</para>
</step>
</substeps>
</step>
<step>
<para>Configure DRBD by choosing your method:</para>
<itemizedlist>
<listitem>
<para><xref linkend="sec-ha-drbd-configure-manually"/></para>
</listitem>
<listitem>
<para><xref linkend="sec-ha-drbd-configure-yast"/></para>
</listitem>
</itemizedlist>
</step>
<step>
<para>
If you have configured &csync; (which should be the default), the
DRBD configuration files are already included in the list of files that
need to be synchronized. To synchronize them, run the following command:
</para>
<screen>&prompt.root;<command>csync2</command> -xv</screen>
<para>
If you do not have &csync; (or do not want to use it), copy the DRBD
configuration files manually to the other node:
</para>
<screen>&prompt.root;<command>scp</command> /etc/drbd.conf &node2;:/etc/
&prompt.root;<command>scp</command> /etc/drbd.d/* &node2;:/etc/drbd.d/</screen>
</step>
<step>
<para>Perform the initial synchronization (see <xref linkend="sec-ha-drbd-configure-init"/>).</para>
</step>
<step>
<para>
Reset the cluster's maintenance mode flag:
</para>
<screen>&prompt.root;<command>crm maintenance off</command></screen>
</step>
</procedure>
</procedure>
</sect2>

<sect2 xml:id="sec-ha-drbd-configure-manually">
<title>Configuring DRBD Manually</title>
Expand Down Expand Up @@ -446,8 +452,16 @@ NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
</para>
<screen>&prompt.root;<command>drbdadm</command> dump all</screen>
</step>
<step>
<para>Continue with <xref linkend="sec-ha-drbd-configure-init"/>.</para>
<step>
<para>
Copy the DRBD configuration files to all nodes:
</para>
<screen>&prompt.root;<command>csync2 -xv</command></screen>
<para>
By default, the DRBD configuration file <filename>/etc/drbd.conf</filename>
and the directory <filename>/etc/drbd.d/</filename> are already included in the list
of files that &csync; synchronizes.
</para>
</step>
</procedure>
</sect2>
Expand Down Expand Up @@ -715,13 +729,21 @@ NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
<step>
<para>Save your changes with <guimenu>Finish</guimenu>.</para>
</step>
<step>
<para>Continue with <xref linkend="sec-ha-drbd-configure-init"/>.</para>
<step>
<para>
Copy the DRBD configuration files to all nodes:
</para>
<screen>&prompt.root;<command>csync2 -xv</command></screen>
<para>
By default, the DRBD configuration file <filename>/etc/drbd.conf</filename>
and the directory <filename>/etc/drbd.d/</filename> are already included in the list
of files that &csync; synchronizes.
</para>
</step>
</procedure>
</sect2>
<sect2 xml:id="sec-ha-drbd-configure-init">
<title>Initializing and Formatting DRBD Resource</title>
<title>Initializing and Formatting DRBD Resources</title>
<para>After you have prepared your system and configured DRBD,
initialize your disk for the first time:
</para>
Expand Down Expand Up @@ -822,7 +844,17 @@ r0 role:Primary
</para>
<screen>&prompt.crm.conf;<command>commit</command></screen>
</step>
<step>
<para>
Exit the interactive shell:
</para>
<screen>&prompt.crm.conf;<command>quit</command></screen>
</step>
</procedure>
<para>
If you put the cluster in maintenance mode before configuring DRBD, you can now move
it back to normal operation with <command>crm maintenance off</command>.
</para>
</sect2>
</sect1>

Expand Down

0 comments on commit dbe2d1a

Please sign in to comment.