Create a new Hyperdisk volume

You can use a Hyperdisk Balanced, Hyperdisk Extreme or Hyperdisk Throughput volume with yourCompute Engine instance by completing the following tasks:

  • Create a blank, non-boot, and zonal Hyperdisk volume and attachit to your instance either during or after instance creation.
  • Format and mount the volume to provide access to a data or file system.

For Hyperdisk Balanced volumes, you can also create boot disks as well as data disks.

For general information about Hyperdisk, seeAbout Hyperdisk.

To add a Hyperdisk Balanced High Availability disk to your instance, use the following procedures:

Before you begin

Required roles and permissions

To get the permissions that you need to add a Hyperdisk volume to your instance, 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 add a Hyperdisk volume to your instance. To see the exact permissions that are required, expand theRequired permissions section:

Required permissions

The following permissions are required to add a Hyperdisk volume to your instance:

  • To create and attach a Hyperdisk volume:
    • compute.disks.create on the project
    • compute.instances.attachDisk on the instance
    • compute.disks.use on the volume that you want to attach to the instance
  • To format and mount the attached volume: compute.instances.setMetadata on the instance

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

Supported values for Hyperdisk volumes

Size limits

The size you specify for a Hyperdisk volume must be within theranges listed in following table.

Hyperdisk typeMinimum sizeMaximum sizeDefault size
Hyperdisk Balanced4 GiB64 TiB100 GiB
Hyperdisk Balanced High Availability4 GiB64 TiB100 GiB
Hyperdisk Extreme64 GiB64 TiB1 TiB
Hyperdisk ML4 GiB64 TiB100 GiB
Hyperdisk Throughput2 TiB32 TiB2 TiB

However, the size of a Hyperdisk volume that's attached to a VMcan't exceed theHyperdisk limits for the VM.

Performance limits

The following table lists the limits for the performance that you can specify foreach Hyperdisk type. However, the IOPS and throughput levels youcan specify also depend on the volume's size. For a detailed summary of each limit,see theSize and performance limits section forHyperdisk Balanced,Hyperdisk Balanced High Availability,Hyperdisk Extreme,Hyperdisk ML, andHyperdisk Throughput.

Hyperdisk typeIOPS limitThroughput limit (MiB/s)
Hyperdisk Balanced160,0002,400
Hyperdisk Balanced High Availability100,0001,200
Hyperdisk Extreme350,000 You can't provision a throughput level forHyperdisk Extreme volumes. Each volume gets 250 MiB/s of throughputwith every 1,000 IOPS, up to 5,000 MiB/s.
Hyperdisk MLYou can't provision an IOPS level,but each MiB/s of provisioned throughput comes with 16 IOPS,up to 19,200,000 IOPS.1,200,000
Hyperdisk ThroughputYou can't provision an IOPSlevel, but each MiB/s of provisioned throughput comes with 4IOPS, up to 9,600 IOPS.2,400

Hyperdisk type variables

The following table lists the reference values of each Hyperdisktype. When creating a Hyperdisk volume with the Google Cloud CLI,REST, or the Cloud Client Libraries for Compute Engineindicate the Hyperdisk type to create by providing its correspondingvalue from the table.

Disk typeReference name
Hyperdisk Balancedhyperdisk-balanced
Hyperdisk Balanced High Availabilityhyperdisk-balanced-high-availability
Hyperdisk Extremehyperdisk-extreme
Hyperdisk Throughputhyperdisk-throughput
Hyperdisk MLhyperdisk-ml

Add a Hyperdisk volume to your instance

You can create and attach a Hyperdisk volume by using theGoogle Cloud console, Google Cloud CLI, or REST.

The size, throughput, and IOPS that you specify when creating a Hyperdiskvolume must be in the range ofsupported values.

When you create a Hyperdisk Balanced volume, you can optionally allow multiple instances toaccess the disk concurrently by creating the disk in multi-writer mode.

