LinuxCommandLibrary

vgextend

Add physical volumes to a volume group

SYNOPSIS

vgextend VolumeGroupName PhysicalVolumePath [PhysicalVolumePath...]

PARAMETERS

VolumeGroupName
    The name of the volume group to extend.

PhysicalVolumePath
    The path to the physical volume(s) to add to the volume group. Multiple physical volumes can be specified.

DESCRIPTION

The vgextend command in Linux is used to add physical volumes (PVs) to an existing volume group (VG), thereby increasing the overall capacity of the VG. This allows you to expand the storage space available to logical volumes (LVs) within that volume group. When adding a PV to a VG, the space on that PV becomes available for creating or extending LVs. This is a fundamental command in managing logical volumes, allowing for flexible and dynamic storage allocation.

vgextend is a critical part of the Logical Volume Manager (LVM) suite, offering a way to non-destructively grow storage capacity without needing to repartition or move existing data. The added PVs can be entirely new disks or partitions on existing disks. Once added, the new space is available for allocation to LVs, allowing you to resize filesystems as needed.

CAVEATS

The Physical Volume must be initialized using pvcreate before being added to a Volume Group. Ensure the Volume Group has enough free Physical Extents (PEs) to accommodate the Physical Volume being added.

EXAMPLE

To add the physical volume /dev/sdb1 to the volume group myvg: vgextend myvg /dev/sdb1

HISTORY

LVM has been part of Linux for a long time and is a very flexible solution for managing disks. vgextend is an integral part of that functionality, developed along with the other core LVM commands to provide robust and dynamic storage management capabilities. Its usage has steadily increased as LVM has become the standard for enterprise-grade storage management on Linux.

SEE ALSO

Copied to clipboard