source: postlfs/filesystems/lvm2.xml@ 20c731a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules 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 20c731a was 20c731a, checked in by Bruce Dubbs <bdubbs@…>, 7 years ago

Update to LVM2-2.2.02.170.
Update to cmake-3.8.0.

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

  • Property mode set to 100644
File size: 14.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 " ">
8 <!ENTITY lvm2-download-ftp "ftp://sources.redhat.com/pub/lvm2/releases/LVM2.&lvm2-version;.tgz">
9 <!ENTITY lvm2-md5sum "135c2c86e0c63c8c32bdc4cd0335b54f">
10 <!ENTITY lvm2-size "2.2 MB">
11 <!ENTITY lvm2-buildsize "33 MB (add 15 MB for tests, however transient files can grow up to around 500 MB)">
12 <!ENTITY lvm2-time "0.4 SBU (add 17 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 &lfs80_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">Optional</bridgehead>
79 <para role="optional">
80 <xref linkend='mdadm'/>,
81 <xref linkend='reiserfs'/>,
82 <xref linkend='valgrind'/>,
83 <xref linkend='which'/>,
84 <xref linkend='xfsprogs'/> (all five may be used, but are not required,
85 for tests), and
86 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
87 thin-provisioning-tools</ulink>
88 </para>
89
90 <para condition="html" role="usernotes">User Notes:
91 <ulink url="&blfs-wiki;/lvm2"/>
92 </para>
93
94 <caution>
95 <para>
96 Kernel versions between 4.1 and 4.4.1 have a broken RAID
97 implementation. If you want to use RAID type LV's, you should install
98 kernel version 4.4.2 or above. Note that several tests use RAID logical
99 volumes, and can generate a <quote>kernel oops</quote> with the faulty
100 kernel version, which usually renders the system unusable.
101 </para>
102 </caution>
103 </sect2>
104
105 <sect2 role="kernel" id="lvm2-kernel">
106 <title>Kernel Configuration</title>
107
108 <para>
109 Enable the following options in the kernel configuration
110 and recompile the kernel:
111 </para>
112
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.
117 The tests will all time out if Magic SysRq key is not enabled.
118 </para></note>
119
120<screen><literal>Device Drivers ---&gt;
121 [*] Multiple devices driver support (RAID and LVM) ---&gt; [CONFIG_MD]
122 &lt;*/M&gt; Device mapper support [CONFIG_BLK_DEV_DM]
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]
127Kernel hacking ---&gt;
128 [*] Magic SysRq key [CONFIG_MAGIC_SYSRQ]</literal></screen>
129
130 <indexterm zone="lvm2 lvm2-kernel">
131 <primary sortas="d-lvm2">lvm2</primary>
132 </indexterm>
133
134 </sect2>
135
136 <sect2 role="installation">
137 <title>Installation of LVM2</title>
138
139 <para>
140 Install <application>LVM2</application> by running the following
141 commands:
142 </para>
143
144<screen revision="sysv"><userinput>SAVEPATH=$PATH &amp;&amp;
145PATH=$PATH:/sbin:/usr/sbin &amp;&amp;
146./configure --prefix=/usr \
147 --exec-prefix= \
148 --enable-applib \
149 --enable-cmdlib \
150 --enable-pkgconfig \
151 --enable-udev_sync &amp;&amp;
152make &amp;&amp;
153PATH=$SAVEPATH &amp;&amp;
154unset SAVEPATH</userinput></screen>
155
156<screen revision="systemd"><userinput>SAVEPATH=$PATH &amp;&amp;
157PATH=$PATH:/sbin:/usr/sbin &amp;&amp;
158./configure --prefix=/usr \
159 --exec-prefix= \
160 --with-confdir=/etc \
161 --enable-applib \
162 --enable-cmdlib \
163 --enable-pkgconfig \
164 --enable-udev_sync &amp;&amp;
165make &amp;&amp;
166PATH=$SAVEPATH &amp;&amp;
167unset SAVEPATH</userinput></screen>
168
169 <para>
170 The tests use <application>udev</application> for logical volume
171 synchronization, so that the LVM udev rules and some utilities need to
172 be installed before running the tests. If you are installing
173 <application>LVM2</application> for the first time, and do not
174 want to install the full package before running the tests, the minimal
175 set of utilities can be installed by running the following instructions
176 as the <systemitem class="username">root</systemitem> user:
177 </para>
178
179<screen role="root"><userinput>make -C tools install_dmsetup_dynamic &amp;&amp;
180make -C udev install &amp;&amp;
181make -C libdm install</userinput></screen>
182
183 <para>
184 To test the results, issue: <command>make check_local</command> as the
185 <systemitem class="username">root</systemitem> user. Other targets are
186 available and can be listed with <command>make -C test help</command>.
187 The test timings are very dependent on the speed of the disk(s), and on
188 the number of enabled kernel options.
189 </para>
190
191 <!-- Results for LVM2.2.02.170:
192 ### 277 tests: 167 passed, 51 skipped, 0 timed out, 53 warned, 6 failed
193 -->
194
195 <para>
196 Those tests do not implement the <quote>expected fail</quote> possibility,
197 and a small number of test failures is expected by upstream. More
198 failures may happen because some kernel options are missing. For example,
199 the lack of the <emphasis>dm-delay</emphasis> device mapper target may
200 explain some failures. Some tests are flagged
201 <quote>warned</quote> if
202 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
203 thin-provisioning-tools</ulink> are not installed. A workaround is to
204 add the following flags to <command>configure</command>:
205 </para>
206
207<screen role="nodump"><userinput> --with-thin-check= \
208 --with-thin-dump= \
209 --with-thin-repair= \
210 --with-thin-restore= \
211 --with-cache-check= \
212 --with-cache-dump= \
213 --with-cache-repair= \
214 --with-cache-restore= \</userinput></screen>
215
216 <para>
217 Some tests may hang with kernel versions in the 4.1 and 4.2 series (see
218 above). They can be removed if necessary, for example: <command>rm
219 test/shell/lvcreate-large-raid.sh</command>. The tests generate a lot
220 of kernel messages, which may clutter your terminal. You can disable them
221 by issuing <command>dmesg -D</command> before running the tests (do not
222 forget to issue <command>dmesg -E</command> when tests are done).
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-applib</parameter>: This switch enables
246 building of the shared application library.
247 </para>
248
249 <para>
250 <parameter>--enable-cmdlib</parameter>: This switch enables
251 building of the shared command library. It is required
252 when building the event daemon.
253 </para>
254
255 <para>
256 <parameter>--enable-pkgconfig</parameter>: This switch enables
257 installation of <command>pkg-config</command> support files.
258 </para>
259
260 <para>
261 <parameter>--enable-udev_sync</parameter>: This switch enables
262 synchronisation with <application>Udev</application> processing.
263 </para>
264
265 <para>
266 <option>--enable-dmeventd</option>: This switch enables
267 building of the <application>Device Mapper</application>
268 event daemon.
269 </para>
270
271 <para>
272 <option>--enable-lvmetad</option>: This switch enables
273 building of the <application>LVM</application> metadata daemon,
274 which avoids scanning all the filesystems when an lvm command is
275 run.
276 </para>
277
278 </sect2>
279
280 <sect2 role="content">
281 <title>Contents</title>
282
283 <segmentedlist>
284 <segtitle>Installed Programs</segtitle>
285 <segtitle>Installed Libraries</segtitle>
286 <segtitle>Installed Directories</segtitle>
287
288 <seglistitem>
289 <seg>
290 blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, lvmconf,
291 lvmdump, and lvmetad (optional). There are also
292 numerous symbolic links to lvm that implement specific
293 functionalities
294 </seg>
295 <seg>
296 libdevmapper.so, liblvm2app.so, and liblvm2cmd.so; optional:
297 libdevmapper-event.so, libdevmapper-event-lvm2.so,
298 libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2snapshot.so,
299 libdevmapper-event-lvm2raid.so, and libdevmapper-event-lvm2thin.so
300 </seg>
301 <seg>
302 /etc/lvm and
303 /lib/device-mapper (optional)
304 </seg>
305 </seglistitem>
306 </segmentedlist>
307
308 <variablelist>
309 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
310 <?dbfo list-presentation="list"?>
311
312 <?dbhtml list-presentation="table"?>
313
314 <varlistentry id="blkdeactivate">
315 <term><command>blkdeactivate</command></term>
316 <listitem>
317 <para>
318 is a utility to deactivate block device.
319 </para>
320 <indexterm zone="lvm2 blkdeactivate">
321 <primary sortas="b-blkdeactivate">blkdeactivate</primary>
322 </indexterm>
323 </listitem>
324 </varlistentry>
325
326 <varlistentry id="dmeventd">
327 <term><command>dmeventd</command></term>
328 <listitem>
329 <para>
330 (optional) is the Device Mapper event daemon.
331 </para>
332 <indexterm zone="lvm2 dmeventd">
333 <primary sortas="b-dmeventd">dmeventd</primary>
334 </indexterm>
335 </listitem>
336 </varlistentry>
337
338 <varlistentry id="dmsetup">
339 <term><command>dmsetup</command></term>
340 <listitem>
341 <para>
342 is a low level logical volume management tool.
343 </para>
344 <indexterm zone="lvm2 dmsetup">
345 <primary sortas="b-dmsetup">dmsetup</primary>
346 </indexterm>
347 </listitem>
348 </varlistentry>
349
350 <varlistentry id="fsadm">
351 <term><command>fsadm</command></term>
352 <listitem>
353 <para>
354 is a utility used to resize or check filesystem on a device.
355 </para>
356 <indexterm zone="lvm2 fsadm">
357 <primary sortas="b-fsadm">fsadm</primary>
358 </indexterm>
359 </listitem>
360 </varlistentry>
361
362 <varlistentry id="lvm">
363 <term><command>lvm</command></term>
364 <listitem>
365 <para>
366 provides the command-line tools for <application>LVM2</application>.
367 Commands are implemented via sympolic links to this program to
368 manage physical devices (pv*), volume groups (vg*) and logical
369 volumes (lv*).
370 </para>
371 <indexterm zone="lvm2 lvm">
372 <primary sortas="b-lvm">lvm</primary>
373 </indexterm>
374 </listitem>
375 </varlistentry>
376
377 <varlistentry id="lvmconf">
378 <term><command>lvmconf</command></term>
379 <listitem>
380 <para>
381 is a script that modifies the locking configuration in
382 the <application>LVM2</application> configuration file.
383 </para>
384 <indexterm zone="lvm2 lvmconf">
385 <primary sortas="b-lvmconf">lvmconf</primary>
386 </indexterm>
387 </listitem>
388 </varlistentry>
389
390 <varlistentry id="lvmdump">
391 <term><command>lvmdump</command></term>
392 <listitem>
393 <para>
394 is a tool used to dump various information concerning
395 <application>LVM2</application>.
396 </para>
397 <indexterm zone="lvm2 lvmdump">
398 <primary sortas="b-lvmdump">lvmdump</primary>
399 </indexterm>
400 </listitem>
401 </varlistentry>
402
403 <varlistentry id="lvmetad">
404 <term><command>lvmetad</command></term>
405 <listitem>
406 <para>
407 (optional) is the LVM metadata daemon.
408 </para>
409 <indexterm zone="lvm2 lvmetad">
410 <primary sortas="b-lvmetad">lvmetad</primary>
411 </indexterm>
412 </listitem>
413 </varlistentry>
414
415 <varlistentry id="vgimportclone">
416 <term><command>vgimportclone</command></term>
417 <listitem>
418 <para>
419 is used to import a duplicated VG (e.g. hardware snapshot).
420 </para>
421 <indexterm zone="lvm2 vgimportclone">
422 <primary sortas="b-vgimportclone">vgimportclone</primary>
423 </indexterm>
424 </listitem>
425 </varlistentry>
426
427 <varlistentry id="libdevmapper">
428 <term><filename class='libraryfile'>libdevmapper.so</filename></term>
429 <listitem>
430 <para>
431 contains the <application>Device Mapper</application> API
432 functions.
433 </para>
434 <indexterm zone="lvm2 libdevmapper">
435 <primary sortas="c-libdevmapper">libdevmapper.so</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
440 </variablelist>
441
442 </sect2>
443
444</sect1>
Note: See TracBrowser for help on using the repository browser.