source: postlfs/filesystems/lvm2.xml@ f233ec7

perl-modules
Last change on this file since f233ec7 was 82e1be5, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Update to cryptsetup-2.0.4.
Update to xfsprogs-4.17.0.
Tags.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@20311 af4574ff-66df-0310-9fd7-8a98e5e911e0

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