Console

  1. Go to theVM instances page.

    Go to VM instances

  2. Click the name of the instance where you want to add a disk.

  3. On theVM instance details page, clickEdit.

  4. Under the headingAdditional disks, clickAdd new disk.

  5. Specify a name for the disk, and optionally add a description. SelectBlank disk as theDisk source type.

  6. UnderDisk settings, choose a disk type from the following list. Thevalues that you specify must be in the range ofsupported values.

    1. Hyperdisk Balanced. You can also change the default diskSize,Provisioned IOPS, andProvisioned Throughput settings.
    2. Hyperdisk Extreme. You can also change the default diskSize andProvisioned IOPS settings.
    3. Hyperdisk ML. You can also change thedefault diskSize andProvisioned Throughput settings.
    4. Hyperdisk Throughput.You can also change thedefault diskSize andProvisioned Throughput settings.
  7. Optional: For Hyperdisk Balanced volumes, you can enable attaching the disk tomultiple instances by creating the disk in multi-writer mode. UnderAccess mode, selectMultiple VMs read write.

  8. ClickSave.

  9. To apply your changes to the instance, clickSave.

gcloud

  1. Use thegcloud compute disks create commandto create the Hyperdisk volume.

    gcloud compute disks createDISK_NAME \   --zone=ZONE \   --size=DISK_SIZE \   --type=DISK_TYPE \   --provisioned-iops=IOPS_LIMIT   --provisioned-throughput=THROUGHPUT_LIMIT   --access-mode=DISK_ACCESS_MODE

    Replace the following:

    • DISK_NAME: the name of the new disk.
    • ZONE: the name of zone where the new diskis being created.
    • DISK_SIZE: Optional: The size of the newdisk. The value must be a whole number followed by a size unit of GBfor gibibyte, or TB for tebibyte. If no size unit is specified,100  GB is used as the default value. The accepted values for thedisk size are:
      • Hyperdisk Balanced: From 4 GiB to 64 TiB, inclusive, in 1 GiBincrements.
      • Hyperdisk Extreme: From 64 GiB to 64 TiB, inclusive, in 1 GiBincrements.
      • Hyperdisk ML: From 4 GiB to 64 TiB, inclusive, in 1 GiBincrements.
      • Hyperdisk Throughput: From 2 TiB to 32 TiB, inclusive, in 1 GiBincrements.
    • DISK_TYPE: the type of disk. Use one of thefollowing values:hyperdisk-balanced,hyperdisk-extreme,hyperdisk-ml, orhyperdisk-throughput
    • IOPS_LIMIT: Optional: For Hyperdisk Balanced or Hyperdisk Extremedisks, this is the number of I/O operations per second (IOPS) that thedisk can handle.
    • THROUGHPUT_LIMIT: Optional: For Hyperdisk Balanced,Hyperdisk ML, or Hyperdisk Throughput volumes, this is an integer that represents themaximum throughput, measured in MiB per second, that the disk canprovide.
    • DISK_ACCESS_MODE: Optional: How computeinstances can access the data on the disk. Supported values are:

      • READ_WRITE_SINGLE, for read-write access from one instance.This is the default.
      • READ_WRITE_MANY, (Hyperdisk Balanced and Hyperdisk Balanced High Availability only) for concurrentread-write access from multiple instances.
      • READ_ONLY_MANY, (Hyperdisk ML only) for concurrent read-only accessfrom multiple instances.

      To set the access mode for Hyperdisk Balanced High Availability disks, seeCreate a regional disk.

  2. Optional: Use thegcloud compute disks describeDISK_NAME commandto see a description of your disk.

  3. After you create the disk, you canattach the disk to an instance.

