Table of Contents

Expand Disk on VM

VMWare Instruction

Note: These steps only apply to EXT3 file systems.

Caution: VMware recommends to take a complete backup of the virtual machine prior to making these changes.

    # fdisk -l
    # fdisk /dev/sda (depending the results of the step 4)
    # fdisk -l

Note: The number for the sda can change depending on system setup. Use the sda number that was created in step 5.

    # pvcreate /dev/sda3
    # vgextend VolGroup /dev/sda3

Note: To determine which volume group to extend, use the command vgdisplay.

    # vgdisplay VolGroup | grep "Free"
    # lvextend -L+#G /dev/VolGroup00/LogVol00

Where # is the number of Free space in GB available as per the previous command. Use the full number output from Step 10 including any decimals.

Note: To determine which logical volume to extend, use the command lvdisplay.

    # lvextend -l +100%FREE /dev/VolGroup/lv_home
    # resize2fs /dev/VolGroup/lv_home

Notes:

    # df -h / 

From Emmanuel

Just powered down the Vm, increased the disk allocation from vcentre . Power the vm back up. Confirm the kernel is the seeing the increased disk on the existing sda disk .

Use fdisk to create a primary /dev/sda3 partition from the newly allotted space in sda . Use partprobe or reboot to allow the kernel to re-read the device mapping .

After reboot or partprobe , prepare the new device partition into physical logical volume to be added to the existing volume group . This is done with command : pvcreate /dev/sda3

I added the new physical volume to the existing volume group using : vgextend <volume group name> /dev/sda3

Then expand the logical volume in the volume group on which the /home is mounted. Used below command to allow the lv to use up any available free space within volume group

lvextend -l +100%FREE /dev/volume group / logical volume name

Then I brought the new disk size on home mount point online using

resize2fs /dev/volume group/logical volume name .