source: postlfs/filesystems/lvm2.xml@ 096ed61

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.9 8.0 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 nosym 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 096ed61 was 096ed61, checked in by Fernando de Oliveira <fernando@…>, 8 years ago
  • Update to libsysstat 0.3.1.
  • Update to libqtxdg-1.3.0.
  • Update to Update to LXQt 0.10.0.
  • Archive liblxqt-mount-0.9.0.
  • Short descriptions and typo, from Denis Mugnier.
  • Update to qupzilla-1.8.8.

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

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