source: postlfs/filesystems/lvm2.xml@ 1c6b54be

10.0 10.1 11.0 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 1c6b54be was 1c6b54be, checked in by Bruce Dubbs <bdubbs@…>, 19 months ago

Update to gtk+-3.24.16.
Update to LVM2.2.03.09.

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

  • Property mode set to 100644
File size: 14.0 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 "e49bd19ce684ef018c771c6a99f3ed58">
10 <!ENTITY lvm2-size "2.4 MB">
11 <!ENTITY lvm2-buildsize "34 MB (add at least 600 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 16 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 &lfs91_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 Results for LVM2.2.03.09:
191 ### 338 tests: 212 passed, 41 skipped, 0 timed out, 70 warned, 15 failed
192 -->
193
194 <para>
195 The tests do not implement the <quote>expected fail</quote> possibility,
196 and a small number of test failures is expected by upstream. More
197 failures may happen because some kernel options are missing. For example,
198 the lack of the <emphasis>dm-delay</emphasis> device mapper target may
199 explain some failures. Some tests are flagged
200 <quote>warned</quote> if
201 <ulink url='https://github.com/jthornber/thin-provisioning-tools'>
202 thin-provisioning-tools</ulink> are not installed. A workaround is to
203 add the following flags to <command>configure</command>:
204 </para>
205
206<screen role="nodump"><userinput> --with-thin-check= \
207 --with-thin-dump= \
208 --with-thin-repair= \
209 --with-thin-restore= \
210 --with-cache-check= \
211 --with-cache-dump= \
212 --with-cache-repair= \
213 --with-cache-restore= \</userinput></screen>
214
215 <para>
216 Some tests may hang. They can be removed if necessary, for example:
217 <command>rm test/shell/lvconvert-raid-reshape.sh</command>. The tests
218 generate a lot of kernel messages, which may clutter your terminal. You
219 can disable them by issuing <command>dmesg -D</command> before running
220 the tests (do not forget to issue <command>dmesg -E</command> when tests
221 are done).
222
223 <note><simpara>The checks create device nodes in the /tmp directory. The
224 tests will fail if /tmp is mounted with the nodev
225 option.</simpara></note>
226 </para>
227
228 <para>
229 Now, as the <systemitem class="username">root</systemitem> user:
230 </para>
231
232<screen role="root"><userinput>make install</userinput></screen>
233
234 </sect2>
235
236 <sect2 role="commands">
237 <title>Command Explanations</title>
238
239 <para>
240 <command>PATH=$PATH:/sbin:/usr/sbin</command>: The path
241 must contain <filename class="directory">/sbin</filename> and
242 <filename class='directory'>/usr/sbin</filename> for proper system tool
243 detection by the <command>configure</command> script. This instruction
244 ensures that PATH is properly set even if you build as an unprivileged user.
245 </para>
246
247 <para>
248 <parameter>--enable-cmdlib</parameter>: This switch enables
249 building of the shared command library. It is required
250 when building the event daemon.
251 </para>
252
253 <para>
254 <parameter>--enable-pkgconfig</parameter>: This switch enables
255 installation of <command>pkg-config</command> support files.
256 </para>
257
258 <para>
259 <parameter>--enable-udev_sync</parameter>: This switch enables
260 synchronisation with <application>Udev</application> processing.
261 </para>
262
263 <para>
264 <option>--enable-dmeventd</option>: This switch enables
265 building of the <application>Device Mapper</application>
266 event daemon.
267 </para>
268
269 </sect2>
270
271 <sect2 role="content">
272 <title>Contents</title>
273
274 <segmentedlist>
275 <segtitle>Installed Programs</segtitle>
276 <segtitle>Installed Libraries</segtitle>
277 <segtitle>Installed Directories</segtitle>
278
279 <seglistitem>
280 <seg>
281 blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, and lvmdump.
282 There are also numerous symbolic links to lvm that implement specific
283 functionalities
284 </seg>
285 <seg>
286 libdevmapper.so and liblvm2cmd.so; optional:
287 libdevmapper-event.so, libdevmapper-event-lvm2.so,
288 libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2snapshot.so,
289 libdevmapper-event-lvm2raid.so, and libdevmapper-event-lvm2thin.so
290 </seg>
291 <seg>
292 /etc/lvm and
293 /lib/device-mapper (optional)
294 </seg>
295 </seglistitem>
296 </segmentedlist>
297
298 <variablelist>
299 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
300 <?dbfo list-presentation="list"?>
301
302 <?dbhtml list-presentation="table"?>
303
304 <varlistentry id="blkdeactivate">
305 <term><command>blkdeactivate</command></term>
306 <listitem>
307 <para>
308 is a utility to deactivate block devices.
309 </para>
310 <indexterm zone="lvm2 blkdeactivate">
311 <primary sortas="b-blkdeactivate">blkdeactivate</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
315
316 <varlistentry id="dmeventd">
317 <term><command>dmeventd</command></term>
318 <listitem>
319 <para>
320 (optional) is the Device Mapper event daemon.
321 </para>
322 <indexterm zone="lvm2 dmeventd">
323 <primary sortas="b-dmeventd">dmeventd</primary>
324 </indexterm>
325 </listitem>
326 </varlistentry>
327
328 <varlistentry id="dmsetup">
329 <term><command>dmsetup</command></term>
330 <listitem>
331 <para>
332 is a low level logical volume management tool.
333 </para>
334 <indexterm zone="lvm2 dmsetup">
335 <primary sortas="b-dmsetup">dmsetup</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340 <varlistentry id="fsadm">
341 <term><command>fsadm</command></term>
342 <listitem>
343 <para>
344 is a utility used to resize or check filesystem on a device.
345 </para>
346 <indexterm zone="lvm2 fsadm">
347 <primary sortas="b-fsadm">fsadm</primary>
348 </indexterm>
349 </listitem>
350 </varlistentry>
351
352 <varlistentry id="lvm">
353 <term><command>lvm</command></term>
354 <listitem>
355 <para>
356 provides the command-line tools for <application>LVM2</application>.
357 Commands are implemented via sympolic links to this program to
358 manage physical devices (pv*), volume groups (vg*) and logical
359 volumes (lv*).
360 </para>
361 <indexterm zone="lvm2 lvm">
362 <primary sortas="b-lvm">lvm</primary>
363 </indexterm>
364 </listitem>
365 </varlistentry>
366
367 <!--
368 <varlistentry id="lvmconf">
369 <term><command>lvmconf</command></term>
370 <listitem>
371 <para>
372 is a script that modifies the locking configuration in
373 the <application>LVM2</application> configuration file.
374 </para>
375 <indexterm zone="lvm2 lvmconf">
376 <primary sortas="b-lvmconf">lvmconf</primary>
377 </indexterm>
378 </listitem>
379 </varlistentry>
380 -->
381
382 <varlistentry id="lvmdump">
383 <term><command>lvmdump</command></term>
384 <listitem>
385 <para>
386 is a tool used to dump various information concerning
387 <application>LVM2</application>.
388 </para>
389 <indexterm zone="lvm2 lvmdump">
390 <primary sortas="b-lvmdump">lvmdump</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 <varlistentry id="vgimportclone">
396 <term><command>vgimportclone</command></term>
397 <listitem>
398 <para>
399 is used to import a duplicated VG (e.g. hardware snapshot).
400 </para>
401 <indexterm zone="lvm2 vgimportclone">
402 <primary sortas="b-vgimportclone">vgimportclone</primary>
403 </indexterm>
404 </listitem>
405 </varlistentry>
406
407 <varlistentry id="libdevmapper">
408 <term><filename class='libraryfile'>libdevmapper.so</filename></term>
409 <listitem>
410 <para>
411 contains the <application>Device Mapper</application> API
412 functions.
413 </para>
414 <indexterm zone="lvm2 libdevmapper">
415 <primary sortas="c-libdevmapper">libdevmapper.so</primary>
416 </indexterm>
417 </listitem>
418 </varlistentry>
419
420 </variablelist>
421
422 </sect2>
423
424</sect1>
Note: See TracBrowser for help on using the repository browser.