Red Hat Enterprise Linux 7 Logical Volume Manager .

Transcription

Red Hat Enterprise Linux 7Logical Volume ManagerAdministrationLVM Administrator Guide

Red Hat Enterprise Linux 7 Logical Volume Manager AdministrationLVM Administrator Guide

Legal NoticeCo pyright 20 15 Red Hat, Inc. and o thers.This do cument is licensed by Red Hat under the Creative Co mmo ns Attributio n-ShareAlike 3.0Unpo rted License. If yo u distribute this do cument, o r a mo dified versio n o f it, yo u must pro videattributio n to Red Hat, Inc. and pro vide a link to the o riginal. If the do cument is mo dified, all RedHat trademarks must be remo ved.Red Hat, as the licenso r o f this do cument, waives the right to enfo rce, and agrees no t to assert,Sectio n 4 d o f CC-BY-SA to the fullest extent permitted by applicable law.Red Hat, Red Hat Enterprise Linux, the Shado wman lo go , JBo ss, MetaMatrix, Fedo ra, the InfinityLo go , and RHCE are trademarks o f Red Hat, Inc., registered in the United States and o therco untries.Linux is the registered trademark o f Linus To rvalds in the United States and o ther co untries.Java is a registered trademark o f Oracle and/o r its affiliates.XFS is a trademark o f Silico n Graphics Internatio nal Co rp. o r its subsidiaries in the UnitedStates and/o r o ther co untries.MySQL is a registered trademark o f MySQL AB in the United States, the Euro pean Unio n ando ther co untries.No de.js is an o fficial trademark o f Jo yent. Red Hat So ftware Co llectio ns is no t fo rmallyrelated to o r endo rsed by the o fficial Jo yent No de.js o pen so urce o r co mmercial pro ject.The OpenStack Wo rd Mark and OpenStack Lo go are either registered trademarks/servicemarks o r trademarks/service marks o f the OpenStack Fo undatio n, in the United States and o therco untries and are used with the OpenStack Fo undatio n's permissio n. We are no t affiliated with,endo rsed o r spo nso red by the OpenStack Fo undatio n, o r the OpenStack co mmunity.All o ther trademarks are the pro perty o f their respective o wners.AbstractThis bo o k describes the LVM lo gical vo lume manager, including info rmatio n o n running LVM ina clustered enviro nment.

T able of Cont ent sT able of Contents. .hapt C. . . .er. .1. . T. he. . . LVM. . . . Logical. . . . . . . Volume. . . . . . . Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3. . . . . . . . . . 1.1. New and Chang ed Features fo r Red Hat Enterp ris e Linux 7.13 1.2. Lo g ic al Vo lumes3 1.3. LVM Arc hitec ture O verview4 1.4. The Clus tered Lo g ic al Vo lume Manag er (CLVM)5 1.5. Do c ument O verview6. .hapt C. . . .er. .2. . LVM. . . . Component. . . . . . . . . . .s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8. . . . . . . . . . 2 .1. Phys ic al Vo lumes8 2 .2. Vo lume G ro up s9 2 .3. LVM Lo g ic al Vo lumes10. .hapt C. . . .er. .3. .LVM. . . . Administ. . . . . . . .rat. . ion. . . .O. verview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1. 7. . . . . . . . . . 3 .1. Creating LVM Vo lumes in a Clus ter17 3 .2. Lo g ic al Vo lume Creatio n O verview18 3 .3. G ro wing a File Sys tem o n a Lo g ic al Vo lume19 3 .4. Lo g ic al Vo lume Bac kup19 3 .5. Lo g g ing19 3 .6 . The Metad ata Daemo n (lvmetad ) 3 .7. Dis p laying LVM Info rmatio n with the lvm Co mmand1920. .hapt C. . . .er. .4. . LVM. . . . Administ. . . . . . . . rat. . .ion. . .wit. . .h. CLI. . . Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. 2. . . . . . . . . . 4 .1. Us ing CLI Co mmand s 4 .2. Phys ic al Vo lume Ad minis tratio n 4 .3. Vo lume G ro up Ad minis tratio n222326 4 .4. Lo g ic al Vo lume Ad minis tratio n 4 .5. Co ntro lling LVM Devic e Sc ans with Filters3472 4 .6 . O nline Data Relo c atio n 4 .7. Ac tivating Lo g ic al Vo lumes o n Ind ivid ual No d es in a Clus ter7373 4 .8 . Cus to miz ed Rep o rting fo r LVM74. .heT. . pvs. . . . Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7. 6. . . . . . . . . . .heT. . vgs. . . . Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7. 8. . . . . . . . . . .heT. . lvs. . . Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7. 9. . . . . . . . . . 4 .8 .3. So rting LVM Rep o rts83 4 .8 .4. Sp ec ifying Units83. .hapt C. . . .er. .5. .LVM. . . . Configurat. . . . . . . . . .ion. . .Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8. 5. . . . . . . . . . 5 .1. Creating an LVM Lo g ic al Vo lume o n Three Dis ks 5 .2. Creating a Strip ed Lo g ic al Vo lume 5 .3. Sp litting a Vo lume G ro up 5 .4. Remo ving a Dis k fro m a Lo g ic al Vo lume85868790 5 .5. Creating a Mirro red LVM Lo g ic al Vo lume in a Clus ter92. .hapt C. . . .er. .6. . LVM. . . .T. .roubleshoot. . . . . . . . . . .ing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9. 5. . . . . . . . . . 6 .1. Tro ub les ho o ting Diag no s tic s95 6 .2. Dis p laying Info rmatio n o n Failed Devic es95 6 .3. Rec o vering fro m LVM Mirro r Failure96 6 .4. Rec o vering Phys ic al Vo lume Metad ata 6 .5. Rep lac ing a Mis s ing Phys ic al Vo lume 6 .6 . Remo ving Lo s t Phys ic al Vo lumes fro m a Vo lume G ro up 6 .7. Ins uffic ient Free Extents fo r a Lo g ic al Vo lume9910 110 110 11

