Google Compute Engine Resize boot disk

783 views Asked by At

I just read in the google compute engine documentation that : <<Note: Compute Engine is working with respective operating system communities and vendors to eventually convert all operating systems to automatically resize root partitions. As such, we recommend you occasionally check back to make sure this step is still needed for your operating system and over time, this step will be removed completely for all operating systems.>>

Did that mean (as I'm using Ubuntu that support automatic resizing) my compute will resize it's hard drive automatically after a certain level of disk space using. Actually I'm using 31% of my capacity, did the resizing occurs a a x% percent of disk space occupying ?

1

There are 1 answers

0
Kamran On

No. It means if you create a VM instance with a root persistent disk with more disk space than the original image, using an operating system that supports automatic resizing of the root partition, then your virtual machine automatically resize the partition to recognize the additional space and you won't need to manually repartition the disk.

In order to create a VM instance with a root persistent disk with more disk space than the original image, you will need use the following commands:

  1. Create your root persistent disk:

    $ gcloud compute disks create DISK_NAME --image IMAGE --size 100GB --zone ZONE
    
  2. Then start a virtual machine instance using your root persistent disk:

    $ gcloud compute instances create INSTANCE_NAME --disk name=DISK_NAME boot=yes --zone ZONE