source: postlfs/filesystems/lvm2.xml@ a2b672b

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 a2b672b was 0936f56, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Update to LVM2.2.03.12

  • Property mode set to 100644
File size: 14.8 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">
[0936f56]9 <!ENTITY lvm2-md5sum "ae295a6ecfeaf67a1dd795723fd227f6">
10 <!ENTITY lvm2-size "2.5 MB">
11 <!ENTITY lvm2-buildsize "37 MB (add 27 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 -->
[d5f6e8e]15 <!ENTITY lvm2-time "0.2 SBU (using parallelism=4; add 16 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
[9029db2]42 &lfs101_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]
125 &lt;*/M&gt; Mirror target [CONFIG_DM_MIRROR]
[302a619]126Kernel hacking ---&gt;
[f39cf0d0]127 Generic Kernel Debugging Instruments ---&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
[23ed085]144<screen><userinput>SAVEPATH=$PATH &amp;&amp;
[41d504a]145PATH=$PATH:/sbin:/usr/sbin &amp;&amp;
[e94d178]146./configure --prefix=/usr \
[4591404]147 --exec-prefix= \
148 --enable-cmdlib \
149 --enable-pkgconfig \
[46a9711b]150 --enable-udev_sync &amp;&amp;
[e94d178]151make &amp;&amp;
152PATH=$SAVEPATH &amp;&amp;
153unset SAVEPATH</userinput></screen>
[8bc3edae]154
[c627795]155 <para>
[99fcc47]156 The tests use <application>udev</application> for logical volume
[8991a7cb]157 synchronization, so the LVM udev rules and some utilities need to
[99fcc47]158 be installed before running the tests. If you are installing
159 <application>LVM2</application> for the first time, and do not
160 want to install the full package before running the tests, the minimal
161 set of utilities can be installed by running the following instructions
162 as the <systemitem class="username">root</systemitem> user:
163 </para>
164
[06908bf6]165<screen role="root"
166 remap="test"><userinput>make -C tools install_tools_dynamic &amp;&amp;
[99fcc47]167make -C udev install &amp;&amp;
168make -C libdm install</userinput></screen>
169
170 <para>
[06908bf6]171 To test the results, issue, as the
172 <systemitem class="username">root</systemitem> user:
173 </para>
174
175<screen role="root"
[8ec0245]176 remap="test"><userinput>make S=shell/thin-flags.sh check_local</userinput></screen>
[06908bf6]177
178 <para>
[8ec0245]179 The <command>S=...</command> option allows to skip tests. The
180 <command>shell/thin-flags.sh</command> test has been reported to freeze
181 the computer.
[06908bf6]182 Other targets are available and can be listed with
183 <command>make -C test help</command>. The test timings are very dependent
184 on the speed of the disk(s), and on the number of enabled kernel options.
[f9431b6]185 </para>
[20c731a]186
[6c6f393]187 <!-- Results for LVM2.2.02.176:
188 ### 292 tests: 177 passed, 46 skipped, 0 timed out, 60 warned, 9 failed
[5d01724]189
190 Results for LVM2.2.03.01:
191 ### 302 tests: 182 passed, 43 skipped, 0 timed out, 62 warned, 15 failed
[23ed085]192
193 Results for LVM2.2.03.05:
194 ### 326 tests: 255 passed, 58 skipped, 0 timed out, 2 warned, 11 failed
[1c6b54be]195
196 Results for LVM2.2.03.09:
197 ### 338 tests: 212 passed, 41 skipped, 0 timed out, 70 warned, 15 failed
[d5f6e8e]198
199 Results for LVM2.2.03.11:
200 ### 357 tests: 231 passed, 32 skipped, 0 timed out, 77 warned, 17 failed
[20c731a]201 -->
202
[f9431b6]203 <para>
[af8a78d]204 The tests do not implement the <quote>expected fail</quote> possibility,
[e94d178]205 and a small number of test failures is expected by upstream. More
[f9431b6]206 failures may happen because some kernel options are missing. For example,
207 the lack of the <emphasis>dm-delay</emphasis> device mapper target may
[53375fc]208 explain some failures. Some tests are flagged
[e94d178]209 <quote>warned</quote> if
[f9431b6]210 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
211 thin-provisioning-tools</ulink> are not installed. A workaround is to
212 add the following flags to <command>configure</command>:
213 </para>
214
215<screen role="nodump"><userinput> --with-thin-check= \
216 --with-thin-dump= \
217 --with-thin-repair= \
218 --with-thin-restore= \
219 --with-cache-check= \
220 --with-cache-dump= \
221 --with-cache-repair= \
222 --with-cache-restore= \</userinput></screen>
223
224 <para>
[0dc5c2e1]225 Some tests may hang. They can be removed if necessary, for example:
226 <command>rm test/shell/lvconvert-raid-reshape.sh</command>. The tests
227 generate a lot of kernel messages, which may clutter your terminal. You
228 can disable them by issuing <command>dmesg -D</command> before running
229 the tests (do not forget to issue <command>dmesg -E</command> when tests
230 are done).
[fbcb3846]231
232 <note><simpara>The checks create device nodes in the /tmp directory. The
233 tests will fail if /tmp is mounted with the nodev
234 option.</simpara></note>
[c627795]235 </para>
[8bc3edae]236
[c627795]237 <para>
238 Now, as the <systemitem class="username">root</systemitem> user:
239 </para>
[8bc3edae]240
[55dc313]241<screen role="root" revision="sysv"><userinput>make install</userinput></screen>
242
243<screen role="root" revision="systemd"><userinput>make install
244make install_systemd_units</userinput></screen>
[8bc3edae]245
246 </sect2>
247
248 <sect2 role="commands">
249 <title>Command Explanations</title>
250
[e94d178]251 <para>
[41d504a]252 <command>PATH=$PATH:/sbin:/usr/sbin</command>: The path
[e94d178]253 must contain <filename class="directory">/sbin</filename> and
254 <filename class='directory'>/usr/sbin</filename> for proper system tool
[41d504a]255 detection by the <command>configure</command> script. This instruction
[41e2bf5]256 ensures that PATH is properly set even if you build as an unprivileged user.
[e94d178]257 </para>
258
[c627795]259 <para>
[2800af7]260 <parameter>--enable-cmdlib</parameter>: This switch enables
[c627795]261 building of the shared command library. It is required
262 when building the event daemon.
263 </para>
264
265 <para>
[2800af7]266 <parameter>--enable-pkgconfig</parameter>: This switch enables
[c627795]267 installation of <command>pkg-config</command> support files.
268 </para>
269
270 <para>
[2800af7]271 <parameter>--enable-udev_sync</parameter>: This switch enables
[c627795]272 synchronisation with <application>Udev</application> processing.
273 </para>
274
275 <para>
276 <option>--enable-dmeventd</option>: This switch enables
277 building of the <application>Device Mapper</application>
278 event daemon.
279 </para>
[8bc3edae]280
[55dc313]281 <para revision="systemd">
282 <command>make install_systemd_units</command>: This is needed to install
283 a unit that activates logical volumes at boot. It is not installed
284 by default.
285 </para>
286
[8bc3edae]287 </sect2>
288
289 <sect2 role="content">
290 <title>Contents</title>
291
292 <segmentedlist>
293 <segtitle>Installed Programs</segtitle>
294 <segtitle>Installed Libraries</segtitle>
[c3c56b2]295 <segtitle>Installed Directories</segtitle>
[8bc3edae]296
297 <seglistitem>
[c627795]298 <seg>
[23ed085]299 blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, and lvmdump.
300 There are also numerous symbolic links to lvm that implement specific
[09765cf]301 functionalities
[c627795]302 </seg>
303 <seg>
[23ed085]304 libdevmapper.so and liblvm2cmd.so; optional:
[a037dab]305 libdevmapper-event.so, libdevmapper-event-lvm2.so,
[8ec0245]306 libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2raid.so,
307 libdevmapper-event-lvm2snapshot.so, and libdevmapper-event-lvm2thin.so
[c627795]308 </seg>
[c3c56b2]309 <seg>
[a037dab]310 /etc/lvm and
311 /lib/device-mapper (optional)
[c3c56b2]312 </seg>
[8bc3edae]313 </seglistitem>
314 </segmentedlist>
315
316 <variablelist>
317 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
318 <?dbfo list-presentation="list"?>
[61b95ac4]319
320 <?dbhtml list-presentation="table"?>
[8bc3edae]321
[8ed30d52]322 <varlistentry id="blkdeactivate">
323 <term><command>blkdeactivate</command></term>
324 <listitem>
325 <para>
[4c24eb0a]326 is a utility to deactivate block devices
[8ed30d52]327 </para>
328 <indexterm zone="lvm2 blkdeactivate">
329 <primary sortas="b-blkdeactivate">blkdeactivate</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
[a037dab]334 <varlistentry id="dmeventd">
335 <term><command>dmeventd</command></term>
336 <listitem>
337 <para>
[4c24eb0a]338 (optional) is the Device Mapper event daemon
[a037dab]339 </para>
340 <indexterm zone="lvm2 dmeventd">
341 <primary sortas="b-dmeventd">dmeventd</primary>
342 </indexterm>
343 </listitem>
344 </varlistentry>
345
[8bc3edae]346 <varlistentry id="dmsetup">
347 <term><command>dmsetup</command></term>
348 <listitem>
[c627795]349 <para>
[4c24eb0a]350 is a low level logical volume management tool
[c627795]351 </para>
[8bc3edae]352 <indexterm zone="lvm2 dmsetup">
353 <primary sortas="b-dmsetup">dmsetup</primary>
354 </indexterm>
355 </listitem>
356 </varlistentry>
357
358 <varlistentry id="fsadm">
359 <term><command>fsadm</command></term>
360 <listitem>
[c627795]361 <para>
[4c24eb0a]362 is a utility used to resize or check filesystem on a device
[c627795]363 </para>
[8bc3edae]364 <indexterm zone="lvm2 fsadm">
365 <primary sortas="b-fsadm">fsadm</primary>
366 </indexterm>
367 </listitem>
368 </varlistentry>
369
370 <varlistentry id="lvm">
371 <term><command>lvm</command></term>
372 <listitem>
[c627795]373 <para>
374 provides the command-line tools for <application>LVM2</application>.
375 Commands are implemented via sympolic links to this program to
376 manage physical devices (pv*), volume groups (vg*) and logical
[4c24eb0a]377 volumes (lv*)
[c627795]378 </para>
[8bc3edae]379 <indexterm zone="lvm2 lvm">
380 <primary sortas="b-lvm">lvm</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
[23ed085]385 <!--
[8bc3edae]386 <varlistentry id="lvmconf">
387 <term><command>lvmconf</command></term>
388 <listitem>
[c627795]389 <para>
[0d7900a]390 is a script that modifies the locking configuration in
[c627795]391 the <application>LVM2</application> configuration file.
392 </para>
[8bc3edae]393 <indexterm zone="lvm2 lvmconf">
394 <primary sortas="b-lvmconf">lvmconf</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
[23ed085]398 -->
[8bc3edae]399
400 <varlistentry id="lvmdump">
401 <term><command>lvmdump</command></term>
402 <listitem>
[c627795]403 <para>
404 is a tool used to dump various information concerning
[4c24eb0a]405 <application>LVM2</application>
[c627795]406 </para>
[8bc3edae]407 <indexterm zone="lvm2 lvmdump">
408 <primary sortas="b-lvmdump">lvmdump</primary>
409 </indexterm>
410 </listitem>
411 </varlistentry>
412
413 <varlistentry id="vgimportclone">
414 <term><command>vgimportclone</command></term>
415 <listitem>
[c627795]416 <para>
[4c24eb0a]417 is used to import a duplicated VG (e.g. hardware snapshot)
[c627795]418 </para>
[8bc3edae]419 <indexterm zone="lvm2 vgimportclone">
420 <primary sortas="b-vgimportclone">vgimportclone</primary>
421 </indexterm>
422 </listitem>
423 </varlistentry>
424
425 <varlistentry id="libdevmapper">
[4c24eb0a]426 <term><filename class="libraryfile">libdevmapper.so</filename></term>
[8bc3edae]427 <listitem>
[c627795]428 <para>
429 contains the <application>Device Mapper</application> API
[4c24eb0a]430 functions
[c627795]431 </para>
[8bc3edae]432 <indexterm zone="lvm2 libdevmapper">
433 <primary sortas="c-libdevmapper">libdevmapper.so</primary>
434 </indexterm>
435 </listitem>
436 </varlistentry>
437
438 </variablelist>
439
440 </sect2>
441
442</sect1>
Note: See TracBrowser for help on using the repository browser.