You cannot change a disk type from Persistent Disk to Google Cloud Hyperdisk. You can use snapshots to migrate your existing disks to a Hyperdisk volume.
Migrating existing disks to a Hyperdisk volume
To migrate an existing disk to Hyperdisk, you create a snapshot of your disk, and then restore the snapshot to a newly created Hyperdisk volume.
Console
-
Prepare for creating a persistent disk or Hyperdisk snapshot:
- Review Best practices for Compute Engine disk snapshots to prepare your disk for snapshotting.
- Read Creating a persistent disk snapshot schedule to learn about creating a snapshot schedule and attaching it to your disks. Backing up your disks regularly with scheduled snapshots can reduce the risk of unexpected data loss.
-
Create a snapshot of your existing disk.
Go to the Disks page.
Go to Disks- Click Create Disk.
- Under Disk Type, select Hyperdisk Extreme or Hyperdisk Throughput.
- Under Source type, select Snapshot, then select the name of the snapshot to restore.
- Select the Size of the new disk, in GiB. This number must be equal to or larger than the original source disk for the snapshot.
Change the defaults, depending on the disk type you are migrating to:
- Hyperdisk Extreme: Change the Provisioned IOPS value.
- Hyperdisk Throughput: Change the Provisioned Throughput value.
- Click Create to create the Hyperdisk volume.
gcloud
-
Prepare for creating a persistent disk or Hyperdisk snapshot:
- Review Best practices for Compute Engine disk snapshots to prepare your disk for snapshotting.
- Read Creating a persistent disk snapshot schedule to learn about creating a snapshot schedule and attaching it to your disks. Backing up your disks regularly with scheduled snapshots can reduce the risk of unexpected data loss.
-
Create a snapshot of your existing disk.
Use the
disks create
command to create a Hyperdisk volume from your snapshot.Hyperdisk Extreme
gcloud compute disks create DISK_NAME \ --size=DISK_SIZE \ --source-snapshot=SNAPSHOT_NAME \ --type=hyperdisk-extreme --provisioned-iops=IOPS
Hyperdisk Throughput
gcloud compute disks create DISK_NAME \ --size=DISK_SIZE \ --source-snapshot=SNAPSHOT_NAME \ --type=hyperdisk-throughput \ --provisioned-throughput=THROUGHPUT
Replace the following:
- DISK_NAME: The name of the volume that you are creating.
- DISK_SIZE: Optional. The capacity, in GiB or TiB, of the volume that you are creating.
- SNAPSHOT_NAME: The name of the snapshot that you are restoring.
- IOPS: Optional. For Hyperdisk Extreme, specify the target IOPS performance, as an integer, for the volume you are creating.
- THROUGHPUT: Optional. For Hyperdisk Throughput, specify the target disk throughput in MB/s as an integer.
You can then attach the new disk to an existing instance.
Go to the VM instances page.
- Click the name of the instance where you want to restore your non-boot disk.
- At the top of the instance details page, click Edit.
- Under Additional disks, click Attach existing disk.
- Select the name of the new disk made from your snapshot.
- Click Done to attach the disk.
- At the bottom of the instance details page, click Save to apply your changes to the instance.
What's next
- Learn how to create a snapshot schedule for disks.
- Learn more about Hyperdisk.
- Learn how to manage Hyperdisk volumes.