Red Hat Ent erprise Linux 7 Logical Volume Manager Administ rat ion. .heT. . Device. . . . . . .Mapper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1. 0. 3. . . . . . . . . . A .1. Devic e Tab le Map p ing s10 3 A .2. The d ms etup Co mmand A .3. Devic e Map p er Sup p o rt fo r the ud ev Devic e Manag er113117. .heT. . LVM. . . . .Configurat. . . . . . . . . ion. . . Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2. 1. . . . . . . . . . B .1. The LVM Co nfig uratio n Files121 B .2. The lvm d ump c o nfig Co mmand121 B .3. LVM Pro files B .4. Samp le lvm.c o nf File122123.LVM. . . .O. bject. . . . . T. ags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.4. 6. . . . . . . . . . C .1. Ad d ing and Remo ving O b jec t Tag s146 C .2. Ho s t Tag s146 C .3. Co ntro lling Ac tivatio n with Tag s147.LVM. . . .Volume. . . . . . .G. roup. . . . .Met. . . adat. . . . a. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.4. 8. . . . . . . . . . D .1. The Phys ic al Vo lume Lab el148 D .2. Metad ata Co ntents D .3. Samp le Metad ata148149. . . . . . . . .HistRevision. . . ory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1. 52. I.ndex. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 53.2

Chapt er 1 . T he LVM Logical Volume ManagerChapter 1. The LVM Logical Volume ManagerThis chapter provides a summary of the features of the LVM logical volume manager that are newsince the initial release of Red Hat Enterprise Linux 7. This chapter also provides a high-leveloverview of the components of the Logical Volume Manager (LVM).1.1. New and Changed Feat ures for Red Hat Ent erprise Linux 7.1Red Hat Enterprise Linux 7.1 includes the following documentation and feature updates andchanges.The documentation for thinly-provisioned volumes and thinly-provisioned snapshots has beenclarified. Additional information about LVM thin provisioning is now provided in the l vmthi n(7)man page. For general information on thinly-provisioned logical volumes, refer to Section 2.3.4,“ Thinly-Provisioned Logical Volumes (Thin Volumes)” . For information For information on thinlyprovisioned snapshot volumes, refer to Section 2.3.6, “ Thinly-Provisioned Snapshot Volumes” .This manual now documents the l vm d umpco nfi g command in Section B.2, “ The l vmd umpco nfi g Command” .This manual now documents LVM profiles in Section B.3, “ LVM Profiles” .This manual now documents the l vm command in Section 3.7, “ D isplaying LVM Information withthe l vm Command” .In the Red Hat Enterprise Linux 7.1 release, you can control activation of thin pool snapshots withthe -k and -K options of the l vcreate and l vchang e command, as documented inSection 4.4.17, “ Controlling Logical Volume Activation” .This manual documents the --fo rce argument of the vg i mpo rt command. This allows you toimport volume groups that are missing physical volumes and subsequently run the vg red uce -remo vemi ssi ng command. For information on the vg i mpo rt command, refer toSection 4.3.15, “ Moving a Volume Group to Another System” .This manual documents the --mi rro rso nl y argument of the vg red uce command. This allowsyou remove only the logical volumes that are mirror images from a physical volume that hasfailed. For information on using this option, refer to Section 4.3.15, “ Moving a Volume Group toAnother System” .In addition, small technical corrections and clarifications have been made throughout the document.1.2. Logical VolumesVolume management creates a layer of abstraction over physical storage, allowing you to createlogical storage volumes. This provides much greater flexibility in a number of ways than usingphysical storage directly. With a logical volume, you are not restricted to physical disk sizes. Inaddition, the hardware storage configuration is hidden from the software so it can be resized andmoved without stopping applications or unmounting file systems. This can reduce operational costs.Logical volumes provide the following advantages over using physical storage directly:Flexible capacityWhen using logical volumes, file systems can extend across multiple disks, since you canaggregate disks and partitions into a single logical volume.3

