This file is indexed.

/usr/share/doc/drbd-doc/users-guide/s-enable-dual-primary.html is in drbd-doc 8.4~20151102-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>6.8. Enabling dual-primary mode</title><link rel="stylesheet" type="text/css" href="default.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="drbd-users-guide.html" title="The DRBD User’s Guide" /><link rel="up" href="ch-admin.html" title="Chapter 6. Common administrative tasks" /><link rel="prev" href="s-downgrading-drbd84.html" title="6.7. Downgrading DRBD 8.4 to 8.3" /><link rel="next" href="s-use-online-verify.html" title="6.9. Using on-line device verification" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6.8. Enabling dual-primary mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="s-downgrading-drbd84.html">Prev</a> </td><th width="60%" align="center">Chapter 6. Common administrative tasks</th><td width="20%" align="right"> <a accesskey="n" href="s-use-online-verify.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="s-enable-dual-primary"></a>6.8. Enabling dual-primary mode</h2></div></div></div><p>Dual-primary mode allows a resource to assume the primary role
simultaneously on both nodes. Doing so is possible on either a
permanent or a temporary basis.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png" /></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Dual-primary mode requires that the resource is configured to
replicate synchronously (protocol C). Because of this it is latency
sensitive, and ill suited for WAN environments.</p><p>Additionally, as both resources are always primary, any interruption in the
network between nodes will result in a split-brain.</p></td></tr></table></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="s-enable-dual-primary-permanent"></a>6.8.1. Permanent dual-primary mode</h3></div></div></div><p><a id="idm45883814514544" class="indexterm"></a>To enable dual-primary mode, set the
<code class="literal">allow-two-primaries</code> option to <code class="literal">yes</code> in the <code class="literal">net</code> section of your
resource configuration:</p><pre class="programlisting">resource &lt;resource&gt;
  net {
    protocol C;
    allow-two-primaries yes;
  }
  ...
}</pre><p>After that, do not forget to synchronize the configuration between nodes. Run
<code class="literal">drbdadm adjust &lt;resource&gt;</code> on both nodes.</p><p>You can now change both nodes to role primary at the same time with <code class="literal">drbdadm
primary &lt;resource&gt;</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="s-enable-dual-primary-temporary"></a>6.8.2. Temporary dual-primary mode</h3></div></div></div><p>To temporarily enable dual-primary mode for a resource normally
running in a single-primary configuration, issue the following
command:</p><pre class="screen"># drbdadm net-options --protocol=C --allow-two-primaries &lt;resource&gt;</pre><p>To end temporary dual-primary mode, run the same command as above but with
<code class="literal">--allow-two-primaries=no</code> (and your desired replication protocol, if
applicable).</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_automating_promotion_on_system_startup"></a>6.8.3. Automating promotion on system startup</h3></div></div></div><p>When a resource is configured to support dual-primary mode, it may
also be desirable to automatically switch the resource into the
primary role upon system (or DRBD) startup.</p><pre class="programlisting">resource &lt;resource&gt;
  startup {
    become-primary-on both;
  }
  ...
}</pre><p>The <code class="literal">/etc/init.d/drbd</code> system init script parses this option on
startup and promotes resources accordingly.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png" /></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>The <code class="literal">become-primary-on</code> approach is not required, nor
recommended, in <a class="link" href="ch-pacemaker.html" title="Chapter 8. Integrating DRBD with Pacemaker clusters">Pacemaker-managed</a> DRBD
configurations. In Pacemaker configuration, resource promotion and
demotion should always be handled by the cluster manager.</p></td></tr></table></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="s-downgrading-drbd84.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch-admin.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="s-use-online-verify.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.7. Downgrading DRBD 8.4 to 8.3 </td><td width="20%" align="center"><a accesskey="h" href="drbd-users-guide.html">Home</a></td><td width="40%" align="right" valign="top"> 6.9. Using on-line device verification</td></tr></table></div></body></html>