source: postlfs/filesystems/lvm2.xml@ 213d18c

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 xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 213d18c was 213d18c, checked in by Pierre Labastie <pierre.labastie@…>, 18 months ago

Update to LVM2-2.03.17

  • Property mode set to 100644
File size: 16.7 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
[0dc5c2e1]7 <!ENTITY lvm2-download-http "https://sourceware.org/ftp/lvm2/LVM2.&lvm2-version;.tgz">
[e65320b]8 <!ENTITY lvm2-download-ftp "ftp://sourceware.org/pub/lvm2/LVM2.&lvm2-version;.tgz">
[213d18c]9 <!ENTITY lvm2-md5sum "cf6927fcf772b15d5b00f4db938f496a">
10 <!ENTITY lvm2-size "2.6 MB">
11 <!ENTITY lvm2-buildsize "45 MB (add 25 MB for tests; transient files can grow up to around 800 MB in the /tmp directory during tests)">
[8ec0245]12 <!-- My build size was 124 MB with tests, but I'll leave this here. -renodr
[0936f56]13 The files in /tmp are transient. I monitor /tmp with a loop during
[8ec0245]14 tests. -pierre, August 2020 -->
[e43a4270]15 <!ENTITY lvm2-time "0.2 SBU (using parallelism=4; add 9 to 48 SBU for tests, depending on disk speed)">
[8bc3edae]16]>
17
[c627795]18<sect1 id="lvm2" xreflabel="LVM2-&lvm2-version;">
[8bc3edae]19 <?dbhtml filename="lvm2.html"?>
20
21 <sect1info>
22 <date>$Date$</date>
23 </sect1info>
24
[c627795]25 <title>LVM2-&lvm2-version;</title>
[8bc3edae]26
27 <indexterm zone="lvm2">
[c627795]28 <primary sortas="a-LVM2">LVM2</primary>
[8bc3edae]29 </indexterm>
30
31 <sect2 role="package">
[c627795]32 <title>Introduction to LVM2</title>
[8bc3edae]33
[c627795]34 <para>
[99fcc47]35 The <application>LVM2</application> package is a set of tools that manage
[c627795]36 logical partitions. It allows spanning of file systems across multiple
37 physical disks and disk partitions and provides for dynamic growing or
[99fcc47]38 shrinking of logical partitions, mirroring and low storage footprint
39 snapshots.
[c627795]40 </para>
[8bc3edae]41
[48cb482]42 &lfs112_checked;
[8bc3edae]43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
[f60cf4a]46 <listitem>
[c627795]47 <para>
48 Download (HTTP): <ulink url="&lvm2-download-http;"/>
49 </para>
[f60cf4a]50 </listitem>
[8bc3edae]51 <listitem>
[c627795]52 <para>
53 Download (FTP): <ulink url="&lvm2-download-ftp;"/>
54 </para>
[8bc3edae]55 </listitem>
56 <listitem>
[c627795]57 <para>
58 Download MD5 sum: &lvm2-md5sum;
59 </para>
[8bc3edae]60 </listitem>
61 <listitem>
[c627795]62 <para>
63 Download size: &lvm2-size;
64 </para>
[8bc3edae]65 </listitem>
66 <listitem>
[c627795]67 <para>
68 Estimated disk space required: &lvm2-buildsize;
69 </para>
[8bc3edae]70 </listitem>
71 <listitem>
[c627795]72 <para>
73 Estimated build time: &lvm2-time;
74 </para>
[8bc3edae]75 </listitem>
76 </itemizedlist>
77
[b5e8375]78 <bridgehead renderas="sect3">LVM2 Dependencies</bridgehead>
79
[3964f59]80 <bridgehead renderas="sect4">Required</bridgehead>
81 <para role="required">
[8991a7cb]82 <xref linkend='libaio'/>
[3964f59]83 </para>
84
[b5e8375]85 <bridgehead renderas="sect4">Optional</bridgehead>
86 <para role="optional">
[99fcc47]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,
[d5f6e8e]92 for tests),
[99fcc47]93 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
[d5f6e8e]94 thin-provisioning-tools</ulink>, and
95 <ulink url="https://github.com/dm-vdo/vdo">vdo</ulink>
[b5e8375]96 </para>
97
[8bc3edae]98 <para condition="html" role="usernotes">User Notes:
[c627795]99 <ulink url="&blfs-wiki;/lvm2"/>
100 </para>
[09765cf]101
[8bc3edae]102 </sect2>
103
[c627795]104 <sect2 role="kernel" id="lvm2-kernel">
[7e1df8f9]105 <title>Kernel Configuration</title>
106
[c627795]107 <para>
[421128a1]108 Enable the following options in the kernel configuration
[c627795]109 and recompile the kernel:
110 </para>
[7e1df8f9]111
[b5e8375]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.
[302a619]116 The tests will all time out if Magic SysRq key is not enabled.
[b5e8375]117 </para></note>
118
[7e1df8f9]119<screen><literal>Device Drivers ---&gt;
[421128a1]120 [*] Multiple devices driver support (RAID and LVM) ---&gt; [CONFIG_MD]
121 &lt;*/M&gt; Device mapper support [CONFIG_BLK_DEV_DM]
[f39cf0d0]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]
[e43a4270]125 &lt;*/M&gt; Cache target (EXPERIMENTAL) [CONFIG_DM_CACHE]
[f39cf0d0]126 &lt;*/M&gt; Mirror target [CONFIG_DM_MIRROR]
[e43a4270]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]
[302a619]131Kernel hacking ---&gt;
[f39cf0d0]132 Generic Kernel Debugging Instruments ---&gt;
133 [*] Magic SysRq key [CONFIG_MAGIC_SYSRQ]</literal></screen>
[7e1df8f9]134
135 <indexterm zone="lvm2 lvm2-kernel">
136 <primary sortas="d-lvm2">lvm2</primary>
137 </indexterm>
138
139 </sect2>
140
[8bc3edae]141 <sect2 role="installation">
[c627795]142 <title>Installation of LVM2</title>
[8bc3edae]143
[c627795]144 <para>
145 Install <application>LVM2</application> by running the following
146 commands:
147 </para>
[8bc3edae]148
[22e249a]149<screen><userinput>PATH+=:/usr/sbin \
[e94d178]150./configure --prefix=/usr \
[4591404]151 --enable-cmdlib \
152 --enable-pkgconfig \
[46a9711b]153 --enable-udev_sync &amp;&amp;
[c470ab9]154make</userinput></screen>
[8bc3edae]155
[c627795]156 <para>
[99fcc47]157 The tests use <application>udev</application> for logical volume
[8991a7cb]158 synchronization, so the LVM udev rules and some utilities need to
[99fcc47]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
[06908bf6]166<screen role="root"
167 remap="test"><userinput>make -C tools install_tools_dynamic &amp;&amp;
[99fcc47]168make -C udev install &amp;&amp;
169make -C libdm install</userinput></screen>
170
171 <para>
[06908bf6]172 To test the results, issue, as the
173 <systemitem class="username">root</systemitem> user:
174 </para>
175
176<screen role="root"
[213d18c]177 remap="test"><userinput>LC_ALL=en_US.UTF-8 make check_local</userinput></screen>
[06908bf6]178
179 <para>
[213d18c]180 Some tests may hang. In this case they can be skipped by adding
181 <command>S=&lt;testname&gt;</command> to the <command>make</command>
182 command.
[06908bf6]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.
[f9431b6]186 </para>
[20c731a]187
[6c6f393]188 <!-- Results for LVM2.2.02.176:
189 ### 292 tests: 177 passed, 46 skipped, 0 timed out, 60 warned, 9 failed
[5d01724]190
191 Results for LVM2.2.03.01:
192 ### 302 tests: 182 passed, 43 skipped, 0 timed out, 62 warned, 15 failed
[23ed085]193
194 Results for LVM2.2.03.05:
195 ### 326 tests: 255 passed, 58 skipped, 0 timed out, 2 warned, 11 failed
[1c6b54be]196
197 Results for LVM2.2.03.09:
198 ### 338 tests: 212 passed, 41 skipped, 0 timed out, 70 warned, 15 failed
[d5f6e8e]199
200 Results for LVM2.2.03.11:
201 ### 357 tests: 231 passed, 32 skipped, 0 timed out, 77 warned, 17 failed
[51ba03e]202
203 Results for LVM2.2.03.14:
204 ### 389 tests: 304 passed, 73 skipped, 0 timed out, 2 warned, 10 failed
[f9478ee]205
206 Results for LVM2.2.03.16:
207 ### 395 tests: 241 passed, 145 skipped, 0 timed out, 1 warned, 8 failed
[213d18c]208
209 Results for LVM2.2.03.17:
210 ### 403 tests: 333 passed, 61 skipped, 0 timed out, 3 warned, 6 failed
[20c731a]211 -->
212
[f9431b6]213 <para>
[af8a78d]214 The tests do not implement the <quote>expected fail</quote> possibility,
[8558044]215 and a small number of test failures is expected by upstream.
216 <!-- 1 -->More failures may happen because some kernel options are missing.
217 For example, the lack of the <emphasis>dm-delay</emphasis> device
218 mapper target explains some failures.
219 <!-- 2 -->Some tests may fail if there is insufficient free space available
220 in the partition with the /tmp directory. At least one test fails if 16 TB
[e43a4270]221 is not available.
222 <!-- 3 -->Some tests are flagged <quote>warned</quote> if
[f9431b6]223 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
224 thin-provisioning-tools</ulink> are not installed. A workaround is to
225 add the following flags to <command>configure</command>:
226 </para>
227
228<screen role="nodump"><userinput> --with-thin-check= \
229 --with-thin-dump= \
230 --with-thin-repair= \
231 --with-thin-restore= \
232 --with-cache-check= \
233 --with-cache-dump= \
234 --with-cache-repair= \
235 --with-cache-restore= \</userinput></screen>
236
237 <para>
[0dc5c2e1]238 Some tests may hang. They can be removed if necessary, for example:
239 <command>rm test/shell/lvconvert-raid-reshape.sh</command>. The tests
240 generate a lot of kernel messages, which may clutter your terminal. You
241 can disable them by issuing <command>dmesg -D</command> before running
242 the tests (do not forget to issue <command>dmesg -E</command> when tests
243 are done).
[fbcb3846]244
245 <note><simpara>The checks create device nodes in the /tmp directory. The
[e43a4270]246 tests will fail if /tmp is mounted with the nodev option.
247 </simpara></note>
[c627795]248 </para>
[8bc3edae]249
[c627795]250 <para>
251 Now, as the <systemitem class="username">root</systemitem> user:
252 </para>
[8bc3edae]253
[bbc76b21]254<screen role="root" revision="sysv"><userinput>make install
[213d18c]255rm -fv /usr/lib/udev/rules.d/69-dm-lvm.rules</userinput></screen>
[55dc313]256
257<screen role="root" revision="systemd"><userinput>make install
258make install_systemd_units</userinput></screen>
[8bc3edae]259
260 </sect2>
261
262 <sect2 role="commands">
263 <title>Command Explanations</title>
264
[e94d178]265 <para>
[22e249a]266 <command>PATH+=:/usr/sbin</command>: The path
267 must contain
[e94d178]268 <filename class='directory'>/usr/sbin</filename> for proper system tool
[41d504a]269 detection by the <command>configure</command> script. This instruction
[41e2bf5]270 ensures that PATH is properly set even if you build as an unprivileged user.
[e94d178]271 </para>
272
[c627795]273 <para>
[2800af7]274 <parameter>--enable-cmdlib</parameter>: This switch enables
[c627795]275 building of the shared command library. It is required
276 when building the event daemon.
277 </para>
278
279 <para>
[2800af7]280 <parameter>--enable-pkgconfig</parameter>: This switch enables
[c627795]281 installation of <command>pkg-config</command> support files.
282 </para>
283
284 <para>
[2800af7]285 <parameter>--enable-udev_sync</parameter>: This switch enables
[c627795]286 synchronisation with <application>Udev</application> processing.
287 </para>
288
289 <para>
290 <option>--enable-dmeventd</option>: This switch enables
291 building of the <application>Device Mapper</application>
292 event daemon.
293 </para>
[8bc3edae]294
[bbc76b21]295 <para revision="sysv">
296 <command>rm .../69-dm-lvm.rules</command>: Under certain circumstances,
297 this udev rule calls <command>systemd-run</command>, which is not
298 available on sysv. It performs actions that are done by another boot
299 script anyway, so it is not needed.
300 </para>
301
[55dc313]302 <para revision="systemd">
303 <command>make install_systemd_units</command>: This is needed to install
304 a unit that activates logical volumes at boot. It is not installed
305 by default.
306 </para>
307
[8bc3edae]308 </sect2>
309
[ff12c0f]310 <sect2 role="configuration" revision="systemd">
311 <title>Configuring LVM2</title>
312
313 <sect3 id="lvm2-config">
314 <title>Config File</title>
315 <para>
316 <filename>/etc/lvm/lvm.conf</filename>
317 </para>
318
319 <indexterm zone="lvm2 lvm2-config">
320 <primary
321 sortas="e-etc-lvm-lvm.conf">/etc/lvm/lvm.conf</primary>
322 </indexterm>
323 </sect3>
324
325 <sect3><title>Configuration Information</title>
326 <para>
327 The default configuration still references the obsolete <filename
328 class="directory">/var/lock</filename> directory. This creates
[9169ed5d]329 a deadlock at boot time. Change this (as the <systemitem
[ff12c0f]330 class="username">root</systemitem> user):
331 </para>
332
333<screen role="root"><userinput>sed -e '/locking_dir =/{s/#//;s/var/run/}' \
334 -i /etc/lvm/lvm.conf</userinput></screen>
335
336 </sect3>
337 </sect2>
338
[8bc3edae]339 <sect2 role="content">
340 <title>Contents</title>
341
342 <segmentedlist>
343 <segtitle>Installed Programs</segtitle>
344 <segtitle>Installed Libraries</segtitle>
[c3c56b2]345 <segtitle>Installed Directories</segtitle>
[8bc3edae]346
347 <seglistitem>
[c627795]348 <seg>
[51ba03e]349 blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, lvmdump,
350 and lvm_import_vdo.
[23ed085]351 There are also numerous symbolic links to lvm that implement specific
[09765cf]352 functionalities
[c627795]353 </seg>
354 <seg>
[23ed085]355 libdevmapper.so and liblvm2cmd.so; optional:
[a037dab]356 libdevmapper-event.so, libdevmapper-event-lvm2.so,
[8ec0245]357 libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2raid.so,
[51ba03e]358 libdevmapper-event-lvm2snapshot.so, libdevmapper-event-lvm2thin.so,
359 and libdevmapper-event-lvm2vdo.so
[c627795]360 </seg>
[c3c56b2]361 <seg>
[a037dab]362 /etc/lvm and
[51ba03e]363 /usr/lib/device-mapper (optional)
[c3c56b2]364 </seg>
[8bc3edae]365 </seglistitem>
366 </segmentedlist>
367
368 <variablelist>
369 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
370 <?dbfo list-presentation="list"?>
[61b95ac4]371
372 <?dbhtml list-presentation="table"?>
[8bc3edae]373
[8ed30d52]374 <varlistentry id="blkdeactivate">
375 <term><command>blkdeactivate</command></term>
376 <listitem>
377 <para>
[4c24eb0a]378 is a utility to deactivate block devices
[8ed30d52]379 </para>
380 <indexterm zone="lvm2 blkdeactivate">
381 <primary sortas="b-blkdeactivate">blkdeactivate</primary>
382 </indexterm>
383 </listitem>
384 </varlistentry>
385
[a037dab]386 <varlistentry id="dmeventd">
387 <term><command>dmeventd</command></term>
388 <listitem>
389 <para>
[4c24eb0a]390 (optional) is the Device Mapper event daemon
[a037dab]391 </para>
392 <indexterm zone="lvm2 dmeventd">
393 <primary sortas="b-dmeventd">dmeventd</primary>
394 </indexterm>
395 </listitem>
396 </varlistentry>
397
[8bc3edae]398 <varlistentry id="dmsetup">
399 <term><command>dmsetup</command></term>
400 <listitem>
[c627795]401 <para>
[4c24eb0a]402 is a low level logical volume management tool
[c627795]403 </para>
[8bc3edae]404 <indexterm zone="lvm2 dmsetup">
405 <primary sortas="b-dmsetup">dmsetup</primary>
406 </indexterm>
407 </listitem>
408 </varlistentry>
409
410 <varlistentry id="fsadm">
411 <term><command>fsadm</command></term>
412 <listitem>
[c627795]413 <para>
[4c24eb0a]414 is a utility used to resize or check filesystem on a device
[c627795]415 </para>
[8bc3edae]416 <indexterm zone="lvm2 fsadm">
417 <primary sortas="b-fsadm">fsadm</primary>
418 </indexterm>
419 </listitem>
420 </varlistentry>
421
422 <varlistentry id="lvm">
423 <term><command>lvm</command></term>
424 <listitem>
[c627795]425 <para>
426 provides the command-line tools for <application>LVM2</application>.
[b9c353b]427 Commands are implemented via symbolic links to this program to
[c627795]428 manage physical devices (pv*), volume groups (vg*) and logical
[4c24eb0a]429 volumes (lv*)
[c627795]430 </para>
[8bc3edae]431 <indexterm zone="lvm2 lvm">
432 <primary sortas="b-lvm">lvm</primary>
433 </indexterm>
434 </listitem>
435 </varlistentry>
436
[23ed085]437 <!--
[8bc3edae]438 <varlistentry id="lvmconf">
439 <term><command>lvmconf</command></term>
440 <listitem>
[c627795]441 <para>
[0d7900a]442 is a script that modifies the locking configuration in
[c627795]443 the <application>LVM2</application> configuration file.
444 </para>
[8bc3edae]445 <indexterm zone="lvm2 lvmconf">
446 <primary sortas="b-lvmconf">lvmconf</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
[23ed085]450 -->
[8bc3edae]451
452 <varlistentry id="lvmdump">
453 <term><command>lvmdump</command></term>
454 <listitem>
[c627795]455 <para>
456 is a tool used to dump various information concerning
[4c24eb0a]457 <application>LVM2</application>
[c627795]458 </para>
[8bc3edae]459 <indexterm zone="lvm2 lvmdump">
460 <primary sortas="b-lvmdump">lvmdump</primary>
461 </indexterm>
462 </listitem>
463 </varlistentry>
464
465 <varlistentry id="vgimportclone">
466 <term><command>vgimportclone</command></term>
467 <listitem>
[c627795]468 <para>
[4c24eb0a]469 is used to import a duplicated VG (e.g. hardware snapshot)
[c627795]470 </para>
[8bc3edae]471 <indexterm zone="lvm2 vgimportclone">
472 <primary sortas="b-vgimportclone">vgimportclone</primary>
473 </indexterm>
474 </listitem>
475 </varlistentry>
476
477 <varlistentry id="libdevmapper">
[4c24eb0a]478 <term><filename class="libraryfile">libdevmapper.so</filename></term>
[8bc3edae]479 <listitem>
[c627795]480 <para>
481 contains the <application>Device Mapper</application> API
[4c24eb0a]482 functions
[c627795]483 </para>
[8bc3edae]484 <indexterm zone="lvm2 libdevmapper">
485 <primary sortas="c-libdevmapper">libdevmapper.so</primary>
486 </indexterm>
487 </listitem>
488 </varlistentry>
489
490 </variablelist>
491
492 </sect2>
493
494</sect1>
Note: See TracBrowser for help on using the repository browser.