Red Hat Ent erprise Linux 7 Logical Volume Manager Administ rat ionResizeable storage poolsYou can extend logical volumes or reduce logical volumes in size with simple softwarecommands, without reformatting and repartitioning the underlying disk devices.Online data relocationTo deploy newer, faster, or more resilient storage subsystems, you can move data while yoursystem is active. D ata can be rearranged on disks while the disks are in use. For example, youcan empty a hot-swappable disk before removing it.Convenient device namingLogical storage volumes can be managed in user-defined and custom named groups.D isk stripingYou can create a logical volume that stripes data across two or more disks. This can dramaticallyincrease throughput.Mirroring volumesLogical volumes provide a convenient way to configure a mirror for your data.Volume SnapshotsUsing logical volumes, you can take device snapshots for consistent backups or to test the effectof changes without affecting the real data.The implementation of these features in LVM is described in the remainder of this document.1.3. LVM Archit ect ure OverviewFor the Red Hat Enterprise Linux 4 release of the Linux operating system, the original LVM1 logicalvolume manager was replaced by LVM2, which has a more generic kernel framework than LVM1.LVM2 provides the following improvements over LVM1:flexible capacitymore efficient metadata storagebetter recovery formatnew ASCII metadata formatatomic changes to metadataredundant copies of metadataLVM2 is backwards compatible with LVM1, with the exception of snapshot and cluster support. Youcan convert a volume group from LVM1 format to LVM2 format with the vg co nvert command. Forinformation on converting LVM metadata format, see the vg co nvert(8) man page.The underlying physical storage unit of an LVM logical volume is a block device such as a partitionor whole disk. This device is initialized as an LVM physical volume (PV).To create an LVM logical volume, the physical volumes are combined into a volume group (VG). Thiscreates a pool of disk space out of which LVM logical volumes (LVs) can be allocated. This processis analogous to the way in which disks are divided into partitions. A logical volume is used by filesystems and applications (such as databases).4

Chapt er 1 . T he LVM Logical Volume ManagerFigure 1.1, “ LVM Logical Volume Components” shows the components of a simple LVM logicalvolume:Fig u re 1.1. LVM Lo g ical Vo lu me C o mp o n en t sFor detailed information on the components of an LVM logical volume, see Chapter 2, LVMComponents.1.4 . T he Clust ered Logical Volume Manager (CLVM)The Clustered Logical Volume Manager (CLVM) is a set of clustering extensions to LVM. Theseextensions allow a cluster of computers to manage shared storage (for example, on a SAN) usingLVM. CLVM is part of the Resilient Storage Add-On.Whether you should use CLVM depends on your system requirements:If only one node of your system requires access to the storage you are configuring as logicalvolumes, then you can use LVM without the CLVM extensions and the logical volumes created withthat node are all local to the node. Additionally, if you are using a clustered system for failoverwhere only a single node that accesses the storage is active at any one time, then you can alsouse LVM without the CLVM extensions. When configuring logical volumes in a cluster that will notrequire the CLVM extensions, you configure your system with the LVM high availability resourceagent. For information on configuring resources in a cluster, see the High Availability Add-OnReference.If more than one node of your cluster will require access to your storage which is then sharedamong the active nodes, then you must use CLVM. CLVM allows a user to configure logicalvolumes on shared storage by locking access to physical storage while a logical volume is beingconfigured. LVM uses clustered locking services to manage the shared storage. When configuringlogical volumes in a cluster that will require the CLVM extensions, you configure your system witha cl vm resource agent. For information on configuring resources in a cluster, see the HighAvailability Add-On Reference.5

