Search code examples
google-cloud-platformgoogle-compute-enginewindows-server-2016

google compute engine disk auto resizing, without reboot


Windows Server is running as GCE VM. I wonder if there is a way to automatically expand disk without rebooting.

For example, if the total capacity of the disk is 250 GB, when the disk is used about 230 GB, it automatically becomes 300 GB and I want to operate the service without rebooting without interruption.

Is there a way?


Solution

  • You can increase disk size without rebooting, you can find the command here.
    Basically, it's gcloud compute disks resize <DISK_NAME> --size <SIZE_IN_GB>

    However, this does not increase partition size automatically. If it's boot partition you want to increase, you may have to reboot your machine.

    Alternatively, you can take a snapshot and create a new, bigger disk that can be attached to your VM or used as a boot disk for a new VM.