source: postlfs/filesystems/lvm2.xml@ d5cc78a

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since d5cc78a was 9029db2, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tag most of General Libraries and dependencies

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

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