Red Hat Ent erprise Linux 7 Logical Volume Manager Administ rat ionIn order to use CLVM, the High Availability Add-On and Resilient Storage Add-On software, includingthe cl vmd daemon, must be running. The cl vmd daemon is the key clustering extension to LVM. Thecl vmd daemon runs in each cluster computer and distributes LVM metadata updates in a cluster,presenting each cluster computer with the same view of the logical volumes.Figure 1.2, “ CLVM Overview” shows a CLVM overview in a cluster.Fig u re 1.2. C LVM O verviewIn Red Hat Enterprise Linux 7, clusters are managed through Pacemaker. Clustered LVM logicalvolumes are supported only in conjunction with Pacemaker clusters, and must be configured ascluster resources. For information on configuring LVM volumes in a cluster, see Section 3.1,“ Creating LVM Volumes in a Cluster” .1.5. Document OverviewThe remainder of this document includes the following chapters:Chapter 2, LVM Components describes the components that make up an LVM logical volume.Chapter 3, LVM Administration Overview provides an overview of the basic steps you perform toconfigure LVM logical volumes.Chapter 4, LVM Administration with CLI Commands summarizes the individual administrative tasksyou can perform with the LVM CLI commands to create and maintain logical volumes.Chapter 5, LVM Configuration Examples provides a variety of LVM configuration examples.6

Chapt er 1 . T he LVM Logical Volume ManagerChapter 6, LVM Troubleshooting provides instructions for troubleshooting a variety of LVM issues.Appendix A, The Device Mapper describes the D evice Mapper that LVM uses to map logical andphysical volumes.Appendix B, The LVM Configuration Files describes the LVM configuration files.Appendix C, LVM Object Tags describes LVM object tags and host tags.Appendix D , LVM Volume Group Metadata describes LVM volume group metadata, and includes asample copy of metadata for an LVM volume group.7

Red Hat Ent erprise Linux 7 Logical Volume Manager Administ rat ionChapter 2. LVM ComponentsThis chapter describes the components of an LVM Logical volume.2.1. Physical VolumesThe underlying physical storage unit of an LVM logical volume is a block device such as a partitionor whole disk. To use the device for an LVM logical volume, the device must be initialized as aphysical volume (PV). Initializing a block device as a physical volume places a label near the start ofthe device.By default, the LVM label is placed in the second 512-byte sector. You can overwrite this default byplacing the label on any of the first 4 sectors. This allows LVM volumes to co-exist with other users ofthese sectors, if necessary.An LVM label provides correct identification and device ordering for a physical device, since devicescan come up in any order when the system is booted. An LVM label remains persistent across rebootsand throughout a cluster.The LVM label identifies the device as an LVM physical volume. It contains a random unique identifier(the UUID ) for the physical volume. It also stores the size of the block device in bytes, and it recordswhere the LVM metadata will be stored on the device.The LVM metadata contains the configuration details of the LVM volume groups on your system. Bydefault, an identical copy of the metadata is maintained in every metadata area in every physicalvolume within the volume group. LVM metadata is small and stored as ASCII.Currently LVM allows you to store 0, 1 or 2 identical copies of its metadata on each physical volume.The default is 1 copy. Once you configure the number of metadata copies on the physical volume,you cannot change that number at a later time. The first copy is stored at the start of the device,shortly after the label. If there is a second copy, it is placed at the end of the device. If youaccidentally overwrite the area at the beginning of your disk by writing to a different disk than youintend, a second copy of the metadata at the end of the device will allow you to recover the metadata.For detailed information about the LVM metadata and changing the metadata parameters, seeAppendix D , LVM Volume Group Metadata.2.1.1. LVM Physical Volume LayoutFigure 2.1, “ Physical Volume layout” shows the layout of an LVM physical volume. The LVM label ison the second sector, followed by the metadata area, followed by the usable space on the device.NoteIn the Linux kernel (and throughout this document), sectors are considered to be 512 bytes insize.8

