How to Resize Persistent Disk of VM in GCP?

Resize your Persistent Disk of VM || How to extend the volume in GCP:-


How to Resize Persistent Disk of VM in GCP?



1You can increase the size of your Persistent disk when your VM instances require additional storage space or higher performance limits.


2You can increase the size of P.D. but cannot reduce it.


3VM using public images automatically resize the boot disk. In all other cases, you need to manually resize the boot disk or non-boot disks.


4No need to stop the VM to resize.




Resize P.D. using Console:- 


— Login to GCP Console 

— Compute Engine 

— Create one VM with 10GB Size of Boot Volume 


— Now to modify this volume 

— Go to Disk

— Select disk

— Edit

— Modify Size = 40GB

— Save


Now Check on VM Details Page, it shows 40GB Storage.





Cloud-shell Commands:


$ gcloud compute disks resize disk-name --zone us-west4-b --size disk-size 


— Now to Resize in Linux VM


$ Take ssh

$ sudo su

$ df -Th

$ lsblk

$ parted /dev/sda

resizepart

1        (partition number)

End? [10.7GB]? 

100%

quit ——————————————— Now check again.

lsblk 





Windows-Server-2019 Desktop:-


— Login to GCP Console 

— Compute Engine 

— Create one Windows VM with 50GB Size 


— Now to modify this volume 

— Go to Disk

— Select disk

— Edit

— Modify Size = 100GB

— Save

— Take RDP

— Set Windows password 

— Connect to windows using RDP.

— Click on windows 

— Go to Disk Management 

— Action & Refresh 

— Right click on existing Volume

— Next 



 Now you can see 100 GB storage in windows. 




🙏 thanks





















Previous
Next Post »