This article provides the steps for extending an existing LVM Volume Group (VG) and Logical Volume (LV) using a newly added virtual disk (VMDK) on a running Red Hat Enterprise Linux (RHEL) 8.x system.
VMware vSphere ESXi
Phase 1: Adding a New VMDK in vSphere
Log in to the vSphere Client.
Right-click the target Virtual Machine and select Edit Settings.
Click ADD NEW DEVICE and select Hard Disk.
Specify the required Capacity (e.g., 100 GB).
Ensure the Disk Provisioning (Thin/Thick) matches your environment's policy.
Click OK to save the settings
Phase 2: LVM Expansion on Guest OS (GOS) Level
lsblk
Note: If the disk is not visible, run:
for host in /sys/class/scsi_host/host*; do echo "- - -" > ${host}/scan; done
pvcreate /dev/sdb
* Replace /dev/sdb with the actual device name from lsblk
# Identify the VG name (e.g., "rhel" or "vg01")
vgs
# Extend the VG
vgextend [VG_Name] /dev/sdb
# Identify the LV path for /var
df -h /var
# Extend the LV and resize the filesystem simultaneously
lvextend -r -l +100%FREE [LV_Path]
* -r performs the filesystem resize (XFS/Ext4) automatically
* +100%FREE = Uses all unallocated space in the VG
df -h /var