source: postlfs/filesystems/lvm2.xml@ d5f6e8e

10.1 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 d5f6e8e was d5f6e8e, checked in by Douglas R. Reno <renodr@…>, 3 years ago

Update to wget-1.21.1
Update to doxygen-1.9.1
Update to LVM2-2.03.11
Update to gpgme-1.15.1

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

  • Property mode set to 100644
File size: 14.9 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">
[d5f6e8e]9 <!ENTITY lvm2-md5sum "81b7a8b59d3f7ecf9dc00f978f41d725">
[a5bc3d2]10 <!ENTITY lvm2-size "2.4 MB">
[d5f6e8e]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)">
[8ec0245]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 -->
[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 <othername>$LastChangedBy$</othername>
23 <date>$Date$</date>
24 </sect1info>
25
[c627795]26 <title>LVM2-&lvm2-version;</title>
[8bc3edae]27
28 <indexterm zone="lvm2">
[c627795]29 <primary sortas="a-LVM2">LVM2</primary>
[8bc3edae]30 </indexterm>
31
32 <sect2 role="package">
[c627795]33 <title>Introduction to LVM2</title>
[8bc3edae]34
[c627795]35 <para>
[99fcc47]36 The <application>LVM2</application> package is a set of tools that manage
[c627795]37 logical partitions. It allows spanning of file systems across multiple
38 physical disks and disk partitions and provides for dynamic growing or
[99fcc47]39 shrinking of logical partitions, mirroring and low storage footprint
40 snapshots.
[c627795]41 </para>
[8bc3edae]42
[87351a9]43 &lfs10_checked;
[8bc3edae]44
45 <bridgehead renderas="sect3">Package Information</bridgehead>
46 <itemizedlist spacing="compact">
[f60cf4a]47 <listitem>
[c627795]48 <para>
49 Download (HTTP): <ulink url="&lvm2-download-http;"/>
50 </para>
[f60cf4a]51 </listitem>
[8bc3edae]52 <listitem>
[c627795]53 <para>
54 Download (FTP): <ulink url="&lvm2-download-ftp;"/>
55 </para>
[8bc3edae]56 </listitem>
57 <listitem>
[c627795]58 <para>
59 Download MD5 sum: &lvm2-md5sum;
60 </para>
[8bc3edae]61 </listitem>
62 <listitem>
[c627795]63 <para>
64 Download size: &lvm2-size;
65 </para>
[8bc3edae]66 </listitem>
67 <listitem>
[c627795]68 <para>
69 Estimated disk space required: &lvm2-buildsize;
70 </para>
[8bc3edae]71 </listitem>
72 <listitem>
[c627795]73 <para>
74 Estimated build time: &lvm2-time;
75 </para>
[8bc3edae]76 </listitem>
77 </itemizedlist>
78
[b5e8375]79 <bridgehead renderas="sect3">LVM2 Dependencies</bridgehead>
80
[3964f59]81 <bridgehead renderas="sect4">Required</bridgehead>
82 <para role="required">
[8991a7cb]83 <xref linkend='libaio'/>
[3964f59]84 </para>
85
[b5e8375]86 <bridgehead renderas="sect4">Optional</bridgehead>
87 <para role="optional">
[99fcc47]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,
[d5f6e8e]93 for tests),
[99fcc47]94 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
[d5f6e8e]95 thin-provisioning-tools</ulink>, and
96 <ulink url="https://github.com/dm-vdo/vdo">vdo</ulink>
[b5e8375]97 </para>
98
[8bc3edae]99 <para condition="html" role="usernotes">User Notes:
[c627795]100 <ulink url="&blfs-wiki;/lvm2"/>
101 </para>
[09765cf]102
[8bc3edae]103 </sect2>
104
[c627795]105 <sect2 role="kernel" id="lvm2-kernel">
[7e1df8f9]106 <title>Kernel Configuration</title>
107
[c627795]108 <para>
[421128a1]109 Enable the following options in the kernel configuration
[c627795]110 and recompile the kernel:
111 </para>
[7e1df8f9]112
[b5e8375]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.
[302a619]117 The tests will all time out if Magic SysRq key is not enabled.
[b5e8375]118 </para></note>
119
[7e1df8f9]120<screen><literal>Device Drivers ---&gt;
[421128a1]121 [*] Multiple devices driver support (RAID and LVM) ---&gt; [CONFIG_MD]
122 &lt;*/M&gt; Device mapper support [CONFIG_BLK_DEV_DM]
[f39cf0d0]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]
[302a619]127Kernel hacking ---&gt;
[f39cf0d0]128 Generic Kernel Debugging Instruments ---&gt;
129 [*] Magic SysRq key [CONFIG_MAGIC_SYSRQ]</literal></screen>
[7e1df8f9]130
131 <indexterm zone="lvm2 lvm2-kernel">
132 <primary sortas="d-lvm2">lvm2</primary>
133 </indexterm>
134
135 </sect2>
136
[8bc3edae]137 <sect2 role="installation">
[c627795]138 <title>Installation of LVM2</title>
[8bc3edae]139
[c627795]140 <para>
141 Install <application>LVM2</application> by running the following
142 commands:
143 </para>
[8bc3edae]144
[23ed085]145<screen><userinput>SAVEPATH=$PATH &amp;&amp;
[41d504a]146PATH=$PATH:/sbin:/usr/sbin &amp;&amp;
[e94d178]147./configure --prefix=/usr \
[4591404]148 --exec-prefix= \
149 --enable-cmdlib \
150 --enable-pkgconfig \
[46a9711b]151 --enable-udev_sync &amp;&amp;
[e94d178]152make &amp;&amp;
153PATH=$SAVEPATH &amp;&amp;
154unset SAVEPATH</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"
[8ec0245]177 remap="test"><userinput>make S=shell/thin-flags.sh check_local</userinput></screen>
[06908bf6]178
179 <para>
[8ec0245]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.
[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
[20c731a]202 -->
203
[f9431b6]204 <para>
[af8a78d]205 The tests do not implement the <quote>expected fail</quote> possibility,
[e94d178]206 and a small number of test failures is expected by upstream. More
[f9431b6]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
[53375fc]209 explain some failures. Some tests are flagged
[e94d178]210 <quote>warned</quote> if
[f9431b6]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>
[0dc5c2e1]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).
[fbcb3846]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>
[c627795]236 </para>
[8bc3edae]237
[c627795]238 <para>
239 Now, as the <systemitem class="username">root</systemitem> user:
240 </para>
[8bc3edae]241
[55dc313]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>
[8bc3edae]246
247 </sect2>
248
249 <sect2 role="commands">
250 <title>Command Explanations</title>
251
[e94d178]252 <para>
[41d504a]253 <command>PATH=$PATH:/sbin:/usr/sbin</command>: The path
[e94d178]254 must contain <filename class="directory">/sbin</filename> and
255 <filename class='directory'>/usr/sbin</filename> for proper system tool
[41d504a]256 detection by the <command>configure</command> script. This instruction
[41e2bf5]257 ensures that PATH is properly set even if you build as an unprivileged user.
[e94d178]258 </para>
259
[c627795]260 <para>
[2800af7]261 <parameter>--enable-cmdlib</parameter>: This switch enables
[c627795]262 building of the shared command library. It is required
263 when building the event daemon.
264 </para>
265
266 <para>
[2800af7]267 <parameter>--enable-pkgconfig</parameter>: This switch enables
[c627795]268 installation of <command>pkg-config</command> support files.
269 </para>
270
271 <para>
[2800af7]272 <parameter>--enable-udev_sync</parameter>: This switch enables
[c627795]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>
[8bc3edae]281
[55dc313]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
[8bc3edae]288 </sect2>
289
290 <sect2 role="content">
291 <title>Contents</title>
292
293 <segmentedlist>
294 <segtitle>Installed Programs</segtitle>
295 <segtitle>Installed Libraries</segtitle>
[c3c56b2]296 <segtitle>Installed Directories</segtitle>
[8bc3edae]297
298 <seglistitem>
[c627795]299 <seg>
[23ed085]300 blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, and lvmdump.
301 There are also numerous symbolic links to lvm that implement specific
[09765cf]302 functionalities
[c627795]303 </seg>
304 <seg>
[23ed085]305 libdevmapper.so and liblvm2cmd.so; optional:
[a037dab]306 libdevmapper-event.so, libdevmapper-event-lvm2.so,
[8ec0245]307 libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2raid.so,
308 libdevmapper-event-lvm2snapshot.so, and libdevmapper-event-lvm2thin.so
[c627795]309 </seg>
[c3c56b2]310 <seg>
[a037dab]311 /etc/lvm and
312 /lib/device-mapper (optional)
[c3c56b2]313 </seg>
[8bc3edae]314 </seglistitem>
315 </segmentedlist>
316
317 <variablelist>
318 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
319 <?dbfo list-presentation="list"?>
[61b95ac4]320
321 <?dbhtml list-presentation="table"?>
[8bc3edae]322
[8ed30d52]323 <varlistentry id="blkdeactivate">
324 <term><command>blkdeactivate</command></term>
325 <listitem>
326 <para>
[8991a7cb]327 is a utility to deactivate block devices.
[8ed30d52]328 </para>
329 <indexterm zone="lvm2 blkdeactivate">
330 <primary sortas="b-blkdeactivate">blkdeactivate</primary>
331 </indexterm>
332 </listitem>
333 </varlistentry>
334
[a037dab]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
[8bc3edae]347 <varlistentry id="dmsetup">
348 <term><command>dmsetup</command></term>
349 <listitem>
[c627795]350 <para>
351 is a low level logical volume management tool.
352 </para>
[8bc3edae]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>
[c627795]362 <para>
[73fe507]363 is a utility used to resize or check filesystem on a device.
[c627795]364 </para>
[8bc3edae]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>
[c627795]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>
[8bc3edae]380 <indexterm zone="lvm2 lvm">
381 <primary sortas="b-lvm">lvm</primary>
382 </indexterm>
383 </listitem>
384 </varlistentry>
385
[23ed085]386 <!--
[8bc3edae]387 <varlistentry id="lvmconf">
388 <term><command>lvmconf</command></term>
389 <listitem>
[c627795]390 <para>
[0d7900a]391 is a script that modifies the locking configuration in
[c627795]392 the <application>LVM2</application> configuration file.
393 </para>
[8bc3edae]394 <indexterm zone="lvm2 lvmconf">
395 <primary sortas="b-lvmconf">lvmconf</primary>
396 </indexterm>
397 </listitem>
398 </varlistentry>
[23ed085]399 -->
[8bc3edae]400
401 <varlistentry id="lvmdump">
402 <term><command>lvmdump</command></term>
403 <listitem>
[c627795]404 <para>
405 is a tool used to dump various information concerning
406 <application>LVM2</application>.
407 </para>
[8bc3edae]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>
[c627795]417 <para>
418 is used to import a duplicated VG (e.g. hardware snapshot).
419 </para>
[8bc3edae]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>
[c627795]429 <para>
430 contains the <application>Device Mapper</application> API
431 functions.
432 </para>
[8bc3edae]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.