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

[root@link-08 ~]# pvcreate /dev/sda[12]
Physical volume "/dev/sda1" successfully created
Physical volume "/dev/sda2" successfully created
[root@link-08 ~]# pvscan
PV /dev/sdb1 VG vg lvm2 [67.83 GB / 67.10 GB free]
PV /dev/sdb2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdc1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdc2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdd1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdd2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sde1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sde2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdf1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdf2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdg1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdg2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdh1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdh2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sda1 lvm2 [603.94 GB]
PV /dev/sda2 lvm2 [603.94 GB]
Total: 16 [2.11 TB] / in use: 14 [949.65 GB] / in no VG: 2 [1.18 TB]
Next you extend the original volume group with the new physical volume.
[root@link-08 ~]# vgextend vg /dev/sda[12]
Volume group "vg" successfully extended
[root@link-08 ~]# pvscan
PV /dev/sdb1 VG vg lvm2 [67.83 GB / 67.10 GB free]
PV /dev/sdb2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdc1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdc2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdd1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdd2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sde1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sde2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdf1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdf2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdg1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdg2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdh1 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sdh2 VG vg lvm2 [67.83 GB / 67.83 GB free]
PV /dev/sda1 VG vg lvm2 [603.93 GB / 603.93 GB free]
PV /dev/sda2 VG vg lvm2 [603.93 GB / 603.93 GB free]
Total: 16 [2.11 TB] / in use: 16 [2.11 TB] / in no VG: 0 [0 ]
Convert the linear volume back to its original mirrored state.
[root@link-08 ~]# lvconvert -m 1 /dev/vg/groupfs /dev/sda1 /dev/sdb1 /dev/sdc1
Logical volume mirror converted.
You can use the lvs command to verify that the mirror is restored.
[root@link-08 ~]# lvs -a -o +devices
LV VG Attr LSize Origin Snap% Move Log Copy% Devices
groupfs vg mwi-a- 752.00M groupfs_mlog 68.62 groupfs_mimage_0(0),groupfs_mimage_1(0)
[groupfs_mimage_0] vg iwi-ao 752.00M /dev/sdb1(0)
[groupfs_mimage_1] vg iwi-ao 752.00M /dev/sda1(0)
[groupfs_mlog] vg lwi-ao 4.00M /dev/sdc1(0)
4. Recovering Physical Volume Metadata
62