source: postlfs/filesystems/lvm2.xml@ 027c7d7

systemd-13485
Last change on this file since 027c7d7 was 027c7d7, checked in by DJ Lucas <dj@…>, 8 years ago

Merge Chapter 16 from trunk.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16879 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 14.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY lvm2-download-http " ">
8 <!ENTITY lvm2-download-ftp "ftp://sources.redhat.com/pub/lvm2/releases/LVM2.&lvm2-version;.tgz">
9 <!ENTITY lvm2-md5sum "f2191c4798c8927a6d31a96010b9f568">
10 <!ENTITY lvm2-size "1.8 MB">
11 <!ENTITY lvm2-buildsize "46 MB (during the test suite, transient files can grow up to around 500 MB)">
12 <!ENTITY lvm2-time "0.4 SBU (additional about 10 SBU to run the test suite with parallelism = 4)">
13]>
14
15<sect1 id="lvm2" xreflabel="LVM2-&lvm2-version;">
16 <?dbhtml filename="lvm2.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>LVM2-&lvm2-version;</title>
24
25 <indexterm zone="lvm2">
26 <primary sortas="a-LVM2">LVM2</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to LVM2</title>
31
32 <para>
33 The <application>LVM2</application> package is a set of utilities that manages
34 logical partitions. It allows spanning of file systems across multiple
35 physical disks and disk partitions and provides for dynamic growing or
36 shrinking of logical partitions, mirroring and low storage footprint snapshots.
37 </para>
38
39 &lfs77_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>
45 Download (HTTP): <ulink url="&lvm2-download-http;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download (FTP): <ulink url="&lvm2-download-ftp;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download MD5 sum: &lvm2-md5sum;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download size: &lvm2-size;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated disk space required: &lvm2-buildsize;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated build time: &lvm2-time;
71 </para>
72 </listitem>
73 </itemizedlist>
74
75 <bridgehead renderas="sect3">LVM2 Dependencies</bridgehead>
76
77 <bridgehead renderas="sect4">Optional</bridgehead>
78 <para role="optional">
79 <xref linkend='mdadm'/> (for checks),
80 <xref linkend='reiserfs'/>,
81 <xref linkend='valgrind'/>,
82 <xref linkend='which'/>,
83 <xref linkend='xfsprogs'/> (all five may be used, but are not required,
84 for tests), and
85 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
86 thin-provisioning-tools</ulink>
87 </para>
88
89 <para condition="html" role="usernotes">User Notes:
90 <ulink url="&blfs-wiki;/lvm2"/>
91 </para>
92
93 <note>
94 <para>
95 Kernel versions in the 4.1 and 4.2 series have a broken RAID
96 implementation. If you want to use RAID style LV's, you should
97 install a kernel with a version number above 4.2.4. Note that several
98 tests use RAID logical volumes, and can generate a <quote>kernel
99 oops</quote> with faulty kernel versions, which usually renders the
100 system unusable.
101 </para>
102 </note>
103 </sect2>
104
105 <sect2 role="kernel" id="lvm2-kernel">
106 <title>Kernel Configuration</title>
107
108 <para>
109 Enable the following options in the kernel configuration
110 and recompile the kernel:
111 </para>
112
113 <note><para>
114 There are several other Device Mapper options in the kernel beyond those
115 listed below. In order to get reasonable results if running the
116 regression tests, all must be enabled either internally or as a module.
117 </para></note>
118
119<screen><literal>Device Drivers ---&gt;
120 [*] Multiple devices driver support (RAID and LVM) ---&gt; [CONFIG_MD]
121 &lt;*/M&gt; Device mapper support [CONFIG_BLK_DEV_DM]
122 &lt;*/M/ &gt; Crypt target support [CONFIG_DM_CRYPT]
123 &lt;*/M/ &gt; Snapshot target [CONFIG_DM_SNAPSHOT]
124 &lt;*/M/ &gt; Thin provisioning target [CONFIG_DM_THIN_PROVISIONING]
125 &lt;*/M/ &gt; Mirror target [CONFIG_DM_MIRROR]</literal></screen>
126
127 <indexterm zone="lvm2 lvm2-kernel">
128 <primary sortas="d-lvm2">lvm2</primary>
129 </indexterm>
130
131 </sect2>
132
133 <sect2 role="installation">
134 <title>Installation of LVM2</title>
135
136 <para>
137 Install <application>LVM2</application> by running the following
138 commands:
139 </para>
140
141<screen><userinput>SAVEPATH=$PATH &amp;&amp;
142PATH=$PATH:/sbin:/usr/sbin &amp;&amp;
143./configure --prefix=/usr \
144 --exec-prefix= \
145 --with-confdir=/etc \
146 --enable-applib \
147 --enable-cmdlib \
148 --enable-pkgconfig \
149 --enable-udev_sync &amp;&amp;
150make &amp;&amp;
151PATH=$SAVEPATH &amp;&amp;
152unset SAVEPATH</userinput></screen>
153
154 <para>
155 The tests use <application>udev</application> for logical volume
156 synchronization, so the LVM udev rules and some utilities need to
157 be installed before running the tests. If you are installing
158 <application>LVM2</application> for the first time, and do not
159 want to install the full package before running the tests, the minimal
160 set of utilities can be installed by running the following commands
161 as the <systemitem class="username">root</systemitem> user:
162 </para>
163
164<screen role="root"><userinput>make -C tools install_dmsetup_dynamic &amp;&amp;
165make -C udev install &amp;&amp;
166make -C libdm install</userinput></screen>
167
168 <para>
169 To test the results, issue: <command>make check_local</command> as the
170 <systemitem class="username">root</systemitem> user. Other targets are
171 available and can be listed with <command>make -C test help</command>.
172 The test timings are very dependent on the speed of the disk(s), and on
173 the number of enabled kernel options.
174 </para>
175 <para>
176 Those tests do not implement the <quote>expected fail</quote> possibility,
177 and a small number of test failures is expected by upstream. More
178 failures may happen because some kernel options are missing. For example,
179 the lack of the <emphasis>dm-delay</emphasis> device mapper target may
180 explain up to 10 failures or so. Some tests are flagged
181 <quote>warned</quote> if
182 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
183 thin-provisioning-tools</ulink> are not installed. A workaround is to
184 add the following flags to <command>configure</command>:
185 </para>
186
187<screen role="nodump"><userinput> --with-thin-check= \
188 --with-thin-dump= \
189 --with-thin-repair= \
190 --with-thin-restore= \
191 --with-cache-check= \
192 --with-cache-dump= \
193 --with-cache-repair= \
194 --with-cache-restore= \</userinput></screen>
195
196 <para>
197 Some tests may hang with kernel versions within the 4.1 and 4.2 series (see
198 above). They can be removed if necessary, for example: <command>rm
199 test/shell/lvcreate-large-raid.sh</command>. The tests generate a lot
200 of kernel messages, which may clutter your terminal. You can disable them
201 by issuing <command>dmesg -D</command> before running the tests (do not
202 forget to issue <command>dmesg -E</command> when the tests are done).
203 </para>
204
205 <para>
206 Now, as the <systemitem class="username">root</systemitem> user:
207 </para>
208
209<screen role="root"><userinput>make install</userinput></screen>
210
211 </sect2>
212
213 <sect2 role="commands">
214 <title>Command Explanations</title>
215
216 <para>
217 <command>PATH=$PATH:/sbin:/usr/sbin</command>: The path
218 must contain <filename class="directory">/sbin</filename> and
219 <filename class="directory">/usr/sbin</filename> for proper system tool
220 detection by the <command>configure</command> script. This command
221 ensures that PATH is properly set if you are building as an unprivileged
222 user.
223 </para>
224
225 <para>
226 <parameter>--enable-applib</parameter>: This switch enables
227 building of the shared application library.
228 </para>
229
230 <para>
231 <parameter>--enable-cmdlib</parameter>: This switch enables
232 building of the shared command library. It is required
233 when building the event daemon.
234 </para>
235
236 <para>
237 <option>--enable-lvmetad</option>: This switch enables
238 building of the <application>LVM</application> metadata daemon,
239 which avoids scanning all the filesystems when an LVM command is
240 run.
241 </para>
242
243 <para>
244 <parameter>--enable-pkgconfig</parameter>: This switch enables
245 installation of <command>pkg-config</command> support files.
246 </para>
247
248 <para>
249 <parameter>--enable-udev_sync</parameter>: This switch enables
250 synchronisation with <application>Udev</application> processing.
251 </para>
252
253 <para>
254 <option>--enable-dmeventd</option>: This switch enables
255 building of the <application>Device Mapper</application>
256 event daemon.
257 </para>
258
259 </sect2>
260
261 <sect2 role="content">
262 <title>Contents</title>
263
264 <segmentedlist>
265 <segtitle>Installed Programs</segtitle>
266 <segtitle>Installed Libraries</segtitle>
267 <segtitle>Installed Directories</segtitle>
268
269 <seglistitem>
270 <seg>
271 blkdeactivate,
272 dmeventd (optional),
273 dmsetup,
274 fsadm,
275 lvm,
276 lvmconf,
277 lvmdump,
278 lvmetad (optional),
279 and vgimportclone.
280 There are also numerous symbolic links to
281 lvm that implement specific functionalities
282 </seg>
283 <seg>
284 libdevmapper.so,
285 liblvm2app.so,
286 and liblvm2cmd.so;
287 optional: libdevmapper-event.so,
288 libdevmapper-event-lvm2.so,
289 libdevmapper-event-lvm2mirror.so,
290 libdevmapper-event-lvm2snapshot.so,
291 libdevmapper-event-lvm2raid.so,
292 and libdevmapper-event-lvm2thin.so
293 </seg>
294 <seg>
295 /etc/lvm and
296 /lib/device-mapper (optional)
297 </seg>
298 </seglistitem>
299 </segmentedlist>
300
301 <variablelist>
302 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
303 <?dbfo list-presentation="list"?>
304
305 <?dbhtml list-presentation="table"?>
306
307 <varlistentry id="blkdeactivate">
308 <term><command>blkdeactivate</command></term>
309 <listitem>
310 <para>
311 is a utility to deactivate block device.
312 </para>
313 <indexterm zone="lvm2 blkdeactivate">
314 <primary sortas="b-blkdeactivate">blkdeactivate</primary>
315 </indexterm>
316 </listitem>
317 </varlistentry>
318
319 <varlistentry id="dmeventd">
320 <term><command>dmeventd</command></term>
321 <listitem>
322 <para>
323 (optional) is the Device Mapper event daemon.
324 </para>
325 <indexterm zone="lvm2 dmeventd">
326 <primary sortas="b-dmeventd">dmeventd</primary>
327 </indexterm>
328 </listitem>
329 </varlistentry>
330
331 <varlistentry id="dmsetup">
332 <term><command>dmsetup</command></term>
333 <listitem>
334 <para>
335 is a low level logical volume management tool.
336 </para>
337 <indexterm zone="lvm2 dmsetup">
338 <primary sortas="b-dmsetup">dmsetup</primary>
339 </indexterm>
340 </listitem>
341 </varlistentry>
342
343 <varlistentry id="fsadm">
344 <term><command>fsadm</command></term>
345 <listitem>
346 <para>
347 is a utility used to resize or check filesystem on a device.
348 </para>
349 <indexterm zone="lvm2 fsadm">
350 <primary sortas="b-fsadm">fsadm</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="lvm">
356 <term><command>lvm</command></term>
357 <listitem>
358 <para>
359 provides the command-line tools for <application>LVM2</application>.
360 Commands are implemented via sympolic links to this program to
361 manage physical devices (pv*), volume groups (vg*) and logical
362 volumes (lv*).
363 </para>
364 <indexterm zone="lvm2 lvm">
365 <primary sortas="b-lvm">lvm</primary>
366 </indexterm>
367 </listitem>
368 </varlistentry>
369
370 <varlistentry id="lvmconf">
371 <term><command>lvmconf</command></term>
372 <listitem>
373 <para>
374 is a script that modifies the locking configuration in
375 the <application>LVM2</application> configuration file.
376 </para>
377 <indexterm zone="lvm2 lvmconf">
378 <primary sortas="b-lvmconf">lvmconf</primary>
379 </indexterm>
380 </listitem>
381 </varlistentry>
382
383 <varlistentry id="lvmdump">
384 <term><command>lvmdump</command></term>
385 <listitem>
386 <para>
387 is a tool used to dump various information concerning
388 <application>LVM2</application>.
389 </para>
390 <indexterm zone="lvm2 lvmdump">
391 <primary sortas="b-lvmdump">lvmdump</primary>
392 </indexterm>
393 </listitem>
394 </varlistentry>
395
396 <varlistentry id="lvmetad">
397 <term><command>lvmetad</command></term>
398 <listitem>
399 <para>
400 (optional) is the LVM metadata daemon.
401 </para>
402 <indexterm zone="lvm2 lvmetad">
403 <primary sortas="b-lvmetad">lvmetad</primary>
404 </indexterm>
405 </listitem>
406 </varlistentry>
407
408 <varlistentry id="vgimportclone">
409 <term><command>vgimportclone</command></term>
410 <listitem>
411 <para>
412 is used to import a duplicated VG (e.g. hardware snapshot).
413 </para>
414 <indexterm zone="lvm2 vgimportclone">
415 <primary sortas="b-vgimportclone">vgimportclone</primary>
416 </indexterm>
417 </listitem>
418 </varlistentry>
419
420 <varlistentry id="libdevmapper">
421 <term><filename class='libraryfile'>libdevmapper.so</filename></term>
422 <listitem>
423 <para>
424 contains the <application>Device Mapper</application> API
425 functions.
426 </para>
427 <indexterm zone="lvm2 libdevmapper">
428 <primary sortas="c-libdevmapper">libdevmapper.so</primary>
429 </indexterm>
430 </listitem>
431 </varlistentry>
432
433 </variablelist>
434
435 </sect2>
436
437</sect1>
Note: See TracBrowser for help on using the repository browser.