This file is indexed.

/usr/share/doc/drbd-doc/users-guide/s-lvm-drbd-as-pv.html is in drbd-doc 8.4~20140825-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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?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>10.4. Configuring a DRBD resource as a Physical Volume</title><link rel="stylesheet" type="text/css" href="default.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="drbd-users-guide.html" title="The DRBD User’s Guide" /><link rel="up" href="ch-lvm.html" title="Chapter 10. Using LVM with DRBD" /><link rel="prev" href="s-lvm-snapshots.html" title="10.3. Using automated LVM snapshots during DRBD synchronization" /><link rel="next" href="s-lvm-add-pv.html" title="10.5. Adding a new DRBD volume to an existing Volume Group" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">10.4. Configuring a DRBD resource as a Physical Volume</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="s-lvm-snapshots.html">Prev</a> </td><th width="60%" align="center">Chapter 10. Using LVM with DRBD</th><td width="20%" align="right"> <a accesskey="n" href="s-lvm-add-pv.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-lvm-drbd-as-pv"></a>10.4. Configuring a DRBD resource as a Physical Volume</h2></div></div></div><p><a id="idp53774496" class="indexterm"></a><a id="idp53775376" class="indexterm"></a>In order to prepare a
DRBD resource for use as a Physical Volume, it is necessary to create
a PV signature on the DRBD device. In order to do so, issue one of the
following commands on the node where the resource is currently in the
primary role: <a id="idp53776912" class="indexterm"></a><a id="idp53777792" class="indexterm"></a></p><pre class="screen"># pvcreate /dev/drbdX</pre><p>or</p><pre class="screen"># pvcreate /dev/drbd/by-res/&lt;resource&gt;/0</pre><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>This example assumes a single-volume resource.</p></td></tr></table></div><p>Now, it is necessary to include this device in the list of devices LVM
scans for PV signatures. In order to do this, you must edit the LVM
configuration file, normally named
<a id="idp53781568" class="indexterm"></a><code class="literal">/etc/lvm/lvm.conf</code>. Find the line in the
<code class="literal">devices</code> section that contains the <code class="literal">filter</code> keyword and edit it
accordingly. If <span class="emphasis"><em>all</em></span> your PVs are to be stored on DRBD devices, the
following is an appropriate <code class="literal">filter</code> option:
<a id="idp53785600" class="indexterm"></a><a id="idp53786480" class="indexterm"></a></p><pre class="programlisting">filter = [ "a|drbd.*|", "r|.*|" ]</pre><p>This filter expression accepts PV signatures found on any DRBD
devices, while rejecting (ignoring) all others.</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>By default, LVM scans all block devices found in <code class="literal">/dev</code> for PV
signatures. This is equivalent to <code class="literal">filter = [ "a|.*|" ]</code>.</p></td></tr></table></div><p>If you want to use stacked resources as LVM PVs, then you will need a
more explicit filter configuration. You need to make sure that LVM
detects PV signatures on stacked resources, while ignoring them on the
corresponding lower-level resources and backing devices. This example
assumes that your lower-level DRBD resources use device minors 0
through 9, whereas your stacked resources are using device minors from
10 upwards:</p><pre class="programlisting">filter = [ "a|drbd1[0-9]|", "r|.*|" ]</pre><p>This filter expression accepts PV signatures found only on the DRBD
devices <code class="literal">/dev/drbd10</code> through <code class="literal">/dev/drbd19</code>, while rejecting
(ignoring) all others.</p><p>After modifying the <code class="literal">lvm.conf</code> file, you must run the
<a id="idp53796048" class="indexterm"></a><a id="idp53796928" class="indexterm"></a><code class="literal">vgscan</code> command so LVM
discards its configuration cache and re-scans devices for PV
signatures.</p><p>You may of course use a different <code class="literal">filter</code> configuration to match your
particular system configuration. What is important to remember,
however, is that you need to</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Accept (include) the DRBD devices you wish to use as PVs;
</li><li class="listitem">
Reject (exclude) the corresponding lower-level devices, so as to
  avoid LVM finding duplicate PV signatures.
</li></ul></div><p>In addition, you should disable the LVM cache by setting:</p><pre class="programlisting">write_cache_state = 0</pre><p>After disabling the LVM cache, make sure you remove any stale cache
entries by deleting <code class="literal">/etc/lvm/cache/.cache</code>.</p><p>You must repeat the above steps on the peer node.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png" /></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>If your system has its root filesystem on LVM, Volume
Groups will be activated from your initial ramdisk (initrd) during
boot. In doing so, the LVM tools will evaluate an <code class="literal">lvm.conf</code> file
included in the initrd image. Thus, after you make any changes to your
<code class="literal">lvm.conf</code>, you should be certain to update your initrd with the
utility appropriate for your distribution (<code class="literal">mkinitrd</code>,
<code class="literal">update-initramfs</code> etc.).</p></td></tr></table></div><p>When you have configured your new PV, you may proceed to add it to a
Volume Group, or create a new Volume Group from it. The DRBD resource
must, of course, be in the primary role while doing
so. <a id="idp53809584" class="indexterm"></a><a id="idp53810464" class="indexterm"></a></p><pre class="screen"># vgcreate &lt;name&gt; /dev/drbdX</pre><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>While it is possible to mix DRBD and non-DRBD Physical Volumes
within the same Volume Group, doing so is not recommended and unlikely
to be of any practical value.</p></td></tr></table></div><p>When you have created your VG, you may start carving Logical Volumes
out of it, using the <a id="idp53813440" class="indexterm"></a><a id="idp53814320" class="indexterm"></a><code class="literal">lvcreate</code> command (as with a non-DRBD-backed Volume Group).</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="s-lvm-snapshots.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch-lvm.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="s-lvm-add-pv.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">10.3. Using automated LVM snapshots during DRBD synchronization </td><td width="20%" align="center"><a accesskey="h" href="drbd-users-guide.html">Home</a></td><td width="40%" align="right" valign="top"> 10.5. Adding a new DRBD volume to an existing Volume Group</td></tr></table></div></body></html>