Step 1: Increase the Disk Size in VMware
- Power off the VM:
- Ensure the virtual machine is powered off.
- Increase the virtual disk size:
- Open VMware Workstation or VMware Player.
- Right-click on your virtual machine and select Settings.
- Select the Hard Disk (SCSI or IDE) you want to expand.
- Click on the Utilities button and select Expand.
- Enter the new maximum disk size and click Expand.
Step 2: Resize the Physical Volume
- Resize the Physical Volume:
sudo pvresize /dev/sda3
Step 3: Extend the Logical Volume
- Extend the Logical Volume:
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
Step 4: Resize the Filesystem
- Resize the Filesystem:
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv
Verify the Changes
- Check the Disk Space:
df -h
These steps should help you resize the partition and extend the logical volume using command-line tools on an Ubuntu Server.