source: postlfs/filesystems/lvm2.xml@ 8558044

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 8558044 was 8558044, checked in by Pierre Labastie <pierre.labastie@…>, 3 years ago

Remove spaces at the end of lines

I know it is somewhat useless, but I don't like them for
two reasons: first they cannot be seen, and I do not like things I
cannot see. Second, git highlights them, and this is disturbing...

  • Property mode set to 100644
File size: 15.2 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 "c4be18fcb94c84c26f71ff4235917c28">
10 <!ENTITY lvm2-size "2.5 MB">
11 <!ENTITY lvm2-buildsize "37 MB (add 18 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 transient. I monitor /tmp with a loop during
14 tests. -pierre, August 2020 -->
15 <!ENTITY lvm2-time "0.2 SBU (using parallelism=4; add 9 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 <date>$Date$</date>
23 </sect1info>
24
25 <title>LVM2-&lvm2-version;</title>
26
27 <indexterm zone="lvm2">
28 <primary sortas="a-LVM2">LVM2</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to LVM2</title>
33
34 <para>
35 The <application>LVM2</application> package is a set of tools that manage
36 logical partitions. It allows spanning of file systems across multiple
37 physical disks and disk partitions and provides for dynamic growing or
38 shrinking of logical partitions, mirroring and low storage footprint
39 snapshots.
40 </para>
41
42 &lfs110a_checked;
43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
47 <para>
48 Download (HTTP): <ulink url="&lvm2-download-http;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download (FTP): <ulink url="&lvm2-download-ftp;"/>
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download MD5 sum: &lvm2-md5sum;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Download size: &lvm2-size;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated disk space required: &lvm2-buildsize;
69 </para>
70 </listitem>
71 <listitem>
72 <para>
73 Estimated build time: &lvm2-time;
74 </para>
75 </listitem>
76 </itemizedlist>
77
78 <bridgehead renderas="sect3">LVM2 Dependencies</bridgehead>
79
80 <bridgehead renderas="sect4">Required</bridgehead>
81 <para role="required">
82 <xref linkend='libaio'/>
83 </para>
84
85 <bridgehead renderas="sect4">Optional</bridgehead>
86 <para role="optional">
87 <xref linkend='mdadm'/>,
88 <xref linkend='reiserfs'/>,
89 <xref linkend='valgrind'/>,
90 <xref linkend='which'/>,
91 <xref linkend='xfsprogs'/> (all five may be used, but are not required,
92 for tests),
93 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
94 thin-provisioning-tools</ulink>, and
95 <ulink url="https://github.com/dm-vdo/vdo">vdo</ulink>
96 </para>
97
98 <para condition="html" role="usernotes">User Notes:
99 <ulink url="&blfs-wiki;/lvm2"/>
100 </para>
101
102 </sect2>
103
104 <sect2 role="kernel" id="lvm2-kernel">
105 <title>Kernel Configuration</title>
106
107 <para>
108 Enable the following options in the kernel configuration
109 and recompile the kernel:
110 </para>
111
112 <note><para>
113 There are several other Device Mapper options in the kernel beyond those
114 listed below. In order to get reasonable results if running the
115 regression tests, all must be enabled either internally or as a module.
116 The tests will all time out if Magic SysRq key is not enabled.
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; Cache target (EXPERIMENTAL) [CONFIG_DM_CACHE]
126 &lt;*/M&gt; Mirror target [CONFIG_DM_MIRROR]
127 &lt;*/M&gt; Zero target [CONFIG_DM_ZERO]
128 &lt;*/M&gt; I/O delaying target [CONFIG_DM_DELAY]
129 [*] Block devices ---&gt;
130 &lt;*/M&gt; RAM block device support [CONFIG_BLK_DEV_RAM]
131Kernel hacking ---&gt;
132 Generic Kernel Debugging Instruments ---&gt;
133 [*] Magic SysRq key [CONFIG_MAGIC_SYSRQ]</literal></screen>
134
135 <indexterm zone="lvm2 lvm2-kernel">
136 <primary sortas="d-lvm2">lvm2</primary>
137 </indexterm>
138
139 </sect2>
140
141 <sect2 role="installation">
142 <title>Installation of LVM2</title>
143
144 <para>
145 Install <application>LVM2</application> by running the following
146 commands:
147 </para>
148
149<screen><userinput>PATH+=:/usr/sbin \
150./configure --prefix=/usr \
151 --enable-cmdlib \
152 --enable-pkgconfig \
153 --enable-udev_sync &amp;&amp;
154make</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.
207 <!-- 1 -->More failures may happen because some kernel options are missing.
208 For example, the lack of the <emphasis>dm-delay</emphasis> device
209 mapper target explains some failures.
210 <!-- 2 -->Some tests may fail if there is insufficient free space available
211 in the partition with the /tmp directory. At least one test fails if 16 TB
212 is not available.
213 <!-- 3 -->Some tests are flagged <quote>warned</quote> if
214 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
215 thin-provisioning-tools</ulink> are not installed. A workaround is to
216 add the following flags to <command>configure</command>:
217 </para>
218
219<screen role="nodump"><userinput> --with-thin-check= \
220 --with-thin-dump= \
221 --with-thin-repair= \
222 --with-thin-restore= \
223 --with-cache-check= \
224 --with-cache-dump= \
225 --with-cache-repair= \
226 --with-cache-restore= \</userinput></screen>
227
228 <para>
229 Some tests may hang. They can be removed if necessary, for example:
230 <command>rm test/shell/lvconvert-raid-reshape.sh</command>. The tests
231 generate a lot of kernel messages, which may clutter your terminal. You
232 can disable them by issuing <command>dmesg -D</command> before running
233 the tests (do not forget to issue <command>dmesg -E</command> when tests
234 are done).
235
236 <note><simpara>The checks create device nodes in the /tmp directory. The
237 tests will fail if /tmp is mounted with the nodev option.
238 </simpara></note>
239 </para>
240
241 <para>
242 Now, as the <systemitem class="username">root</systemitem> user:
243 </para>
244
245<screen role="root" revision="sysv"><userinput>make install</userinput></screen>
246
247<screen role="root" revision="systemd"><userinput>make install
248make install_systemd_units</userinput></screen>
249
250 </sect2>
251
252 <sect2 role="commands">
253 <title>Command Explanations</title>
254
255 <para>
256 <command>PATH+=:/usr/sbin</command>: The path
257 must contain
258 <filename class='directory'>/usr/sbin</filename> for proper system tool
259 detection by the <command>configure</command> script. This instruction
260 ensures that PATH is properly set even if you build as an unprivileged user.
261 </para>
262
263 <para>
264 <parameter>--enable-cmdlib</parameter>: This switch enables
265 building of the shared command library. It is required
266 when building the event daemon.
267 </para>
268
269 <para>
270 <parameter>--enable-pkgconfig</parameter>: This switch enables
271 installation of <command>pkg-config</command> support files.
272 </para>
273
274 <para>
275 <parameter>--enable-udev_sync</parameter>: This switch enables
276 synchronisation with <application>Udev</application> processing.
277 </para>
278
279 <para>
280 <option>--enable-dmeventd</option>: This switch enables
281 building of the <application>Device Mapper</application>
282 event daemon.
283 </para>
284
285 <para revision="systemd">
286 <command>make install_systemd_units</command>: This is needed to install
287 a unit that activates logical volumes at boot. It is not installed
288 by default.
289 </para>
290
291 </sect2>
292
293 <sect2 role="content">
294 <title>Contents</title>
295
296 <segmentedlist>
297 <segtitle>Installed Programs</segtitle>
298 <segtitle>Installed Libraries</segtitle>
299 <segtitle>Installed Directories</segtitle>
300
301 <seglistitem>
302 <seg>
303 blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, and lvmdump.
304 There are also numerous symbolic links to lvm that implement specific
305 functionalities
306 </seg>
307 <seg>
308 libdevmapper.so and liblvm2cmd.so; optional:
309 libdevmapper-event.so, libdevmapper-event-lvm2.so,
310 libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2raid.so,
311 libdevmapper-event-lvm2snapshot.so, and libdevmapper-event-lvm2thin.so
312 </seg>
313 <seg>
314 /etc/lvm and
315 /lib/device-mapper (optional)
316 </seg>
317 </seglistitem>
318 </segmentedlist>
319
320 <variablelist>
321 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
322 <?dbfo list-presentation="list"?>
323
324 <?dbhtml list-presentation="table"?>
325
326 <varlistentry id="blkdeactivate">
327 <term><command>blkdeactivate</command></term>
328 <listitem>
329 <para>
330 is a utility to deactivate block devices
331 </para>
332 <indexterm zone="lvm2 blkdeactivate">
333 <primary sortas="b-blkdeactivate">blkdeactivate</primary>
334 </indexterm>
335 </listitem>
336 </varlistentry>
337
338 <varlistentry id="dmeventd">
339 <term><command>dmeventd</command></term>
340 <listitem>
341 <para>
342 (optional) is the Device Mapper event daemon
343 </para>
344 <indexterm zone="lvm2 dmeventd">
345 <primary sortas="b-dmeventd">dmeventd</primary>
346 </indexterm>
347 </listitem>
348 </varlistentry>
349
350 <varlistentry id="dmsetup">
351 <term><command>dmsetup</command></term>
352 <listitem>
353 <para>
354 is a low level logical volume management tool
355 </para>
356 <indexterm zone="lvm2 dmsetup">
357 <primary sortas="b-dmsetup">dmsetup</primary>
358 </indexterm>
359 </listitem>
360 </varlistentry>
361
362 <varlistentry id="fsadm">
363 <term><command>fsadm</command></term>
364 <listitem>
365 <para>
366 is a utility used to resize or check filesystem on a device
367 </para>
368 <indexterm zone="lvm2 fsadm">
369 <primary sortas="b-fsadm">fsadm</primary>
370 </indexterm>
371 </listitem>
372 </varlistentry>
373
374 <varlistentry id="lvm">
375 <term><command>lvm</command></term>
376 <listitem>
377 <para>
378 provides the command-line tools for <application>LVM2</application>.
379 Commands are implemented via sympolic links to this program to
380 manage physical devices (pv*), volume groups (vg*) and logical
381 volumes (lv*)
382 </para>
383 <indexterm zone="lvm2 lvm">
384 <primary sortas="b-lvm">lvm</primary>
385 </indexterm>
386 </listitem>
387 </varlistentry>
388
389 <!--
390 <varlistentry id="lvmconf">
391 <term><command>lvmconf</command></term>
392 <listitem>
393 <para>
394 is a script that modifies the locking configuration in
395 the <application>LVM2</application> configuration file.
396 </para>
397 <indexterm zone="lvm2 lvmconf">
398 <primary sortas="b-lvmconf">lvmconf</primary>
399 </indexterm>
400 </listitem>
401 </varlistentry>
402 -->
403
404 <varlistentry id="lvmdump">
405 <term><command>lvmdump</command></term>
406 <listitem>
407 <para>
408 is a tool used to dump various information concerning
409 <application>LVM2</application>
410 </para>
411 <indexterm zone="lvm2 lvmdump">
412 <primary sortas="b-lvmdump">lvmdump</primary>
413 </indexterm>
414 </listitem>
415 </varlistentry>
416
417 <varlistentry id="vgimportclone">
418 <term><command>vgimportclone</command></term>
419 <listitem>
420 <para>
421 is used to import a duplicated VG (e.g. hardware snapshot)
422 </para>
423 <indexterm zone="lvm2 vgimportclone">
424 <primary sortas="b-vgimportclone">vgimportclone</primary>
425 </indexterm>
426 </listitem>
427 </varlistentry>
428
429 <varlistentry id="libdevmapper">
430 <term><filename class="libraryfile">libdevmapper.so</filename></term>
431 <listitem>
432 <para>
433 contains the <application>Device Mapper</application> API
434 functions
435 </para>
436 <indexterm zone="lvm2 libdevmapper">
437 <primary sortas="c-libdevmapper">libdevmapper.so</primary>
438 </indexterm>
439 </listitem>
440 </varlistentry>
441
442 </variablelist>
443
444 </sect2>
445
446</sect1>
Note: See TracBrowser for help on using the repository browser.