Chapt er 2 . LVM Component sFig u re 2.1. Ph ysical Vo lu me layo u t2.1.2. Mult iple Part it ions on a DiskLVM allows you to create physical volumes out of disk partitions. Red Hat recommends that youcreate a single partition that covers the whole disk to label as an LVM physical volume for thefollowing reasons:Administrative convenienceIt is easier to keep track of the hardware in a system if each real disk only appears once. Thisbecomes particularly true if a disk fails. In addition, multiple physical volumes on a single diskmay cause a kernel warning about unknown partition types at boot.Striping performanceLVM cannot tell that two physical volumes are on the same physical disk. If you create a stripedlogical volume when two physical volumes are on the same physical disk, the stripes could be ondifferent partitions on the same disk. This would result in a decrease in performance rather thanan increase.Although it is not recommended, there may be specific circumstances when you will need to divide adisk into separate LVM physical volumes. For example, on a system with few disks it may benecessary to move data around partitions when you are migrating an existing system to LVMvolumes. Additionally, if you have a very large disk and want to have more than one volume groupfor administrative purposes then it is necessary to partition the disk. If you do have a disk with morethan one partition and both of those partitions are in the same volume group, take care to specifywhich partitions are to be included in a logical volume when creating striped volumes.2.2. Volume GroupsPhysical volumes are combined into volume groups (VGs). This creates a pool of disk space out ofwhich logical volumes can be allocated.Within a volume group, the disk space available for allocation is divided into units of a fixed-sizecalled extents. An extent is the smallest unit of space that can be allocated. Within a physical volume,extents are referred to as physical extents.A logical volume is allocated into logical extents of the same size as the physical extents. The extentsize is thus the same for all logical volumes in the volume group. The volume group maps the logicalextents to physical extents.9

Red Hat Ent erprise Linux 7 Logical Volume Manager Administ rat ion2.3. LVM Logical VolumesIn LVM, a volume group is divided up into logical volumes. The following sections describe thedifferent types of logical volumes.2.3.1. Linear VolumesA linear volume aggregates space from one or more physical volumes into one logical volume. Forexample, if you have two 60GB disks, you can create a 120GB logical volume. The physical storageis concatenated.Creating a linear volume assigns a range of physical extents to an area of a logical volume in order.For example, as shown in Figure 2.2, “ Extent Mapping” logical extents 1 to 99 could map to onephysical volume and logical extents 100 to 198 could map to a second physical volume. From thepoint of view of the application, there is one device that is 198 extents in size.Fig u re 2.2. Ext en t Map p in gThe physical volumes that make up a logical volume do not have to be the same size. Figure 2.3,“ Linear Volume with Unequal Physical Volumes” shows volume group VG 1 with a physical extentsize of 4MB. This volume group includes 2 physical volumes named P V1 and P V2. The physicalvolumes are divided into 4MB units, since that is the extent size. In this example, P V1 is 200 extents10

Chapt er 2 . LVM Component sin size (800MB) and P V2 is 100 extents in size (400MB). You can create a linear volume any sizebetween 1 and 300 extents (4MB to 1200MB). In this example, the linear volume named LV1 is 300extents in size.Fig u re 2.3. Lin ear Vo lu me wit h U n eq u al Ph ysical Vo lu mesYou can configure more than one linear logical volume of whatever size you require from the pool ofphysical extents. Figure 2.4, “ Multiple Logical Volumes” shows the same volume group as inFigure 2.3, “ Linear Volume with Unequal Physical Volumes” , but in this case two logical volumeshave been carved out of the volume group: LV1, which is 250 extents in size (1000MB) and LV2which is 50 extents in size (200MB).Fig u re 2.4 . Mu lt ip le Lo g ical Vo lu mes11

Red Hat Ent erprise Linux 7 Logical Volume Manager Administ rat ion2.3.2. St riped Logical VolumesWhen you write data to an LVM logical volume, the file system lays the data out across the underlyingphysical volumes. You can control the way the data is written to the physical volumes by creating astriped logical volume. For large sequential reads and writes, this can improve the efficiency of thedata I/O.Striping enhances performance by writing data to a predetermined number of physical volumes inround-robin fashion. With striping, I/O can be done in parallel. In some situations, this can result innear-linear performance gain for each additional physical volume in the stripe.The following illustration shows data being striped across three physical volumes. In this figure:the first stripe of data is written to the first physical volumethe second stripe of data is written to the second physical volumethe third stripe of data is written to the third physical volumethe fourth stripe of data is written to the first physical volumeIn a striped logical volume, the size of the stripe cannot exceed the size of an extent.Fig u re 2.5. St rip in g D at a Acro ss T h ree PVsStriped logical volumes can be extended by concatenating another set of devices onto the end of thefirst set. In order to extend a striped logical volume, however, there must be enough free space on the12

