[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">
|
---|
[87d69b53] | 9 | <!ENTITY lvm2-md5sum "80af5af726949bbbb2aceb15b24b7d20">
|
---|
[73fe507] | 10 | <!ENTITY lvm2-size "1.8 MB">
|
---|
[99fcc47] | 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 10 SBU with tests, see below)">
|
---|
[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>
|
---|
[99fcc47] | 33 | The <application>LVM2</application> package is a set of tools that manage
|
---|
[c627795] | 34 | logical partitions. It allows spanning of file systems across multiple
|
---|
| 35 | physical disks and disk partitions and provides for dynamic growing or
|
---|
[99fcc47] | 36 | shrinking of logical partitions, mirroring and low storage footprint
|
---|
| 37 | snapshots.
|
---|
[c627795] | 38 | </para>
|
---|
[8bc3edae] | 39 |
|
---|
[7c12cabe] | 40 | &lfs78_checked;
|
---|
[8bc3edae] | 41 |
|
---|
| 42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 43 | <itemizedlist spacing="compact">
|
---|
[f60cf4a] | 44 | <listitem>
|
---|
[c627795] | 45 | <para>
|
---|
| 46 | Download (HTTP): <ulink url="&lvm2-download-http;"/>
|
---|
| 47 | </para>
|
---|
[f60cf4a] | 48 | </listitem>
|
---|
[8bc3edae] | 49 | <listitem>
|
---|
[c627795] | 50 | <para>
|
---|
| 51 | Download (FTP): <ulink url="&lvm2-download-ftp;"/>
|
---|
| 52 | </para>
|
---|
[8bc3edae] | 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
[c627795] | 55 | <para>
|
---|
| 56 | Download MD5 sum: &lvm2-md5sum;
|
---|
| 57 | </para>
|
---|
[8bc3edae] | 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
[c627795] | 60 | <para>
|
---|
| 61 | Download size: &lvm2-size;
|
---|
| 62 | </para>
|
---|
[8bc3edae] | 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
[c627795] | 65 | <para>
|
---|
| 66 | Estimated disk space required: &lvm2-buildsize;
|
---|
| 67 | </para>
|
---|
[8bc3edae] | 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
[c627795] | 70 | <para>
|
---|
| 71 | Estimated build time: &lvm2-time;
|
---|
| 72 | </para>
|
---|
[8bc3edae] | 73 | </listitem>
|
---|
| 74 | </itemizedlist>
|
---|
| 75 |
|
---|
[b5e8375] | 76 | <bridgehead renderas="sect3">LVM2 Dependencies</bridgehead>
|
---|
| 77 |
|
---|
| 78 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 79 | <para role="optional">
|
---|
[99fcc47] | 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>
|
---|
[b5e8375] | 88 | </para>
|
---|
| 89 |
|
---|
[8bc3edae] | 90 | <para condition="html" role="usernotes">User Notes:
|
---|
[c627795] | 91 | <ulink url="&blfs-wiki;/lvm2"/>
|
---|
| 92 | </para>
|
---|
[8bc3edae] | 93 | </sect2>
|
---|
| 94 |
|
---|
[c627795] | 95 | <sect2 role="kernel" id="lvm2-kernel">
|
---|
[7e1df8f9] | 96 | <title>Kernel Configuration</title>
|
---|
| 97 |
|
---|
[c627795] | 98 | <para>
|
---|
[421128a1] | 99 | Enable the following options in the kernel configuration
|
---|
[c627795] | 100 | and recompile the kernel:
|
---|
| 101 | </para>
|
---|
[7e1df8f9] | 102 |
|
---|
[b5e8375] | 103 | <note><para>
|
---|
| 104 | There are several other Device Mapper options in the kernel beyond those
|
---|
| 105 | listed below. In order to get reasonable results if running the
|
---|
| 106 | regression tests, all must be enabled either internally or as a module.
|
---|
| 107 | </para></note>
|
---|
| 108 |
|
---|
[7e1df8f9] | 109 | <screen><literal>Device Drivers --->
|
---|
[421128a1] | 110 | [*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
|
---|
| 111 | <*/M> Device mapper support [CONFIG_BLK_DEV_DM]
|
---|
| 112 | <*/M/ > Crypt target support [CONFIG_DM_CRYPT]
|
---|
| 113 | <*/M/ > Snapshot target [CONFIG_DM_SNAPSHOT]
|
---|
[99fcc47] | 114 | <*/M/ > Thin provisioning target [CONFIG_DM_THIN_PROVISIONING]
|
---|
[421128a1] | 115 | <*/M/ > Mirror target [CONFIG_DM_MIRROR]</literal></screen>
|
---|
[7e1df8f9] | 116 |
|
---|
| 117 | <indexterm zone="lvm2 lvm2-kernel">
|
---|
| 118 | <primary sortas="d-lvm2">lvm2</primary>
|
---|
| 119 | </indexterm>
|
---|
| 120 |
|
---|
| 121 | </sect2>
|
---|
| 122 |
|
---|
[8bc3edae] | 123 | <sect2 role="installation">
|
---|
[c627795] | 124 | <title>Installation of LVM2</title>
|
---|
[8bc3edae] | 125 |
|
---|
[c627795] | 126 | <para>
|
---|
| 127 | Install <application>LVM2</application> by running the following
|
---|
| 128 | commands:
|
---|
| 129 | </para>
|
---|
[8bc3edae] | 130 |
|
---|
[6cfbed09] | 131 | <screen><userinput>./configure --prefix=/usr \
|
---|
[4591404] | 132 | --exec-prefix= \
|
---|
[f60cf4a] | 133 | --with-confdir=/etc \
|
---|
[4591404] | 134 | --enable-applib \
|
---|
| 135 | --enable-cmdlib \
|
---|
| 136 | --enable-pkgconfig \
|
---|
[46a9711b] | 137 | --enable-udev_sync &&
|
---|
[8bc3edae] | 138 | make</userinput></screen>
|
---|
| 139 |
|
---|
[c627795] | 140 | <para>
|
---|
[99fcc47] | 141 | The tests use <application>udev</application> for logical volume
|
---|
| 142 | synchronization, so that the LVM udev rules and some utilities need to
|
---|
| 143 | be installed before running the tests. If you are installing
|
---|
| 144 | <application>LVM2</application> for the first time, and do not
|
---|
| 145 | want to install the full package before running the tests, the minimal
|
---|
| 146 | set of utilities can be installed by running the following instructions
|
---|
| 147 | as the <systemitem class="username">root</systemitem> user:
|
---|
| 148 | </para>
|
---|
| 149 |
|
---|
| 150 | <screen role="root"><userinput>make -C tools install_dmsetup_dynamic &&
|
---|
| 151 | make -C udev install &&
|
---|
| 152 | make -C libdm install</userinput></screen>
|
---|
| 153 |
|
---|
| 154 | <para>
|
---|
| 155 | To test the results, issue: <command>make check_local</command> as the
|
---|
| 156 | <systemitem class="username">root</systemitem> user. Other targets are
|
---|
| 157 | available and can be listed with <command>make -C test help</command>.
|
---|
| 158 | The test timings are very dependent on the speed of the disk(s), and on
|
---|
| 159 | the number of enabled kernel options. A number of tests may fail. Two
|
---|
| 160 | tests have been reported to hang, and can be disabled via <command>rm
|
---|
| 161 | test/shell/lvcreate-large-raid.sh</command> and <command>rm
|
---|
| 162 | test/shell/snapshot-remove-dmsetup.sh</command>. The tests generate a lot
|
---|
| 163 | of kernel messages, which may clutter your terminal. You can disable them
|
---|
| 164 | by issuing <command>dmesg -D</command> before running the tests (do not
|
---|
| 165 | forget to issue <command>dmesg -E</command> when tests are done).
|
---|
[c627795] | 166 | </para>
|
---|
[8bc3edae] | 167 |
|
---|
[c627795] | 168 | <para>
|
---|
| 169 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 170 | </para>
|
---|
[8bc3edae] | 171 |
|
---|
| 172 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 173 |
|
---|
| 174 | </sect2>
|
---|
| 175 |
|
---|
| 176 | <sect2 role="commands">
|
---|
| 177 | <title>Command Explanations</title>
|
---|
| 178 |
|
---|
[c627795] | 179 | <para>
|
---|
[2800af7] | 180 | <parameter>--enable-applib</parameter>: This switch enables
|
---|
[c627795] | 181 | building of the shared application library.
|
---|
| 182 | </para>
|
---|
| 183 |
|
---|
| 184 | <para>
|
---|
[2800af7] | 185 | <parameter>--enable-cmdlib</parameter>: This switch enables
|
---|
[c627795] | 186 | building of the shared command library. It is required
|
---|
| 187 | when building the event daemon.
|
---|
| 188 | </para>
|
---|
| 189 |
|
---|
| 190 | <para>
|
---|
[2800af7] | 191 | <parameter>--enable-pkgconfig</parameter>: This switch enables
|
---|
[c627795] | 192 | installation of <command>pkg-config</command> support files.
|
---|
| 193 | </para>
|
---|
| 194 |
|
---|
| 195 | <para>
|
---|
[2800af7] | 196 | <parameter>--enable-udev_sync</parameter>: This switch enables
|
---|
[c627795] | 197 | synchronisation with <application>Udev</application> processing.
|
---|
| 198 | </para>
|
---|
| 199 |
|
---|
| 200 | <para>
|
---|
| 201 | <option>--enable-dmeventd</option>: This switch enables
|
---|
| 202 | building of the <application>Device Mapper</application>
|
---|
| 203 | event daemon.
|
---|
| 204 | </para>
|
---|
[8bc3edae] | 205 |
|
---|
[99fcc47] | 206 | <para>
|
---|
| 207 | <option>--enable-lvmetad</option>: This switch enables
|
---|
| 208 | building of the <application>LVM</application> metadata daemon,
|
---|
| 209 | which avoids scanning all the filesystems when an lvm command is
|
---|
| 210 | run.
|
---|
| 211 | </para>
|
---|
| 212 |
|
---|
[8bc3edae] | 213 | </sect2>
|
---|
| 214 |
|
---|
| 215 | <sect2 role="content">
|
---|
| 216 | <title>Contents</title>
|
---|
| 217 |
|
---|
| 218 | <segmentedlist>
|
---|
| 219 | <segtitle>Installed Programs</segtitle>
|
---|
| 220 | <segtitle>Installed Libraries</segtitle>
|
---|
[c3c56b2] | 221 | <segtitle>Installed Directories</segtitle>
|
---|
[8bc3edae] | 222 |
|
---|
| 223 | <seglistitem>
|
---|
[c627795] | 224 | <seg>
|
---|
[8ed30d52] | 225 | blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, lvmconf,
|
---|
[e9ca6e5d] | 226 | lvmdump, and vgimportclone. There are also numerous symbolic links to
|
---|
[71b7341f] | 227 | lvm that implement specific functionalities
|
---|
[c627795] | 228 | </seg>
|
---|
| 229 | <seg>
|
---|
[a037dab] | 230 | libdevmapper.so, liblvm2app.so and liblvm2cmd.so; optional:
|
---|
| 231 | libdevmapper-event.so, libdevmapper-event-lvm2.so,
|
---|
| 232 | libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2snapshot.so,
|
---|
[80454f5] | 233 | libdevmapper-event-lvm2raid.so, and libdevmapper-event-lvm2thin.so
|
---|
[c627795] | 234 | </seg>
|
---|
[c3c56b2] | 235 | <seg>
|
---|
[a037dab] | 236 | /etc/lvm and
|
---|
| 237 | /lib/device-mapper (optional)
|
---|
[c3c56b2] | 238 | </seg>
|
---|
[8bc3edae] | 239 | </seglistitem>
|
---|
| 240 | </segmentedlist>
|
---|
| 241 |
|
---|
| 242 | <variablelist>
|
---|
| 243 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 244 | <?dbfo list-presentation="list"?>
|
---|
[61b95ac4] | 245 |
|
---|
| 246 | <?dbhtml list-presentation="table"?>
|
---|
[8bc3edae] | 247 |
|
---|
[8ed30d52] | 248 | <varlistentry id="blkdeactivate">
|
---|
| 249 | <term><command>blkdeactivate</command></term>
|
---|
| 250 | <listitem>
|
---|
| 251 | <para>
|
---|
| 252 | utility to deactivate block device.
|
---|
| 253 | </para>
|
---|
| 254 | <indexterm zone="lvm2 blkdeactivate">
|
---|
| 255 | <primary sortas="b-blkdeactivate">blkdeactivate</primary>
|
---|
| 256 | </indexterm>
|
---|
| 257 | </listitem>
|
---|
| 258 | </varlistentry>
|
---|
| 259 |
|
---|
[a037dab] | 260 | <varlistentry id="dmeventd">
|
---|
| 261 | <term><command>dmeventd</command></term>
|
---|
| 262 | <listitem>
|
---|
| 263 | <para>
|
---|
| 264 | (optional) is the Device Mapper event daemon.
|
---|
| 265 | </para>
|
---|
| 266 | <indexterm zone="lvm2 dmeventd">
|
---|
| 267 | <primary sortas="b-dmeventd">dmeventd</primary>
|
---|
| 268 | </indexterm>
|
---|
| 269 | </listitem>
|
---|
| 270 | </varlistentry>
|
---|
| 271 |
|
---|
[8bc3edae] | 272 | <varlistentry id="dmsetup">
|
---|
| 273 | <term><command>dmsetup</command></term>
|
---|
| 274 | <listitem>
|
---|
[c627795] | 275 | <para>
|
---|
| 276 | is a low level logical volume management tool.
|
---|
| 277 | </para>
|
---|
[8bc3edae] | 278 | <indexterm zone="lvm2 dmsetup">
|
---|
| 279 | <primary sortas="b-dmsetup">dmsetup</primary>
|
---|
| 280 | </indexterm>
|
---|
| 281 | </listitem>
|
---|
| 282 | </varlistentry>
|
---|
| 283 |
|
---|
| 284 | <varlistentry id="fsadm">
|
---|
| 285 | <term><command>fsadm</command></term>
|
---|
| 286 | <listitem>
|
---|
[c627795] | 287 | <para>
|
---|
[73fe507] | 288 | is a utility used to resize or check filesystem on a device.
|
---|
[c627795] | 289 | </para>
|
---|
[8bc3edae] | 290 | <indexterm zone="lvm2 fsadm">
|
---|
| 291 | <primary sortas="b-fsadm">fsadm</primary>
|
---|
| 292 | </indexterm>
|
---|
| 293 | </listitem>
|
---|
| 294 | </varlistentry>
|
---|
| 295 |
|
---|
| 296 | <varlistentry id="lvm">
|
---|
| 297 | <term><command>lvm</command></term>
|
---|
| 298 | <listitem>
|
---|
[c627795] | 299 | <para>
|
---|
| 300 | provides the command-line tools for <application>LVM2</application>.
|
---|
| 301 | Commands are implemented via sympolic links to this program to
|
---|
| 302 | manage physical devices (pv*), volume groups (vg*) and logical
|
---|
| 303 | volumes (lv*).
|
---|
| 304 | </para>
|
---|
[8bc3edae] | 305 | <indexterm zone="lvm2 lvm">
|
---|
| 306 | <primary sortas="b-lvm">lvm</primary>
|
---|
| 307 | </indexterm>
|
---|
| 308 | </listitem>
|
---|
| 309 | </varlistentry>
|
---|
| 310 |
|
---|
| 311 | <varlistentry id="lvmconf">
|
---|
| 312 | <term><command>lvmconf</command></term>
|
---|
| 313 | <listitem>
|
---|
[c627795] | 314 | <para>
|
---|
[0d7900a] | 315 | is a script that modifies the locking configuration in
|
---|
[c627795] | 316 | the <application>LVM2</application> configuration file.
|
---|
| 317 | </para>
|
---|
[8bc3edae] | 318 | <indexterm zone="lvm2 lvmconf">
|
---|
| 319 | <primary sortas="b-lvmconf">lvmconf</primary>
|
---|
| 320 | </indexterm>
|
---|
| 321 | </listitem>
|
---|
| 322 | </varlistentry>
|
---|
| 323 |
|
---|
| 324 | <varlistentry id="lvmdump">
|
---|
| 325 | <term><command>lvmdump</command></term>
|
---|
| 326 | <listitem>
|
---|
[c627795] | 327 | <para>
|
---|
| 328 | is a tool used to dump various information concerning
|
---|
| 329 | <application>LVM2</application>.
|
---|
| 330 | </para>
|
---|
[8bc3edae] | 331 | <indexterm zone="lvm2 lvmdump">
|
---|
| 332 | <primary sortas="b-lvmdump">lvmdump</primary>
|
---|
| 333 | </indexterm>
|
---|
| 334 | </listitem>
|
---|
| 335 | </varlistentry>
|
---|
| 336 |
|
---|
| 337 | <varlistentry id="vgimportclone">
|
---|
| 338 | <term><command>vgimportclone</command></term>
|
---|
| 339 | <listitem>
|
---|
[c627795] | 340 | <para>
|
---|
| 341 | is used to import a duplicated VG (e.g. hardware snapshot).
|
---|
| 342 | </para>
|
---|
[8bc3edae] | 343 | <indexterm zone="lvm2 vgimportclone">
|
---|
| 344 | <primary sortas="b-vgimportclone">vgimportclone</primary>
|
---|
| 345 | </indexterm>
|
---|
| 346 | </listitem>
|
---|
| 347 | </varlistentry>
|
---|
| 348 |
|
---|
| 349 | <varlistentry id="libdevmapper">
|
---|
| 350 | <term><filename class='libraryfile'>libdevmapper.so</filename></term>
|
---|
| 351 | <listitem>
|
---|
[c627795] | 352 | <para>
|
---|
| 353 | contains the <application>Device Mapper</application> API
|
---|
| 354 | functions.
|
---|
| 355 | </para>
|
---|
[8bc3edae] | 356 | <indexterm zone="lvm2 libdevmapper">
|
---|
| 357 | <primary sortas="c-libdevmapper">libdevmapper.so</primary>
|
---|
| 358 | </indexterm>
|
---|
| 359 | </listitem>
|
---|
| 360 | </varlistentry>
|
---|
| 361 |
|
---|
| 362 | </variablelist>
|
---|
| 363 |
|
---|
| 364 | </sect2>
|
---|
| 365 |
|
---|
| 366 | </sect1>
|
---|