Red Hat Enterprise Linux 7

Logical Volume Manager Administration

LVM Administrator Guide


Steven Levine

Red Hat Customer Content Services


This book describes the LVM logical volume manager, including information on running LVM in a clustered environment.
1. The LVM Logical Volume Manager
1.1. New and Changed Features
1.1.1. New and Changed Features for Red Hat Enterprise Linux 7.1
1.1.2. New and Changed Features for Red Hat Enterprise Linux 7.2
1.1.3. New and Changed Features for Red Hat Enterprise Linux 7.3
1.1.4. New and Changed Features for Red Hat Enterprise Linux 7.4
1.2. Logical Volumes
1.3. LVM Architecture Overview
1.4. The Clustered Logical Volume Manager (CLVM)
1.5. Document Overview
2. LVM Components
2.1. Physical Volumes
2.1.1. LVM Physical Volume Layout
2.1.2. Multiple Partitions on a Disk
2.2. Volume Groups
2.3. LVM Logical Volumes
2.3.1. Linear Volumes
2.3.2. Striped Logical Volumes
2.3.3. RAID Logical Volumes
2.3.4. Thinly-Provisioned Logical Volumes (Thin Volumes)
2.3.5. Snapshot Volumes
2.3.6. Thinly-Provisioned Snapshot Volumes
2.3.7. Cache Volumes
3. LVM Administration Overview
3.1. Creating LVM Volumes in a Cluster
3.2. Logical Volume Creation Overview
3.3. Growing a File System on a Logical Volume
3.4. Logical Volume Backup
3.5. Logging
3.6. The Metadata Daemon (lvmetad)
3.7. Displaying LVM Information with the lvm Command
4. LVM Administration with CLI Commands
4.1. Using CLI Commands
4.2. Physical Volume Administration
4.2.1. Creating Physical Volumes
4.2.2. Displaying Physical Volumes
4.2.3. Preventing Allocation on a Physical Volume
4.2.4. Resizing a Physical Volume
4.2.5. Removing Physical Volumes
4.3. Volume Group Administration
4.3.1. Creating Volume Groups
4.3.2. LVM Allocation
4.3.3. Creating Volume Groups in a Cluster
4.3.4. Adding Physical Volumes to a Volume Group
4.3.5. Displaying Volume Groups
4.3.6. Scanning Disks for Volume Groups to Build the Cache File
4.3.7. Removing Physical Volumes from a Volume Group
4.3.8. Activating and Deactivating Volume Groups
4.3.9. Changing the Parameters of a Volume Group
4.3.10. Removing Volume Groups
4.3.11. Splitting a Volume Group
4.3.12. Combining Volume Groups
4.3.13. Backing Up Volume Group Metadata
4.3.14. Renaming a Volume Group
4.3.15. Moving a Volume Group to Another System
4.3.16. Recreating a Volume Group Directory
4.4. Logical Volume Administration
4.4.1. Creating Linear Logical Volumes
4.4.2. Creating Striped Volumes
4.4.3. RAID Logical Volumes
4.4.4. Creating Mirrored Volumes
4.4.5. Creating Thinly-Provisioned Logical Volumes
4.4.6. Creating Snapshot Volumes
4.4.7. Creating Thinly-Provisioned Snapshot Volumes
4.4.8. Creating LVM Cache Logical Volumes
4.4.9. Merging Snapshot Volumes
4.4.10. Persistent Device Numbers
4.4.11. Reducing Logical Volumes
4.4.12. Changing the Parameters of a Logical Volume Group
4.4.13. Renaming Logical Volumes
4.4.14. Removing Logical Volumes
4.4.15. Displaying Logical Volumes
4.4.16. Growing Logical Volumes
4.4.17. Shrinking Logical Volumes
4.4.18. Controlling Logical Volume Activation
4.4.19. Tracking and Displaying Historical Logical Volumes (Red Hat Enterprise Linux 7.3 and Later)
4.5. Controlling LVM Device Scans with Filters
4.6. Online Data Relocation
4.7. Activating Logical Volumes on Individual Nodes in a Cluster
4.8. Customized Reporting for LVM
4.8.1. Format Control
4.8.2. Object Display Fields
4.8.3. Sorting LVM Reports
4.8.4. Specifying Units
4.8.5. JSON Format Output (Red Hat Enterprise Linux 7.3 and later)
4.8.6. Command Log Reporting (Red Hat Enterprise Linux 7.3 and later)
5. LVM Configuration Examples
5.1. Creating an LVM Logical Volume on Three Disks
5.2. Creating a Striped Logical Volume
5.3. Splitting a Volume Group
5.4. Removing a Disk from a Logical Volume
5.4.1. Moving Extents to Existing Physical Volumes
5.4.2. Moving Extents to a New Disk
5.5. Creating a Mirrored LVM Logical Volume in a Cluster
6. LVM Troubleshooting
6.1. Troubleshooting Diagnostics
6.2. Displaying Information on Failed Devices
6.3. Recovering from LVM Mirror Failure
6.4. Recovering Physical Volume Metadata
6.5. Replacing a Missing Physical Volume
6.6. Removing Lost Physical Volumes from a Volume Group
6.7. Insufficient Free Extents for a Logical Volume
6.8. Duplicate PV Warnings for Multipathed Devices
6.8.1. Root Cause of Duplicate PV Warning
6.8.2. Duplicate Warnings for Single Paths
6.8.3. Duplicate Warnings for Multipath Maps
A. The Device Mapper
A.1. Device Table Mappings
A.1.1. The linear Mapping Target
A.1.2. The striped Mapping Target
A.1.3. The mirror Mapping Target
A.1.4. The snapshot and snapshot-origin Mapping Targets
A.1.5. The error Mapping Target
A.1.6. The zero Mapping Target
A.1.7. The multipath Mapping Target
A.1.8. The crypt Mapping Target
A.2. The dmsetup Command
A.2.1. The dmsetup info Command
A.2.2. The dmsetup ls Command
A.2.3. The dmsetup status Command
A.2.4. The dmsetup deps Command
A.3. Device Mapper Support for the udev Device Manager
A.3.1. udev Integration with the Device Mapper
A.3.2. Commands and Interfaces that Support udev
B. The LVM Configuration Files
B.1. The LVM Configuration Files
B.2. The lvmconfig Command
B.3. LVM Profiles
B.4. Sample lvm.conf File
C. LVM Selection Criteria
C.1. Selection Criteria Field Types
C.2. Selection Criteria Operators
C.3. Selection Criteria Fields
C.4. Specifying Time Values
C.4.1. Standard time selection format
C.4.2. Freeform time selection format
C.5. Selection Criteria Display Examples
C.6. Selection Criteria Processing Examples
D. LVM Object Tags
D.1. Adding and Removing Object Tags
D.2. Host Tags
D.3. Controlling Activation with Tags
E. LVM Volume Group Metadata
E.1. The Physical Volume Label
E.2. Metadata Contents
E.3. Sample Metadata
F. Revision History