source: postlfs/filesystems/lvm2.xml@ fbcb384

10.0 10.1 11.0 11.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind lazarus perl-modules qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since fbcb384 was fbcb384, checked in by Bruce Dubbs <bdubbs@…>, 4 years ago

Update to webkitgtk-2.18.5.
Update to rpcsvc-proto-1.3.1.
Update to node.js-9.4.0.
Update to libseccomp-2.3.3.
Move note from llvm to lvm2
Tweak lightdm instructions.

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

  • Property mode set to 100644
File size: 15.1 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 "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">
9 <!ENTITY lvm2-md5sum "ee6cfbc5a0c5696ffae79dac04ee7a2b">
10 <!ENTITY lvm2-size "2.3 MB">
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)">
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 tools that manage
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
37 snapshots.
38 </para>
39
40 &lfs81_checked;
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>
46 Download (HTTP): <ulink url="&lvm2-download-http;"/>
47 </para>
48 </listitem>
49 <listitem>
50 <para>
51 Download (FTP): <ulink url="&lvm2-download-ftp;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download MD5 sum: &lvm2-md5sum;
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download size: &lvm2-size;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Estimated disk space required: &lvm2-buildsize;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated build time: &lvm2-time;
72 </para>
73 </listitem>
74 </itemizedlist>
75
76 <bridgehead renderas="sect3">LVM2 Dependencies</bridgehead>
77
78 <bridgehead renderas="sect4">Optional</bridgehead>
79 <para role="optional">
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>
88 </para>
89
90 <para condition="html" role="usernotes">User Notes:
91 <ulink url="&blfs-wiki;/lvm2"/>
92 </para>
93
94 <caution>
95 <para>
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.
101 </para>
102 </caution>
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 The tests will all time out if Magic SysRq key is not enabled.
118 </para></note>
119
120<screen><literal>Device Drivers ---&gt;
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]
125 &lt;*/M/ &gt; Thin provisioning target [CONFIG_DM_THIN_PROVISIONING]
126 &lt;*/M/ &gt; Mirror target [CONFIG_DM_MIRROR]
127Kernel hacking ---&gt;
128 [*] Magic SysRq key [CONFIG_MAGIC_SYSRQ]</literal></screen>
129
130 <indexterm zone="lvm2 lvm2-kernel">
131 <primary sortas="d-lvm2">lvm2</primary>
132 </indexterm>
133
134 </sect2>
135
136 <sect2 role="installation">
137 <title>Installation of LVM2</title>
138
139 <para>
140 Install <application>LVM2</application> by running the following
141 commands:
142 </para>
143
144<screen revision="sysv"><userinput>SAVEPATH=$PATH &amp;&amp;
145PATH=$PATH:/sbin:/usr/sbin &amp;&amp;
146./configure --prefix=/usr \
147 --exec-prefix= \
148 --enable-applib \
149 --enable-cmdlib \
150 --enable-pkgconfig \
151 --enable-udev_sync &amp;&amp;
152make &amp;&amp;
153PATH=$SAVEPATH &amp;&amp;
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;
167unset SAVEPATH</userinput></screen>
168
169 <para>
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
188 the number of enabled kernel options.
189 </para>
190
191 <!-- Results for LVM2.2.02.176:
192 ### 292 tests: 177 passed, 46 skipped, 0 timed out, 60 warned, 9 failed
193 -->
194
195 <para>
196 The tests do not implement the <quote>expected fail</quote> possibility,
197 and a small number of test failures is expected by upstream. More
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
200 explain some failures. Some tests are flagged
201 <quote>warned</quote> if
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>
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
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).
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>
227 </para>
228
229 <para>
230 Now, as the <systemitem class="username">root</systemitem> user:
231 </para>
232
233<screen role="root"><userinput>make install</userinput></screen>
234
235 </sect2>
236
237 <sect2 role="commands">
238 <title>Command Explanations</title>
239
240 <para>
241 <command>PATH=$PATH:/sbin:/usr/sbin</command>: The path
242 must contain <filename class="directory">/sbin</filename> and
243 <filename class='directory'>/usr/sbin</filename> for proper system tool
244 detection by the <command>configure</command> script. This instruction
245 ensures that PATH is properly set even if you build as an unprivileged user.
246 </para>
247
248 <para>
249 <parameter>--enable-applib</parameter>: This switch enables
250 building of the shared application library.
251 </para>
252
253 <para>
254 <parameter>--enable-cmdlib</parameter>: This switch enables
255 building of the shared command library. It is required
256 when building the event daemon.
257 </para>
258
259 <para>
260 <parameter>--enable-pkgconfig</parameter>: This switch enables
261 installation of <command>pkg-config</command> support files.
262 </para>
263
264 <para>
265 <parameter>--enable-udev_sync</parameter>: This switch enables
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>
274
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
282 </sect2>
283
284 <sect2 role="content">
285 <title>Contents</title>
286
287 <segmentedlist>
288 <segtitle>Installed Programs</segtitle>
289 <segtitle>Installed Libraries</segtitle>
290 <segtitle>Installed Directories</segtitle>
291
292 <seglistitem>
293 <seg>
294 blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, lvmconf,
295 lvmdump, and lvmetad (optional). There are also
296 numerous symbolic links to lvm that implement specific
297 functionalities
298 </seg>
299 <seg>
300 libdevmapper.so, liblvm2app.so, and liblvm2cmd.so; optional:
301 libdevmapper-event.so, libdevmapper-event-lvm2.so,
302 libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2snapshot.so,
303 libdevmapper-event-lvm2raid.so, and libdevmapper-event-lvm2thin.so
304 </seg>
305 <seg>
306 /etc/lvm and
307 /lib/device-mapper (optional)
308 </seg>
309 </seglistitem>
310 </segmentedlist>
311
312 <variablelist>
313 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
314 <?dbfo list-presentation="list"?>
315
316 <?dbhtml list-presentation="table"?>
317
318 <varlistentry id="blkdeactivate">
319 <term><command>blkdeactivate</command></term>
320 <listitem>
321 <para>
322 is a utility to deactivate block device.
323 </para>
324 <indexterm zone="lvm2 blkdeactivate">
325 <primary sortas="b-blkdeactivate">blkdeactivate</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
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
342 <varlistentry id="dmsetup">
343 <term><command>dmsetup</command></term>
344 <listitem>
345 <para>
346 is a low level logical volume management tool.
347 </para>
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>
357 <para>
358 is a utility used to resize or check filesystem on a device.
359 </para>
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>
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>
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>
384 <para>
385 is a script that modifies the locking configuration in
386 the <application>LVM2</application> configuration file.
387 </para>
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>
397 <para>
398 is a tool used to dump various information concerning
399 <application>LVM2</application>.
400 </para>
401 <indexterm zone="lvm2 lvmdump">
402 <primary sortas="b-lvmdump">lvmdump</primary>
403 </indexterm>
404 </listitem>
405 </varlistentry>
406
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
419 <varlistentry id="vgimportclone">
420 <term><command>vgimportclone</command></term>
421 <listitem>
422 <para>
423 is used to import a duplicated VG (e.g. hardware snapshot).
424 </para>
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>
434 <para>
435 contains the <application>Device Mapper</application> API
436 functions.
437 </para>
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.