Power off the virtual machine.
Edit the virtual machine settings and extend the virtual disk size. For more information, see Increasing the size of a virtual disk (1004047).
Power on the virtual machine.
Identify the device name, which is by default /dev/sda, and confirm the new size by running the command:
Run the command:
1.Press p to print the partition table to identify the number of partitions. By default, there are 2: sda1 and sda2.
2.Press n to create a new primary partition.
3.Press p for primary.
4.Press 3 for the partition number, depending on the output of the partition table print.
5.Press Enter Two times.
6.Press t to change the system’s partition ID.
7.Press 3 to select the newly creation partition.
8.Type 8e to change the Hex Code of the partition for Linux LVM.
9.Press w to write the changes to the partition table.
1.Run this command to verify that the changes were saved to the partition table and that the new partition has an 8e type:
2.Run this command to convert the new partition to a physical volume:
3.Determine which volume group to extend, use the command
4.Run this command to extend the Physical volume
vgextend SangomaVG /dev/sda3
vgextend centos /dev/sda3
5. Run the following command to extend the Logical Volume
lvextend -L +80000 /dev/centos/root
lvextend -L +20000 /dev/SangomaVG/root
Note +20000 = 20GB
6.Run the following command to expand the ext3 filesystem
Useful commands to check:
vgdisplay pvs vgs lvs pvscan