Installation guide
Table Of Contents
- LVM Administrator's Guide
- Table of Contents
- Introduction
- Chapter 1. The LVM Logical Volume Manager
- Chapter 2. LVM Components
- Chapter 3. LVM Administration Overview
- Chapter 4. LVM Administration with CLI Commands
- 1. Using CLI Commands
- 2. Physical Volume Administration
- 3. Volume Group Administration
- 3.1. Creating Volume Groups
- 3.2. Adding Physical Volumes to a Volume Group
- 3.3. Displaying Volume Groups
- 3.4. Scanning Disks for Volume Groups to Build the Cache File
- 3.5. Removing Physical Volumes from a Volume Group
- 3.6. Changing the Parameters of a Volume Group
- 3.7. Activating and Deactivating Volume Groups
- 3.8. Removing Volume Groups
- 3.9. Splitting a Volume Group
- 3.10. Combining Volume Groups
- 3.11. Backing Up Volume Group Metadata
- 3.12. Renaming a Volume Group
- 3.13. Moving a Volume Group to Another System
- 3.14. Recreating a Volume Group Directory
- 4. Logical Volume Administration
- 4.1. Creating Logical Volumes
- 4.2. Persistent Device Numbers
- 4.3. Resizing Logical Volumes
- 4.4. Changing the Parameters of a Logical Volume Group
- 4.5. Renaming Logical Volumes
- 4.6. Removing Logical Volumes
- 4.7. Displaying Logical Volumes
- 4.8. Growing Logical Volumes
- 4.9. Extending a Striped Volume
- 4.10. Shrinking Logical Volumes
- 5. Creating Snapshot Volumes
- 6. Controlling LVM Device Scans with Filters
- 7. Online Data Relocation
- 8. Activating Logical Volumes on Individual Nodes in a Cluster
- 9. Customized Reporting for LVM
- Chapter 5. LVM Configuration Examples
- Chapter 6. LVM Troubleshooting
- Chapter 7. LVM Administration with the LVM GUI
- Appendix A. The Device Mapper
- Appendix B. The LVM Configuration Files
- Appendix C. LVM Object Tags
- Appendix D. LVM Volume Group Metadata
- Index

To activate logical volumes exclusively on one node, use the lvchange -aey command. Alternat-
ively, you can use lvchange -aly command to activate logical volumes only on the local node
but not exclusively. You can later activate them on additional nodes concurrently.
You can also activate logical volumes on individual nodes by using LVM tags, which are de-
scribed in Appendix C, LVM Object Tags. You can also specify activation of nodes in the config-
uration file, which is described in Appendix B, The LVM Configuration Files.
9. Customized Reporting for LVM
You can produce concise and customizable reports of LVM objects with the pvs, lvs, and vgs
commands. The reports that these commands generate include one line of output for each ob-
ject. Each line contains an ordered list of fields of properties related to the object. There are five
ways to select the objects to be reported: by physical volume, volume group, logical volume,
physical volume segment, and logical volume segment.
The following sections provide:
• A summary of command arguments you can use to control the format of the generated re-
port.
• A list of the fields you can select for each LVM object.
• A summary of command arguments you can use to sort the generated report.
• Instructions for specifying the units of the report output.
9.1. Format Control
Whether you use the pvs, lvs, or vgs command determines the default set of fields displayed
and the sort order. You can control the output of these commands with the following arguments:
• You can change what fields are displayed to something other than the default by using the -
o argument. For example, the following output is the default display for the pvs command
(which displays information about physcial volumes).
# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb1 new_vg lvm2 a- 17.14G 17.14G
/dev/sdc1 new_vg lvm2 a- 17.14G 17.09G
/dev/sdd1 new_vg lvm2 a- 17.14G 17.14G
The following command displays only the physical volume name and size.
# pvs -o pv_name,pv_size
PV PSize
/dev/sdb1 17.14G
/dev/sdc1 17.14G
/dev/sdd1 17.14G
• You can append a field to the output with the plus sign (+), which is used in combination with
9. Customized Reporting for LVM
40