- Log in to the target system
- Identify the partition that will need to be extended
- Identify the associated volume group where the logical volume resides
- If there is enough free space in the Volgroup (noted by running vgdisplay on the appropriate VolGroup) skip down to lvextend.
- Open up VCenter and navigate to the appropriate VM
- Right click on the VM and select Edit Settings
- Click Add
- Select Hard Disk
- Ensure Create a new virtual disk is selected
- Click Next
- Configure the size that is requested
- Select thin Provision where possible
- If a specific location is required for this disk configure further, else keep the vmdk with the virtual machine (default)
- Click Next
- Click Next
- Click Finish
- Click OK
- SSH back in to system
- Type in fdisk -l (Shows you the current disks on the system, new disk is not in the list)
- pvs will also show you the current physical volumes and their associated volume groups
- Execute the following command to make sure the OS picks up the new device
# echo "- - -" > /sys/class/scsi_host/host0/scan
- Create the physical drive
# pvcreate /dev/<device_name>
- Execute the folling command to ensure the pysical drive is added to the appropriate volume group
# vgextend <VolGroup_NAME> /dev/<device_name>
- Execute vgdisplay, output shows the extra space available
- Extend the logical volume
# lvextend -L +<AMOUNTOF_STORAGE_TOADD>G /dev/mapper/<LOGICAL_VOLUME>
- In RHEL5 and above you can run the following command to complete the addition of the space to the logical drive
# resize2fs /dev/mapper/<LOGICAL_VOLUME>
- check filesystem with df -h to ensure that the new space if availble