Chapt er 2 . LVM Component sunderlying physical volumes that make up the volume group to support the stripe. For example, ifyou have a two-way stripe that uses up an entire volume group, adding a single physical volume tothe volume group will not enable you to extend the stripe. Instead, you must add at least two physicalvolumes to the volume group. For more information on extending a striped volume, seeSection 4.4.15.1, “ Extending a Striped Volume” .2.3.3. RAID Logical VolumesLVM supports RAID 1/4/5/6/10. An LVM RAID volume has the following characteristics:RAID logical volumes created and managed via LVM leverage the MD kernel drivers.RAID 1 images can be temporarily split from the array and merged back into the array later.LVM RAID volumes support snapshots.For information on creating RAID logical volumes, see Section 4.4.3, “ RAID Logical Volumes” .NoteRAID logical volumes are not cluster-aware. While RAID logical volumes can be created andactivated exclusively on one machine, they cannot be activated simultaneously on more thanone machine. If you require non-exclusive mirrored volumes, you must create the volumes witha mi rro r segment type, as described in Section 4.4.4, “ Creating Mirrored Volumes” .2.3.4 . T hinly-Provisioned Logical Volumes (T hin Volumes)Logical volumes can be thinly provisioned. This allows you to create logical volumes that are largerthan the available extents. Using thin provisioning, you can manage a storage pool of free space,known as a thin pool, which can be allocated to an arbitrary number of devices when needed byapplications. You can then create devices that can be bound to the thin pool for later allocationwhen an application actually writes to the logical volume. The thin pool can be expandeddynamically when needed for cost-effective allocation of storage space.NoteThin volumes are not supported across the nodes in a cluster. The thin pool and all its thinvolumes must be exclusively activated on only one cluster node.By using thin provisioning, a storage administrator can over-commit the physical storage, oftenavoiding the need to purchase additional storage. For example, if ten users each request a 100GBfile system for their application, the storage administrator can create what appears to be a 100GB filesystem for each user but which is backed by less actual storage that is used only when needed.When using thin provisioning, it is important that the storage administrator monitor the storage pooland add more capacity if it starts to become full.To make sure that all available space can be used, LVM supports data discard. This allows for reuse of the space that was formerly used by a discarded file or other block range.For information on creating thin volumes, refer to Section 4.4.5, “ Creating Thinly-Provisioned LogicalVolumes” .13

Red Hat Ent erprise Linux 7 Logical Volume Manager Administ rat ionThin volumes provide support for a new implementation of copy-on-write (COW) snapshot logicalvolumes, which allow many virtual devices to share the same data in the thin pool. For informationon thin snapshot volumes, refer to Section 2.3.6, “ Thinly-Provisioned Snapshot Volumes” .2.3.5. Snapshot VolumesThe LVM snapshot feature provides the ability to create virtual images of a device at a particularinstant without causing a service interruption. When a change is made to the original device (theorigin) after a snapshot is taken, the snapshot feature makes a copy of the changed data area as itwas prior to the change so that it can reconstruct the state of the device.NoteLVM supports thinly-provisioned snapshots. For information on thinly provisioned snapshotvolumes, refer to Section 2.3.6, “ Thinly-Provisioned Snapshot Volumes” .NoteLVM snapshots are not supported across the nodes in a cluster. You cannot create asnapshot volume in a clustered volume group.Because a snapshot copies only the data areas that change after the snapshot is created, thesnapshot feature requires a minimal amount of storage. For example, with a rarely updated origin, 35 % of the origin's capacity is sufficient to maintain the snapshot.NoteSnapshot copies of a file system are virtual copies, not an actual media backup for a filesystem. Snapshots do not provide a substitute for a backup procedure.The size of the snapshot governs the amount of space set aside for storing the changes to the originvolume. For example, if you made a snapshot and then completely overwrote the origin the snapshotwould have to be at least as big as the origin volume to hold the changes. You need to dimension asnapshot according to the expected level of change. So for example a short-lived snapshot of aread-mostly volume, such as /usr, would need less space than a long-lived snapshot of a volumethat sees a greater number of writes, such as /ho me.If a snapshot runs full, the snapshot becomes invalid, since it can no longer track changes on theorigin volume. You should regularly monitor the size of the snapshot. Snapshots are fully resizeable,however, so if you have the storage capacity you can increase the size of the snapshot volume toprevent it from getting dropped. Conversely, if you

1.1. New and Changed Features for Red Hat Enterprise Linux 7.1 Red Hat Enterprise Linux 7.1 includes the following documentation and feature updates and changes. The documentation for thinly-provisioned volumes and thinly-provisioned snapshots has been clarified. Additional information about LVM thin provis