source: postlfs/filesystems/lvm2.xml@ a5bc3d2

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.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 a5bc3d2 was a5bc3d2, checked in by Bruce Dubbs <bdubbs@…>, 4 years ago

Update to nspr-4.24.
Update to PyYAML-5.2.
Update to tcsh-6.22.01.
Update to LVM2.2.03.07.

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

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