Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating existing disk size on google cloud

I have disk of space 10G in google cloud with name disk1.

Root persistent disk has already occupied around 4 to 5 GB and remaining 5 GB is occupied by other programs ,so it is almost full to 10GB .MY case is I can not add other disk ,i have to work on same disk.

I want to increase this disk size from 10 GB to 20 GB,In https://cloud.google.com/compute/docs/disks#repartitionrootpd i can not see way of increasing size of existing disk in my case increasing size of disk1 to 20GB Is it possible to update existing disk size ?

like image 459
abishkar bhattarai Avatar asked Nov 03 '14 13:11

abishkar bhattarai


1 Answers

Update disk size on the fly without restarts

  1. Increase disk size from Google console first
  2. SSH inside VM : sudo growpart /dev/sda 1
  3. Resize your file system : sudo resize2fs /dev/sda1
  4. Verify : df -h
like image 101
Harsh Manvar Avatar answered Sep 30 '22 17:09

Harsh Manvar