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 adc957e commit 7ce74e7
Showing 1 changed file with 87 additions and 55 deletions.
142 changes: 87 additions & 55 deletions xml/ha_drbd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,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 @@ -179,15 +179,57 @@ NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
</note>

<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 @@ -207,50 +249,14 @@ NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
in maintenance mode: </para>
<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 will lead
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>
DRBD, a syntax error in the live configuration leads
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 -xv</command></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 /etc/drbd.conf &node2;:/etc/</command>
&prompt.root;<command>scp /etc/drbd.d/* &node2;:/etc/drbd.d/</command></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 @@ -426,8 +432,16 @@ NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
</para>
<screen>&prompt.root;<command>drbdadm dump all</command></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 @@ -593,13 +607,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 @@ -699,7 +721,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 7ce74e7

Please sign in to comment.