Create and manage regional disks

Hyperdisk Balanced High Availability and regional Persistent Disk are storage options that let youimplement high availability (HA) services in Compute Engine. RegionalPersistent Disk and Hyperdisk Balanced High Availability synchronously replicate data between two zones in thesame region and ensure HA for disk data for up to one zonal failure. The regional disk can be a boot disk ora non-boot disk.

You can also allow differentinstances to concurrently access a Hyperdisk Balanced High Availability disk by setting the disk accessmode. Regional disks can only be attached to instances in the same zones as thedisk's replicas. For more information, seeShare a disk between instances.

This document explains how to do the following tasks for regional disks:

Before you begin

Required roles and permissions

To get the permissions that you need to create a regional disk, ask your administrator to grant you the following IAM roles on the project:

For more information about granting roles, seeManage access to projects, folders, and organizations.

These predefined roles contain the permissions required to create a regional disk. To see the exact permissions that are required, expand theRequired permissions section:

Required permissions

The following permissions are required to create a regional disk:

  • compute.disks.create
  • compute.instances.attachDisk
  • compute.disks.use
  • Create a snapshot of a disk: compute.disks.createSnapshot
  • View the details for a disk: compute.disks.get
  • Get a list of disks: compute.disks.list
  • Change the size of a disk: compute.disks.update

You might also be able to get these permissions withcustom roles or otherpredefined roles.

Limitations

  • You can attach regional Persistent Disk only to VMs that useE2,N1,N2, andN2D machine types.
  • You can attach Hyperdisk Balanced High Availability only tosupported machine types.
  • You can't create a regional Persistent Disk from anOS image, or from a disk that was created from an OS image.
  • You can't create a Hyperdisk Balanced High Availability disk by cloning a zonal disk. To create a Hyperdisk Balanced High Availability disk from an zonal disk, complete the steps inChange a zonal disk to a Hyperdisk Balanced High Availability disk.
  • When using read-only mode, you can attach a regional balanced Persistent Disk to a maximum of 10 VM instances.
  • The minimum size of a regional standard Persistent Disk is 200 GiB.
  • You can only increase the size of a regional Persistent Disk or Hyperdisk Balanced High Availability volume; you can't decrease its size.
  • Regional Persistent Disk and Hyperdisk Balanced High Availability volumes have different performance characteristics than their corresponding zonal disks. For more information, seeAbout Persistent Disk performance andHyperdisk Balanced High Availability performance limits.
  • You can't use a Hyperdisk Balanced High Availability volume that's in multi-writer mode as a boot disk.
  • If you create a replicated disk by cloning a zonal disk, then the two zonal replicas aren't fully in sync at the time of creation. After creation, you can use the regional disk clone within 3 minutes, on average. However, you might need to wait for tens of minutes before the disk reaches a fully replicated state and the recovery point objective (RPO) is close to zero. Learn how to check if your replicated disk is fully replicated.

About using a regional disk as a boot disk for an instance

You can attach aregional Persistent Disk or Hyperdisk Balanced High Availability disk as a boot disk forstateful workloads that are provisioned ahead of time, before you provision aproduction workload. Regional boot disks are not intended for hot standbys,because the regional boot disks cannot be attached simultaneously to twocompute instances.

You can only create regional Persistent Disk or Hyperdisk Balanced High Availability volumes from snapshots;it isn't possible to create a regional disk from anOS image.

To use a regional disk as the boot disk for an instance, use either of thefollowing methods:

  1. Create a new instance with a regional boot disk.
  2. Create a regional boot disk, and then attach it to an instance:
    1. Create a regional diskfrom a snapshot of a boot disk.
    2. Attach a regional boot disk to an instance.

If you need to failover a regional boot disk to a running standby instance inthe replica zone, then use the steps described inAttach a regional boot disk to an instance.

Create a regional disk

