Follow the steps to increase or decrease the size of VM in Google Cloud :
- Goto https://console.cloud.google.com
- Goto Compute Engine tab, followed by VM Instances.
- Select the VM for which you want to increase/decrease the disk size.
- Under Boot disk, you will see one(or more) disks for the VM. Click on one for which you desire to update disk size.
- Click Edit in the top. Then, modify the Size. At last, click on save.
- Now, we just need to tell the OS to grow the partition to the total size. This can be done by executing following commands :
fdisk -l
growpart /dev/sda 1
resize2fs /dev/sda1