[8bc3edae] | 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 " ">
|
---|
[73fe507] | 8 | <!ENTITY lvm2-download-ftp "ftp://sources.redhat.com/pub/lvm2/releases/LVM2.&lvm2-version;.tgz">
|
---|
[b8dff090] | 9 | <!ENTITY lvm2-md5sum "e7ae07e413120713549cc6dd2a558c75">
|
---|
[73fe507] | 10 | <!ENTITY lvm2-size "1.8 MB">
|
---|
[b8dff090] | 11 | <!ENTITY lvm2-buildsize "32 MB (42 MB with tests)">
|
---|
| 12 | <!ENTITY lvm2-time "0.4 SBU (9.7 SBU with tests)">
|
---|
[8bc3edae] | 13 | ]>
|
---|
| 14 |
|
---|
[c627795] | 15 | <sect1 id="lvm2" xreflabel="LVM2-&lvm2-version;">
|
---|
[8bc3edae] | 16 | <?dbhtml filename="lvm2.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
[c627795] | 23 | <title>LVM2-&lvm2-version;</title>
|
---|
[8bc3edae] | 24 |
|
---|
| 25 | <indexterm zone="lvm2">
|
---|
[c627795] | 26 | <primary sortas="a-LVM2">LVM2</primary>
|
---|
[8bc3edae] | 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
[c627795] | 30 | <title>Introduction to LVM2</title>
|
---|
[8bc3edae] | 31 |
|
---|
[c627795] | 32 | <para>
|
---|
| 33 | The <application>LVM2</application> package is a package that manages
|
---|
| 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.
|
---|
| 37 | </para>
|
---|
[8bc3edae] | 38 |
|
---|
[26654eb] | 39 | &lfs77_checked; &gcc5_checked;
|
---|
[8bc3edae] | 40 |
|
---|
| 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
[f60cf4a] | 43 | <listitem>
|
---|
[c627795] | 44 | <para>
|
---|
| 45 | Download (HTTP): <ulink url="&lvm2-download-http;"/>
|
---|
| 46 | </para>
|
---|
[f60cf4a] | 47 | </listitem>
|
---|
[8bc3edae] | 48 | <listitem>
|
---|
[c627795] | 49 | <para>
|
---|
| 50 | Download (FTP): <ulink url="&lvm2-download-ftp;"/>
|
---|
| 51 | </para>
|
---|
[8bc3edae] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[c627795] | 54 | <para>
|
---|
| 55 | Download MD5 sum: &lvm2-md5sum;
|
---|
| 56 | </para>
|
---|
[8bc3edae] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[c627795] | 59 | <para>
|
---|
| 60 | Download size: &lvm2-size;
|
---|
| 61 | </para>
|
---|
[8bc3edae] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[c627795] | 64 | <para>
|
---|
| 65 | Estimated disk space required: &lvm2-buildsize;
|
---|
| 66 | </para>
|
---|
[8bc3edae] | 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
[c627795] | 69 | <para>
|
---|
| 70 | Estimated build time: &lvm2-time;
|
---|
| 71 | </para>
|
---|
[8bc3edae] | 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
| 74 |
|
---|
[b5e8375] | 75 | <bridgehead renderas="sect3">LVM2 Dependencies</bridgehead>
|
---|
| 76 |
|
---|
| 77 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 78 | <para role="optional">
|
---|
| 79 | <xref linkend='mdadm'/> (for checks) and
|
---|
| 80 | <xref linkend='xfsprogs'/> (for checks)
|
---|
| 81 | </para>
|
---|
| 82 |
|
---|
[8bc3edae] | 83 | <para condition="html" role="usernotes">User Notes:
|
---|
[c627795] | 84 | <ulink url="&blfs-wiki;/lvm2"/>
|
---|
| 85 | </para>
|
---|
[8bc3edae] | 86 | </sect2>
|
---|
| 87 |
|
---|
[c627795] | 88 | <sect2 role="kernel" id="lvm2-kernel">
|
---|
[7e1df8f9] | 89 | <title>Kernel Configuration</title>
|
---|
| 90 |
|
---|
[c627795] | 91 | <para>
|
---|
[421128a1] | 92 | Enable the following options in the kernel configuration
|
---|
[c627795] | 93 | and recompile the kernel:
|
---|
| 94 | </para>
|
---|
[7e1df8f9] | 95 |
|
---|
[b5e8375] | 96 | <note><para>
|
---|
| 97 | There are several other Device Mapper options in the kernel beyond those
|
---|
| 98 | listed below. In order to get reasonable results if running the
|
---|
| 99 | regression tests, all must be enabled either internally or as a module.
|
---|
| 100 | </para></note>
|
---|
| 101 |
|
---|
[7e1df8f9] | 102 | <screen><literal>Device Drivers --->
|
---|
[421128a1] | 103 | [*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
|
---|
| 104 | <*/M> Device mapper support [CONFIG_BLK_DEV_DM]
|
---|
| 105 | <*/M/ > Crypt target support [CONFIG_DM_CRYPT]
|
---|
| 106 | <*/M/ > Snapshot target [CONFIG_DM_SNAPSHOT]
|
---|
| 107 | <*/M/ > Mirror target [CONFIG_DM_MIRROR]</literal></screen>
|
---|
[7e1df8f9] | 108 |
|
---|
| 109 | <indexterm zone="lvm2 lvm2-kernel">
|
---|
| 110 | <primary sortas="d-lvm2">lvm2</primary>
|
---|
| 111 | </indexterm>
|
---|
| 112 |
|
---|
| 113 | </sect2>
|
---|
| 114 |
|
---|
[8bc3edae] | 115 | <sect2 role="installation">
|
---|
[c627795] | 116 | <title>Installation of LVM2</title>
|
---|
[8bc3edae] | 117 |
|
---|
[c627795] | 118 | <para>
|
---|
| 119 | Install <application>LVM2</application> by running the following
|
---|
| 120 | commands:
|
---|
| 121 | </para>
|
---|
[8bc3edae] | 122 |
|
---|
[6cfbed09] | 123 | <screen><userinput>./configure --prefix=/usr \
|
---|
[4591404] | 124 | --exec-prefix= \
|
---|
[f60cf4a] | 125 | --with-confdir=/etc \
|
---|
[4591404] | 126 | --enable-applib \
|
---|
| 127 | --enable-cmdlib \
|
---|
| 128 | --enable-pkgconfig \
|
---|
[46a9711b] | 129 | --enable-udev_sync &&
|
---|
[8bc3edae] | 130 | make</userinput></screen>
|
---|
| 131 |
|
---|
[c627795] | 132 | <para>
|
---|
[fd6df75] | 133 | To test the results, issue: <command>make -k
|
---|
[b5e8375] | 134 | check</command> as the <systemitem class="username">root</systemitem>
|
---|
[06da9a6] | 135 | user. At least one partition on a hard drive must be set up as a Linux
|
---|
| 136 | LVM partition (type 8e00). The test timings are very dependent on the
|
---|
| 137 | speed of the disk(s), and on the number of enabled kernel options. A
|
---|
[fd6df75] | 138 | small number of tests may fail.
|
---|
| 139 | <!-- My results: 448 tests: 141 passed, 302 skipped, 5 broken, 0 failed
|
---|
| 140 | version LVM2-2.02.125. Not all kernel settings enabled, but those
|
---|
| 141 | above all were set - Bruce -->
|
---|
[c627795] | 142 | </para>
|
---|
[8bc3edae] | 143 |
|
---|
[c627795] | 144 | <para>
|
---|
| 145 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 146 | </para>
|
---|
[8bc3edae] | 147 |
|
---|
| 148 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 149 |
|
---|
| 150 | </sect2>
|
---|
| 151 |
|
---|
| 152 | <sect2 role="commands">
|
---|
| 153 | <title>Command Explanations</title>
|
---|
| 154 |
|
---|
[c627795] | 155 | <para>
|
---|
[2800af7] | 156 | <parameter>--enable-applib</parameter>: This switch enables
|
---|
[c627795] | 157 | building of the shared application library.
|
---|
| 158 | </para>
|
---|
| 159 |
|
---|
| 160 | <para>
|
---|
[2800af7] | 161 | <parameter>--enable-cmdlib</parameter>: This switch enables
|
---|
[c627795] | 162 | building of the shared command library. It is required
|
---|
| 163 | when building the event daemon.
|
---|
| 164 | </para>
|
---|
| 165 |
|
---|
| 166 | <para>
|
---|
[2800af7] | 167 | <parameter>--enable-pkgconfig</parameter>: This switch enables
|
---|
[c627795] | 168 | installation of <command>pkg-config</command> support files.
|
---|
| 169 | </para>
|
---|
| 170 |
|
---|
| 171 | <para>
|
---|
[2800af7] | 172 | <parameter>--enable-udev_sync</parameter>: This switch enables
|
---|
[c627795] | 173 | synchronisation with <application>Udev</application> processing.
|
---|
| 174 | </para>
|
---|
| 175 |
|
---|
| 176 | <para>
|
---|
| 177 | <option>--enable-dmeventd</option>: This switch enables
|
---|
| 178 | building of the <application>Device Mapper</application>
|
---|
| 179 | event daemon.
|
---|
| 180 | </para>
|
---|
[8bc3edae] | 181 |
|
---|
| 182 | </sect2>
|
---|
| 183 |
|
---|
| 184 | <sect2 role="content">
|
---|
| 185 | <title>Contents</title>
|
---|
| 186 |
|
---|
| 187 | <segmentedlist>
|
---|
| 188 | <segtitle>Installed Programs</segtitle>
|
---|
| 189 | <segtitle>Installed Libraries</segtitle>
|
---|
[c3c56b2] | 190 | <segtitle>Installed Directories</segtitle>
|
---|
[8bc3edae] | 191 |
|
---|
| 192 | <seglistitem>
|
---|
[c627795] | 193 | <seg>
|
---|
[8ed30d52] | 194 | blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, lvmconf,
|
---|
[e9ca6e5d] | 195 | lvmdump, and vgimportclone. There are also numerous symbolic links to
|
---|
[71b7341f] | 196 | lvm that implement specific functionalities
|
---|
[c627795] | 197 | </seg>
|
---|
| 198 | <seg>
|
---|
[a037dab] | 199 | libdevmapper.so, liblvm2app.so and liblvm2cmd.so; optional:
|
---|
| 200 | libdevmapper-event.so, libdevmapper-event-lvm2.so,
|
---|
| 201 | libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2snapshot.so,
|
---|
[80454f5] | 202 | libdevmapper-event-lvm2raid.so, and libdevmapper-event-lvm2thin.so
|
---|
[c627795] | 203 | </seg>
|
---|
[c3c56b2] | 204 | <seg>
|
---|
[a037dab] | 205 | /etc/lvm and
|
---|
| 206 | /lib/device-mapper (optional)
|
---|
[c3c56b2] | 207 | </seg>
|
---|
[8bc3edae] | 208 | </seglistitem>
|
---|
| 209 | </segmentedlist>
|
---|
| 210 |
|
---|
| 211 | <variablelist>
|
---|
| 212 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 213 | <?dbfo list-presentation="list"?>
|
---|
[61b95ac4] | 214 |
|
---|
| 215 | <?dbhtml list-presentation="table"?>
|
---|
[8bc3edae] | 216 |
|
---|
[8ed30d52] | 217 | <varlistentry id="blkdeactivate">
|
---|
| 218 | <term><command>blkdeactivate</command></term>
|
---|
| 219 | <listitem>
|
---|
| 220 | <para>
|
---|
| 221 | utility to deactivate block device.
|
---|
| 222 | </para>
|
---|
| 223 | <indexterm zone="lvm2 blkdeactivate">
|
---|
| 224 | <primary sortas="b-blkdeactivate">blkdeactivate</primary>
|
---|
| 225 | </indexterm>
|
---|
| 226 | </listitem>
|
---|
| 227 | </varlistentry>
|
---|
| 228 |
|
---|
[a037dab] | 229 | <varlistentry id="dmeventd">
|
---|
| 230 | <term><command>dmeventd</command></term>
|
---|
| 231 | <listitem>
|
---|
| 232 | <para>
|
---|
| 233 | (optional) is the Device Mapper event daemon.
|
---|
| 234 | </para>
|
---|
| 235 | <indexterm zone="lvm2 dmeventd">
|
---|
| 236 | <primary sortas="b-dmeventd">dmeventd</primary>
|
---|
| 237 | </indexterm>
|
---|
| 238 | </listitem>
|
---|
| 239 | </varlistentry>
|
---|
| 240 |
|
---|
[8bc3edae] | 241 | <varlistentry id="dmsetup">
|
---|
| 242 | <term><command>dmsetup</command></term>
|
---|
| 243 | <listitem>
|
---|
[c627795] | 244 | <para>
|
---|
| 245 | is a low level logical volume management tool.
|
---|
| 246 | </para>
|
---|
[8bc3edae] | 247 | <indexterm zone="lvm2 dmsetup">
|
---|
| 248 | <primary sortas="b-dmsetup">dmsetup</primary>
|
---|
| 249 | </indexterm>
|
---|
| 250 | </listitem>
|
---|
| 251 | </varlistentry>
|
---|
| 252 |
|
---|
| 253 | <varlistentry id="fsadm">
|
---|
| 254 | <term><command>fsadm</command></term>
|
---|
| 255 | <listitem>
|
---|
[c627795] | 256 | <para>
|
---|
[73fe507] | 257 | is a utility used to resize or check filesystem on a device.
|
---|
[c627795] | 258 | </para>
|
---|
[8bc3edae] | 259 | <indexterm zone="lvm2 fsadm">
|
---|
| 260 | <primary sortas="b-fsadm">fsadm</primary>
|
---|
| 261 | </indexterm>
|
---|
| 262 | </listitem>
|
---|
| 263 | </varlistentry>
|
---|
| 264 |
|
---|
| 265 | <varlistentry id="lvm">
|
---|
| 266 | <term><command>lvm</command></term>
|
---|
| 267 | <listitem>
|
---|
[c627795] | 268 | <para>
|
---|
| 269 | provides the command-line tools for <application>LVM2</application>.
|
---|
| 270 | Commands are implemented via sympolic links to this program to
|
---|
| 271 | manage physical devices (pv*), volume groups (vg*) and logical
|
---|
| 272 | volumes (lv*).
|
---|
| 273 | </para>
|
---|
[8bc3edae] | 274 | <indexterm zone="lvm2 lvm">
|
---|
| 275 | <primary sortas="b-lvm">lvm</primary>
|
---|
| 276 | </indexterm>
|
---|
| 277 | </listitem>
|
---|
| 278 | </varlistentry>
|
---|
| 279 |
|
---|
| 280 | <varlistentry id="lvmconf">
|
---|
| 281 | <term><command>lvmconf</command></term>
|
---|
| 282 | <listitem>
|
---|
[c627795] | 283 | <para>
|
---|
[0d7900a] | 284 | is a script that modifies the locking configuration in
|
---|
[c627795] | 285 | the <application>LVM2</application> configuration file.
|
---|
| 286 | </para>
|
---|
[8bc3edae] | 287 | <indexterm zone="lvm2 lvmconf">
|
---|
| 288 | <primary sortas="b-lvmconf">lvmconf</primary>
|
---|
| 289 | </indexterm>
|
---|
| 290 | </listitem>
|
---|
| 291 | </varlistentry>
|
---|
| 292 |
|
---|
| 293 | <varlistentry id="lvmdump">
|
---|
| 294 | <term><command>lvmdump</command></term>
|
---|
| 295 | <listitem>
|
---|
[c627795] | 296 | <para>
|
---|
| 297 | is a tool used to dump various information concerning
|
---|
| 298 | <application>LVM2</application>.
|
---|
| 299 | </para>
|
---|
[8bc3edae] | 300 | <indexterm zone="lvm2 lvmdump">
|
---|
| 301 | <primary sortas="b-lvmdump">lvmdump</primary>
|
---|
| 302 | </indexterm>
|
---|
| 303 | </listitem>
|
---|
| 304 | </varlistentry>
|
---|
| 305 |
|
---|
| 306 | <varlistentry id="vgimportclone">
|
---|
| 307 | <term><command>vgimportclone</command></term>
|
---|
| 308 | <listitem>
|
---|
[c627795] | 309 | <para>
|
---|
| 310 | is used to import a duplicated VG (e.g. hardware snapshot).
|
---|
| 311 | </para>
|
---|
[8bc3edae] | 312 | <indexterm zone="lvm2 vgimportclone">
|
---|
| 313 | <primary sortas="b-vgimportclone">vgimportclone</primary>
|
---|
| 314 | </indexterm>
|
---|
| 315 | </listitem>
|
---|
| 316 | </varlistentry>
|
---|
| 317 |
|
---|
| 318 | <varlistentry id="libdevmapper">
|
---|
| 319 | <term><filename class='libraryfile'>libdevmapper.so</filename></term>
|
---|
| 320 | <listitem>
|
---|
[c627795] | 321 | <para>
|
---|
| 322 | contains the <application>Device Mapper</application> API
|
---|
| 323 | functions.
|
---|
| 324 | </para>
|
---|
[8bc3edae] | 325 | <indexterm zone="lvm2 libdevmapper">
|
---|
| 326 | <primary sortas="c-libdevmapper">libdevmapper.so</primary>
|
---|
| 327 | </indexterm>
|
---|
| 328 | </listitem>
|
---|
| 329 | </varlistentry>
|
---|
| 330 |
|
---|
| 331 | </variablelist>
|
---|
| 332 |
|
---|
| 333 | </sect2>
|
---|
| 334 |
|
---|
| 335 | </sect1>
|
---|