Create aregional Persistent Disk or Hyperdisk Balanced High Availability volume. The diskmust be in the same region as the compute instance that you plan to attach itto.

If you create a Hyperdisk Balanced High Availability volume, you can also allow different instancesto concurrently access the disk by setting the disk access mode. Formore information, seeShare a disk between instances.

For regional Persistent Disk, if you create a disk in the Google Cloud console,the defaultdisk typeispd-balanced. If you create a disk using the gcloud CLI orREST, the default disk type ispd-standard.

Console

  1. In the Google Cloud console, go to theDisks page.

    Go to Disks

  2. Select the required project.

  3. ClickCreate disk.

  4. Specify aName for your disk.

  5. For theLocation, chooseRegional.

  6. Select theRegion andZone. You must select the same regionwhen you create your instance.

  7. Select theReplica zone in the same region.Make a note of the zones that you selectbecause you must attach the disk to your instance in one of those zones.

  8. Select theDisk source type.

  9. UnderDisk settings, choose aDisk type andSize. You canalso change the defaultProvisioned IOPS, andProvisioned Throughput settings.

  10. Optional: For Hyperdisk Balanced High Availability volumes, you can enable attaching the disk tomultiple instances by creating the disk in multi-writer mode.InAccess mode, selectMultiple VMs read write.

  11. ClickCreate to finish creating your disk.

gcloud

Create a regional disk by using thecompute disks create command.

If you need a regional SSD Persistent Disk for additionalthroughput or IOPS, include the--type flag and specifypd-ssd.

gcloud compute disks createDISK_NAME \   --size=DISK_SIZE \   --type=DISK_TYPE \   --region=REGION \   --replica-zones=ZONE1,ZONE2   --access-mode=DISK_ACCESS_MODE

Replace the following:

  • DISK_NAME: the name of the new disk
  • DISK_SIZE: the size, in GiB, of the new disk
  • DISK_TYPE:For regionalPersistent Disk, this is thetype ofthe regional disk. The default value ispd-standard. For Hyperdisk, specify the valuehyperdisk-balanced-high-availability.
  • REGION: the region for the regional diskto reside in, for example:europe-west1
  • ZONE1,ZONE2: thezones within the region where the two disk replicas are located,for example:europe-west1-b,europe-west1-c
  • DISK_ACCESS_MODE: Optional:specifies how instances can access the data on a Hyperdisk Balanced High Availability disk. Thefollowing values are supported:

    • READ_WRITE_SINGLE, for read-write access from one instance. Thisis the default.
    • READ_WRITE_MANY, for read-write access from multiple instances.

    You can set the access mode only for Hyperdisk Balanced High Availability disks.

Terraform

To create aregional Persistent Disk or Hyperdisk Balanced High Availability volume, you can use thegoogle_compute_region_disk resource.

resource "google_compute_region_disk" "regiondisk" {  name                      = "region-disk-name"  snapshot                  = google_compute_snapshot.snapdisk.id  type                      = "pd-ssd"  region                    = "us-central1"  physical_block_size_bytes = 4096  size                      = 11  replica_zones = ["us-central1-a", "us-central1-f"]}

REST

To create aregional Persistent Disk or Hyperdisk Balanced High Availability volume,construct aPOST request to thecompute.regionDisks.insert method.

To create a blank disk, don't specify a snapshot source.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/disks{  "name": "DISK_NAME",  "region": "projects/PROJECT_ID/regions/REGION",  "replicaZones": [    "projects/PROJECT_ID/zones/ZONE1",    "projects/PROJECT_ID/zones/ZONE2"  ],  "sizeGb": "DISK_SIZE",  "type": "projects/PROJECT_ID/regions/REGION/diskTypes/DISK_TYPE",  "accessMode": "DISK_ACCESS_MODE"}