REST

  1. Construct aPOST request to create a zonal Hyperdiskby using thedisks.insert method.Include thename,sizeGb,type,provisionedIops, andprovisionedThroughput properties. To create this disk as an empty andunformatted non-boot disk, don't specify a source image or a sourcesnapshot.

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/disks{   "name": "DISK_NAME",   "sizeGb": "DISK_SIZE",   "type": "https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/diskTypes/DISK_TYPE",   "provisionedIops": "IOPS_LIMIT",   "provisionedThroughput": "THROUGHPUT_LIMIT",   "accessMode": "DISK_ACCESS_MODE"}

    Replace the following:

    • PROJECT_ID: your project ID
    • ZONE: the zone where your instance and newdisk are located
    • DISK_NAME: the name of the new disk
    • DISK_SIZE: Optional: The size of the newdisk. The value must be a whole number followed by a size unit of GBfor gibibytes or TB for tebibytes.
    • DISK_TYPE: the type of disk. To create aHyperdisk volume, use one of the following values:hyperdisk-balanced,hyperdisk-extreme,hyperdisk-ml, orhyperdisk-throughput.
    • IOPS_LIMIT: Optional: ForHyperdisk Balanced and Hyperdisk Extreme, this is the number of I/Ooperations per second that the disk can handle.
    • THROUGHPUT_LIMIT: Optional: For Hyperdisk Balanced,Hyperdisk ML, or Hyperdisk Throughput volumes, this is an integer that represents themaximum throughput, measured in MiB per second, that the disk canprovide.
    • DISK_ACCESS_MODE: Optional: How computeinstances can access the data on the disk. Supported values are:

      • READ_WRITE_SINGLE, for read-write access from one instance. This is the default.
      • READ_WRITE_MANY, (Hyperdisk Balanced and Hyperdisk Balanced High Availability only) for concurrent read-write access from multiple instances.
      • READ_ONLY_MANY, (Hyperdisk ML only) for concurrent read-only access from multiple instances.

      To set the access mode for Hyperdisk Balanced High Availability disks, seeCreate a regional disk.

  2. Optional: Use thecompute.disks.get methodto see a description of your disk.

  3. After you create the disk, you canattach the diskto any running or stopped instance.

Go

// createHyperdisk creates a new Hyperdisk in the specified project and zone.funccreateHyperdisk(wio.Writer,projectId,zone,diskNamestring)error{//   projectID := "your_project_id"//   zone := "europe-central2-b"//   diskName := "your_disk_name"ctx:=context.Background()client,err:=compute.NewDisksRESTClient(ctx)iferr!=nil{returnfmt.Errorf("NewDisksRESTClient: %v",err)}deferclient.Close()// use format "zones/{zone}/diskTypes/(hyperdisk-balanced|hyperdisk-throughput)".diskType:=fmt.Sprintf("zones/%s/diskTypes/hyperdisk-balanced",zone)// Create the diskdisk:=&computepb.Disk{Name:proto.String(diskName),Type:proto.String(diskType),SizeGb:proto.Int64(10),Zone:proto.String(zone),}req:=&computepb.InsertDiskRequest{Project:projectId,Zone:zone,DiskResource:disk,}op,err:=client.Insert(ctx,req)iferr!=nil{returnfmt.Errorf("Insert disk request failed: %v",err)}// Wait for the insert disk operation to completeiferr=op.Wait(ctx);err!=nil{returnfmt.Errorf("unable to wait for the operation: %w",err)}fmt.Fprintf(w,"Hyperdisk created: %v\n",diskName)returnnil}

Java

