LVM Volume Group (vg)
commands related to managing Volume Groups (VGs) in LVM (Logical Volume Manager). Here's an overview of commands related to managing Volume Groups (vg
) in LVM:
Volume Groups (VGs) in LVM manage one or more physical volumes (PVs) and provide logical storage units for Logical Volumes (LVs).
Basic Commands
Creating a Volume Group:
Creates a new volume group named
vg_name
using physical volumes/dev/sdX
,/dev/sdY
, etc.Displaying Volume Group Information:
Displays information about all volume groups or a specific
vg_name
.Adding Physical Volumes to a Volume Group:
Adds
/dev/sdZ
to the existing volume groupvg_name
.Removing Physical Volumes from a Volume Group:
Removes
/dev/sdZ
from the volume groupvg_name
.Renaming a Volume Group:
Renames
old_vg_name
tonew_vg_name
.Removing a Volume Group:
Removes the volume group
vg_name
.Resizing a Volume Group:
Increases the size of the volume group
vg_name
by adding/dev/sdX
.
Advanced Commands
Moving Physical Extents (PEs):
Moves allocated physical extents from
/dev/sdX
to other physical volumes in the volume group.Changing Volume Group Attributes:
Activates (mounts) a volume group (
-a y
) or deactivates (-a n
) it.Listing Physical Volumes in a Volume Group:
Lists detailed information about physical volumes and their mappings to logical volumes.
Conclusion
The vg
commands in LVM (vgcreate
, vgdisplay
, vgextend
, etc.) are essential for managing volume groups and the logical storage they provide. They allow administrators to efficiently allocate and manage disk space, resize volumes, and ensure data integrity through advanced features like mirroring and striping. For more detailed information and options, refer to the respective manual pages (man vgcreate
, man vgdisplay
, etc.) or the LVM documentation.
Last updated