Replace the following:

  • PROJECT_ID: your project ID
  • REGION: the region for the regional diskto reside in, for example:europe-west1
  • DISK_NAME: the name of the new disk
  • ZONE1,ZONE2: thezones where replicas of the new disk should be located
  • DISK_SIZE: the size, in GiB, of the new disk
  • DISK_TYPE:For regionalPersistent Disk, this is thetype ofPersistent Disk. For Hyperdisk, specifythe valuehyperdisk-balanced-high-availability.
  • DISK_ACCESS_MODE: Optional: specifies howinstances can access the data on the Hyperdisk Balanced High Availability disk. The following valuesare supported:

    • READ_WRITE_SINGLE, for read-write access from one instance. Thisis the default.
    • READ_WRITE_MANY, for read-write access from multiple instances.

    You can set the access mode only for Hyperdisk Balanced High Availability disks.

Attach a regional disk to your instance

For disks that are not boot disks, after you create aregional Persistent Disk or Hyperdisk Balanced High Availability volume, you can attach itto an instance. The instance must be in the same region as the disk.

To attach a regional boot disk to an instance, seeAttach a regional boot disk to an instance.

To attach a Hyperdisk Balanced High Availability disk to multiple instances, repeat the procedure in thissection for each instance. You can attach Hyperdisk Balanced High Availability disks only in read-writemode.

Console

  1. To attach a disk to an instance, go to theVM instances page.

    Go to VM instances

  2. In theName column, click the name of the instance.

  3. ClickEdit.

  4. Click+Attach existing disk.

  5. Choose the previously created regional disk to add to your instance.

  6. If you see a warning that indicates the selected disk is already attachedto another instance, select theForce-attach disk box toforce-attach the disk to the instance that you are editing.

    Review the use cases for force-attaching regional disks atRegional disk failover.

  7. Optional: If attaching a Hyperdisk Balanced High Availability disk to multiple instances, forDisk attachment mode, selectRead/write.

  8. ClickSave.

  9. On theEdit VM page, clickSave.

gcloud

To attach a regional disk to a running or stopped instance, use thecompute instances attach-disk commandwith the--disk-scope flag set toregional.

If attaching a Hyperdisk Balanced High Availability disk in multi-writer mode to multiple instances,the only supported attachment mode isrw, which is is the defaultaccess mode. You don't need to include the--mode flag.

gcloud compute instances attach-diskINSTANCE_NAME \    --disk=DISK_NAME \    --disk-scope=regional \    --device-name=DEVICE_NAME

Replace the following:

  • INSTANCE_NAME: the name of the instanceto which you're adding the regional disk
  • DISK_NAME: the name of the new disk thatyou're attaching to the instance
  • DEVICE_NAME: Optional: a name that the guest OS usesto create asymlink, which helpsidentify the disk at the OS level.

Terraform

To attach aregional Persistent Disk or Hyperdisk Balanced High Availability volume to an instance,you can use thegoogle_compute_attached_disk resource.

