source: postlfs/filesystems/lvm2.xml@ e65320b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.4 9.0 9.1 bdubbs/svn elogind 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 e65320b was e65320b, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Fix lvm2 url

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

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