Resize ubuntu vm disk

  

in here i have 32gb disk and i have expanded another 30gb so i need to extend the disk



✅ Step-by-Step to Expand Disk to Use Full 62 GB

1. 📦 Resize Partition sda3

Use growpart:

bash

sudo apt install cloud-guest-utils sudo growpart /dev/sda 3

Then check:

bash

lsblk

/dev/sda3 should now show ~60GB.


2. 🧱 Resize the Physical Volume

bash

sudo pvresize /dev/sda3

Check:

bash

sudo pvs

3. 📈 Expand the Logical Volume and Filesystem

bash

sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv sudo resize2fs /dev/ubuntu-vg/ubuntu-lv

✅ Confirm

bash

df -h

Now / should show nearly the full ~60 GB usable.

දිරියක් වෙන්න අදහස් පෙළක් දාන්න

Post a Comment (0)
Previous Post Next Post