resource "google_compute_instance" "test_node" {  name         = "test-node"  machine_type = "f1-micro"  zone         = "us-west1-a"  boot_disk {    initialize_params {      image = "debian-cloud/debian-11"    }  }  attached_disk {    source      = google_compute_disk.default.id    device_name = google_compute_disk.default.name  }  network_interface {    network = "default"    access_config {      # Ephemeral IP    }  }  # Ignore changes for persistent disk attachments  lifecycle {    ignore_changes = [attached_disk]  }}

REST

To attach a regional disk to a running or stopped instance,construct aPOST request to thecompute.instances.attachDisk methodand include the URL to the regional disk that you created.

If attaching a Hyperdisk Balanced High Availability disk in multi-writer mode to multiple instances,the only supported attachment mode isREAD-WRITE, which is is the defaultaccess mode. You don't need to include themode property.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/attachDisk{  "source": "/projects/PROJECT_ID/regions/REGION/disks/DISK_NAME",  "deviceName":DEVICE_NAME}

Replace the following:

  • PROJECT_ID: your project ID
  • ZONE: the location of your instance
  • INSTANCE_NAME: the name of the instanceto which you're adding the new regional disk
  • REGION: the region where the regional diskis located
  • DISK_NAME: the name of the regional disk (asas shown in the Google Cloud console).
  • DEVICE_NAME: Optional: a name that the guest OS usesto create asymlink, which helpsidentify the disk at the OS level.

For non-boot disks, after you create and attach a blank regional disk to ainstance, you mustformat and mount the disk,so that the operating system can use the available storage space.

Change a zonal disk to a regional disk

To convert an existing zonal Persistent Disk to a Regional Persistent Disk,create a new disk by cloning an existing zonal disk. For more information, seeCreating a regional disk clone from a zonal disk.

To convert a Hyperdisk to a regional disk, createa new Hyperdisk Balanced High Availability disk from a snapshot of the existing disk, as described inChange a zonal disk to a Hyperdisk Balanced High Availability disk.

Create a new instance with a regional boot disk

When setting up a highly available compute instance, you can create theprimary instance with a regional boot disk. If a zonal outage occurs, this letsyou restart the instance in the secondary zone instead of creating a newinstance.

In a high availability setup, if the boot device is a regional disk,Google recommends that you don't pre-create and start the standby instance.Instead, at the failover stage, attach the existing regional disk when youcreate the standby instance by using theforceAttach option.

Important: You can't use a disk that's in multi-writer mode as a boot disk.

If you want to change an existing zonal disk to a regional disk,seeChange a zonal disk to a regional diskinstead. Otherwise, to create an instance with a boot disk that is a regionaldisk, use one of the following methods:

Console

  1. In the Google Cloud console, go to theCreate an instance page.

    Go to Create an instance

    If prompted, select your project and clickContinue.

    TheCreate an instance page appears and displays theMachine configuration pane.

  2. In theMachine configuration pane, do the following:

    1. In theName field, specify a name for your instance. For moreinformation, seeResource naming convention.
    2. Optional: In theZone field, select a zone for this instance.

      The default selection isAny. If you don't change this defaultselection, then Google automatically chooses a zone for you based onmachine type and availability.

    3. Select a machine family for your instance from one of the followingoptions:

      • General purpose
      • Compute optimized
      • Memory optimized
      • Storage optimized
      • GPUs

      The Google Cloud console then displays the machine series that areavailable for your selected machine family.

    4. In theSeries column, select the machine series for your instance.

      If you selectedGPUs as the machine family in the previous step,then select theGPU type that you want. The machine series isthen automatically selected for the selected GPU type.

    5. In theMachine type section, select the machine type for yourinstance.

  3. In the navigation menu, clickOS and storage. In theOperating system and storage pane that appears, complete thefollowing steps.

    To learn more about the parameters that you can configure while addingnew disks, seeAbout Persistent Disk andAbout Google Cloud Hyperdisk.

    1. To start configuring your boot disk, clickChange. TheBoot disk paneappears and displays thePublic images tab.
    2. Configure the data source for the boot disk in one of the following ways:

      Note: Unless you explicitly choose a different boot disk, if the nameof the new instance matches the name of an existing disk,then the existing disk automatically attaches to the newinstance as the boot disk.
      • To choose a standard snapshot as the data source for your boot disk,clickSnapshots and then, in theSnapshots tab that appears,specify the following:

        1. In theSnapshot list, select the snapshot.
        2. In theBoot disk type list, select the type of the boot disk.
        3. In theSize (GB) field, specify the size of the boot disk.
      • To choose an archive snapshot as the data source for your boot disk,clickArchive snapshots and then, in theArchive snapshots tabthat appears, specify the following:

        1. In theArchive snapshot list, select the archive snapshot.
        2. In theBoot disk type list, select the type of the boot disk.
        3. In theSize (GB) field, specify the size of the boot disk.
      • To choose an existing disk as your boot disk, clickExisting disks. Then, in theExisting disks tab thatappears, select an existing regional Persistent Disk or Hyperdisk Balanced High Availability volumein theDisk list.

    3. Optional: For advanced configuration options, expand theShow advanced configurations section.

    4. To confirm your boot disk options and return to theOperating system and storage pane, clickSelect.

    5. Optional: To learn how to attach non-boot disks to your instance,seeCreate an instance with additional non-boot disks.

  4. If you did not choose an existing boot disk, configure it to be a regionaldisk by doing the following:

    1. In the navigation menu, clickData protection. In theData protection pane that appears, do the following:

      Caution: The data backup and replication settings that you specify whilecreating an instance using the Google Cloud console are applied only whenyour selected instance and disk configurations support those options. Youmust verify that your configuration for the instance and each disk meets therequirements for each data protection option that you specify. For moreinformation, see therequirements for regional disks andData protection options.
      1. To configure all new disks for the instance to usesynchronous disk replication(regional Persistent Disk or Hyperdisk Balanced High Availability), select theRegional diskscheckbox.

      2. (No action required by default.) Clear theExclude boot diskscheckbox.

  5. Optional: Specify other configuration options. For more information, seeConfiguration options during instance creation.

  6. To create and start the instance, clickCreate.

gcloud

Use thegcloud compute instances create commandto create an instance, and the--create-disk flag to specify the regionaldisk.

gcloud compute instances createPRIMARY_INSTANCE_NAME  \ --zone=ZONE  \ --create-disk=^:^name=REGIONAL_DISK_NAME:boot=true:type=DISK_TYPE:source-snapshot=SNAPSHOT_NAME:replica-zones=ZONE,REMOTE_ZONE

When specifying the disk parameters, the characters^:^ specifythat the separation character between parameters is a colon (:). Thislets you use a comma (,) when specifying the replica-zones parameter.

Replace the following:

  • PRIMARY_INSTANCE_NAME: a name for the instance
  • ZONE: the name of the zone where you want to create theinstance
  • REGIONAL_DISK_NAME: a name for the regional disk
  • DISK_TYPE: the type of disk to create, for example,hyperdisk-balanced-high-availability. If using aPersistent Disk, then you must also specifyscope=regional within the--create-disk flag to create a Regional Persistent Disk.
  • SNAPSHOT_NAME: the name of the snapshot you created forthe boot disk
  • REMOTE_ZONE: the alternate zone for the regional disk

REST

Create aPOST request to theinstances.insert methodand specify the propertiesboot: 'true' andreplicaZones. For example:

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances{ "name": "INSTANCE_NAME", "disks": [{    "boot": true,    "initializeParams": {       "sourceSnapshot": "global/snapshots/BOOT_SNAPSHOT_NAME",       "replicaZones": [           "projects/PROJECT_ID/zones/ZONE",           "projects/PROJECT_ID/zones/REMOTE_ZONE"       ],       "diskType": "projects/PROJECT_ID/zones/ZONE/diskTypes/DISK_TYPE"    }  }], "networkInterfaces": [    {      "network": "global/networks/default"    }  ]}

Replace the following:

  • PROJECT_ID: your project ID
  • ZONE: the name of the zone where you want tocreate the instance
  • INSTANCE_NAME: a name for the instance
  • BOOT_SNAPSHOT_NAME: the name of the boot disksnapshot
  • REMOTE_ZONE: the remote zone for the regionaldisk
  • DISK_TYPE: the type of disk to create, forexample,hyperdisk-balanced-high-availability orpd-balanced

Create a new instance with additional regional disks

When creating an instance, you can optionally includeregional Persistent Disk orHyperdisk Balanced High Availability volumes as additional disks.

To create and attach aregional Persistent Disk orHyperdisk Balanced High Availability volume to an instance during instance creation, see either of thefollowing:

Attach a regional boot disk to an instance

Use the following steps to:

  • Replace the boot disk of an existing instance with a regional boot disk.
  • Failover a regional boot disk to a hot standby instance that is running in thebackup zone. You do this by attaching the regional disk to the instance as theboot disk.

These steps assume that the regional disk and instance already exist.

gcloud

  1. Stop the instance.
    gcloud compute instances stopINSTANCE_NAME  --zone=ZONE
  2. Detach the current boot disk from the instance.
    gcloud compute instances detach-diskINSTANCE_NAME \ --zone=ZONE --disk=CURRENT_BOOT_DEVICE_NAME
  3. Attach the regional boot disk to the instance.
    gcloud compute instances attach-diskINSTANCE_NAME  \ --zone=ZONE  \ --disk=REGIONAL_DISK_NAME  \ --disk-scope=regional --force-attach \ --boot
  4. Restart the instance.

    gcloud compute instances startINSTANCE_NAME

    Note: If the instance you want to start uses customer-supplied encryptionkeys, you must provide those keys when trying to start the instance. Formore information, seeStart an instance that has encrypted disks.

Replace the variables in the previous commands with the following:

  • INSTANCE_NAME: the name of the instance to whichyou want to attach the regional boot disk
  • ZONE: the zone in which the instance is located
  • CURRENT_BOOT_DEVICE_NAME: the name of the bootdisk being used by the instance. This is usually the same as the name ofthe instance.
  • REGIONAL_DISK_NAME: the name of the regionaldisk that you want to attach to the instance as a boot disk

Optional: If you can't successfully detach the regional boot diskfrom the primary instance due to an outage or failure, include theflag--force-attach.

REST

  1. Stop the instance.

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/stop
  2. Detach the current boot disk from the instance.

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/detachDisk?deviceName=CURRENT_BOOT_DEVICE_NAME
  3. Attach the regional boot disk to the instance.

    Construct aPOST request to thecompute.instances.attachDisk method,and include the URL to the regional boot disk:

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/attachDisk{"source": "compute/v1/projects/PROJECT_ID/regions/REGION/disks/REGIONAL_DISK_NAME","boot": true}
  4. Restart the instance.

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/start
    Note: If the instance you want to start uses customer-supplied encryptionkeys, you must provide those keys when trying to start the instance. Formore information, seeStart an instance that has encrypted disks.

Replace the variables in the previous commands with the following:

  • PROJECT_ID: your project ID
  • INSTANCE_NAME: the name of the instance to whichyou want to attach the regional disk
  • ZONE: the zone in which the instance is located
  • CURRENT_BOOT_DEVICE_NAME: the name of the bootdisk being used by the instance. This is usually the same as the nameof the instance.
  • REGION: the region in which the regionaldisk is located
  • REGIONAL_DISK_NAME: the name of the regionaldisk that you want to attach to the instance as a boot disk

Optional: If you can't successfully detach the regional boot diskfrom the instance that it was originally attached to because of an outage orfailure, include"forceAttach": true in the request body.

List and describe your regional disks

You can view a list of all your configured regional disks, andinformation about their properties, including the following:

  • Disk ID
  • Disk name
  • Size
  • Disk type
  • Region
  • Zonal replicas

To view detailed information about your regional disks, usethe following:

Resize a regional disk

If instances with regional disks require additional storagespace, you can resize the disks. You can resize disks atany time, regardless of whether the disk is attached to a running instance. Ifyou need to separate your data into unique volumes,create multiple secondary disks for the instance. ForHyperdisk Balanced High Availability you can also increase the IOPS and throughput limits for the disk.

The command for resizing a regional disk is very similar to that forresizing a zonal disk. However, you must specify a region instead ofa zone for the disk location.

You can only increase, and not decrease, the size of a disk. To decrease thedisk size, you must create a new disk with a smaller size. Until you delete theoriginal, larger disk, you are charged for both disks.

For instructions on how to modify a regional disk, see the following:

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-02 UTC.