importcom.google.cloud.compute.v1.Disk;importcom.google.cloud.compute.v1.DisksClient;importcom.google.cloud.compute.v1.InsertDiskRequest;importcom.google.cloud.compute.v1.Operation;importjava.io.IOException;importjava.util.concurrent.ExecutionException;importjava.util.concurrent.TimeUnit;importjava.util.concurrent.TimeoutException;publicclassCreateHyperdisk{publicstaticvoidmain(String[]args)throwsIOException,ExecutionException,InterruptedException,TimeoutException{// TODO(developer): Replace these variables before running the sample.// Project ID or project number of the Google Cloud project you want to use.StringprojectId="YOUR_PROJECT_ID";// Name of the zone in which you want to create the disk.Stringzone="europe-central2-b";// Name of the disk you want to create.StringdiskName="YOUR_DISK_NAME";// The type of disk you want to create. This value uses the following format:// "zones/{zone}/diskTypes/(hyperdisk-balanced|hyperdisk-extreme|hyperdisk-throughput)".// For example: "zones/us-west3-b/diskTypes/hyperdisk-balanced"StringdiskType=String.format("zones/%s/diskTypes/hyperdisk-balanced",zone);// Size of the new disk in gigabytes.longdiskSizeGb=10;// Optional: For Hyperdisk Balanced or Hyperdisk Extreme disks,// this is the number of I/O operations per second (IOPS) that the disk can handlelongprovisionedIops=3000;// Optional: For Hyperdisk Balanced or Hyperdisk Throughput volumes,// this is an integer that represents the throughput,// measured in MiB per second, that the disk can handle.longprovisionedThroughput=140;createHyperdisk(projectId,zone,diskName,diskType,diskSizeGb,provisionedIops,provisionedThroughput);}// Creates a hyperdisk in a projectpublicstaticDiskcreateHyperdisk(StringprojectId,Stringzone,StringdiskName,StringdiskType,longdiskSizeGb,longprovisionedIops,longprovisionedThroughput)throwsIOException,ExecutionException,InterruptedException,TimeoutException{// Initialize client that will be used to send requests. This client only needs to be created// once, and can be reused for multiple requests.try(DisksClientclient=DisksClient.create()){// Create a disk.Diskdisk=Disk.newBuilder().setZone(zone).setName(diskName).setType(diskType).setSizeGb(diskSizeGb).setProvisionedIops(provisionedIops).setProvisionedThroughput(provisionedThroughput).build();InsertDiskRequestrequest=InsertDiskRequest.newBuilder().setProject(projectId).setZone(zone).setDiskResource(disk).build();// Wait for the insert disk operation to complete.Operationoperation=client.insertAsync(request).get(1,TimeUnit.MINUTES);if(operation.hasError()){System.out.println("Disk creation failed!");thrownewError(operation.getError().toString());}// Wait for server updateTimeUnit.SECONDS.sleep(10);Diskhyperdisk=client.get(projectId,zone,diskName);System.out.printf("Hyperdisk '%s' has been created successfully",hyperdisk.getName());returnhyperdisk;}}}

Node.js

// Import the Compute libraryconstcomputeLib=require('@google-cloud/compute');constcompute=computeLib.protos.google.cloud.compute.v1;// Instantiate a diskClientconstdisksClient=newcomputeLib.DisksClient();// Instantiate a zoneOperationsClientconstzoneOperationsClient=newcomputeLib.ZoneOperationsClient();/** * TODO(developer): Update/uncomment these variables before running the sample. */// Project ID or project number of the Google Cloud project you want to use.constprojectId=awaitdisksClient.getProjectId();// The zone where your VM and new disk are located.// zone = 'europe-central2-b';// The name of the new disk// diskName = 'disk-name';// The type of disk. This value uses the following format:// "zones/{zone}/diskTypes/(hyperdisk-balanced|hyperdisk-extreme|hyperdisk-ml|hyperdisk-throughput)".// For example: "zones/us-west3-b/diskTypes/hyperdisk-balanced"constdiskType=`zones/${zone}/diskTypes/hyperdisk-balanced`;// Size of the new disk in gigabytes.constdiskSizeGb=10;// Optional: For Hyperdisk Balanced or Hyperdisk Extreme disks,// this is the number of I/O operations per second (IOPS) that the disk can handle.constprovisionedIops=3000;// Optional: For Hyperdisk Balanced or Hyperdisk Throughput volumes,// this is an integer that represents the throughput,// measured in MiB per second, that the disk can handle.constprovisionedThroughput=140;asyncfunctioncallCreateComputeHyperdisk(){// Create a diskconstdisk=newcompute.Disk({sizeGb:diskSizeGb,name:diskName,zone,type:diskType,provisionedIops,provisionedThroughput,});const[response]=awaitdisksClient.insert({project:projectId,zone,diskResource:disk,});letoperation=response.latestResponse;// Wait for the create disk operation to complete.while(operation.status!=='DONE'){[operation]=awaitzoneOperationsClient.wait({operation:operation.name,project:projectId,zone:operation.zone.split('/').pop(),});}console.log(`Disk:${diskName} created.`);}awaitcallCreateComputeHyperdisk();

After you create the disk, you canattach the diskto any running or stopped instance.

Format and mount the disk

After you create andattach the new disk to an instance, youmust format and mount the disk, so that the operating system can use theavailable storage space.

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.