A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk below:

Change the disk type | Compute Engine Documentation

Change the disk type

Stay organized with collections Save and categorize content based on your preferences.

This document discusses how to perform certain tasks on a disk. To perform any of the following tasks, you must create a new disk. You can't make the following changes to a disk.

Follow these steps to perform any of the previously mentioned tasks:

  1. Create a snapshot of the existing disk.
  2. Create a new disk of the correct type or within a storage pool (referred to as its placement), using the snapshot as the data source for the disk.
  3. After verifying the new disk, you can delete the original disk.
Before you begin Required roles and permissions

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

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

These predefined roles contain the permissions required to change the disk type. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to change the disk type:

You might also be able to get these permissions with custom roles or other predefined roles.

Change the type or placement of a disk

To migrate a Persistent Disk volume to Hyperdisk, or to recreate a disk in or out of a storage pool, you create a snapshot of the disk, and then use the snapshot when creating a new disk.

When creating a new Hyperdisk volume, you can create it as a standalone disk, or you can create the disk in a storage pool, if one exists.

Console
  1. Prepare for creating a disk snapshot:

    Important: If you pause your applications before creating a snapshot, resume your workloads only after the snapshot resource reaches the UPLOADING status.

    For more information, see the table in Manually creating application consistent snapshots.

  2. Create a snapshot of your existing disk.

    Note: When creating a snapshot, Google recommends using the snapshots.insert method instead of the disks.createSnapshot method because it supports more features, such as creating snapshots in a project different from the source disk project.
  3. Optional: To create a new Hyperdisks in a storage pool, you must create a storage pool, if one doesn't exist.
  4. Go to the Disks page.

    Go to Disks
  5. Click + Create Disk.
  6. Under Disk Type, select Hyperdisk Extreme, Hyperdisk Throughput, or Hyperdisk Balanced.

    Optional: To use storage pools, select either Hyperdisk Balanced or Hyperdisk Throughput.

  7. For Disk source type, select Snapshot, then select the name of the snapshot to restore.
  8. Specify the Size of the new disk, in GiB. This number must be equal to or larger than the original source disk for the snapshot.
  9. Optional: Change the defaults, if you are changing the disk type:

  10. Optional: To create the new disk in a storage pool:

    1. In the Storage pool section, select Enable storage pool.
    2. Choose the name of the storage pool to create the disk in.

      Only storage pools that exist in the selected zone appear in the list.

  11. Click Create to create the new disk.
  12. After you create the disk, you can attach the disk to any running or stopped compute instance.
gcloud
  1. Prepare for creating a disk snapshot:

    Important: If you pause your applications before creating a snapshot, resume your workloads only after the snapshot resource reaches the UPLOADING status.

    For more information, see the table in Manually creating application consistent snapshots.

  2. Create a snapshot of your existing disk.

    Note: When creating a snapshot, Google recommends using the snapshots.insert method instead of the disks.createSnapshot method because it supports more features, such as creating snapshots in a project different from the source disk project.
  3. Use the disks create command to create a Hyperdisk volume from your snapshot.

    gcloud compute disks create DISK_NAME \
     --zone=ZONE \
     --storage-pool=STORAGE_POOL_NAME \
     --size=SIZE \
     --source-snapshot=SNAPSHOT_NAME \
     --type=DISK_TYPE \
     --provisioned-iops=PROVISIONED_IOPS \
     --provisioned-throughput=PROVISIONED_THROUGHPUT
    

    Replace the following:

  4. After you create the disk, you can attach the disk to any running or stopped compute instance.

REST
  1. Construct a POST request to create a zonal Hyperdisk by using the disks.insert method. Include the name, sizeGb, type, and sourceSnapshot properties.

    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",
       "sourceSnapshot": "SNAPSHOT_NAME",
       "provisionedIops": "IOPS_LIMIT",
       "provisionedThroughput": "THROUGHPUT_LIMIT",
       "accessMode": "DISK_ACCESS_MODE"
    }
    

    Replace the following:

  2. Optional: Use the compute.disks.get method to see a description of your disk.

  3. After you create the disk, you can attach the disk to any running or stopped compute instance.

Change a zonal disk to a regional Hyperdisk Balanced High Availability disk

To change a zonal disk to a Hyperdisk Balanced High Availability disk, create a snapshot of the zonal disk and use the snapshot as the source when creating the regional disk.

Console
  1. Prepare for creating a disk snapshot:

    Important: If you pause your applications before creating a snapshot, resume your workloads only after the snapshot resource reaches the UPLOADING status.

    For more information, see the table in Manually creating application consistent snapshots.

  2. Create a snapshot of your existing disk.

    Note: When creating a snapshot, Google recommends using the snapshots.insert method instead of the disks.createSnapshot method because it supports more features, such as creating snapshots in a project different from the source disk project.
  3. Go to the Disks page.

    Go to Disks
  4. Click + Create Disk.
  5. Specify a name for the disk.
  6. In the Location field, choose Regional.
  7. Specify the primary zone for the disk in the Region and Zone fields.

    The disk must be in the same region as the compute instance that you plan to attach it to.

  8. Specify the secondary zone in the Replica zone field.
  9. For Disk source type, select Snapshot, then select the name of the snapshot to restore.
  10. Under Disk Type, select Hyperdisk Balanced High Availability.

    If you don't see the Hyperdisk Balanced High Availability disk type in the list, you might have to choose a region that offers Hyperdisk Balanced High Availability disks.

  11. Specify the Size of the new disk, in GiB. This number must be equal to or larger than the original source disk for the snapshot.
  12. Optional: Change the default Provisioned IOPS and Provisioned throughput values for the new disk:

  13. Click Create to create the new disk.
  14. After you create the disk, you can attach the disk to any running or stopped compute instance.
gcloud
  1. Prepare for creating a disk snapshot:

    Important: If you pause your applications before creating a snapshot, resume your workloads only after the snapshot resource reaches the UPLOADING status.

    For more information, see the table in Manually creating application consistent snapshots.

  2. Create a snapshot of your existing disk.

    Note: When creating a snapshot, Google recommends using the snapshots.insert method instead of the disks.createSnapshot method because it supports more features, such as creating snapshots in a project different from the source disk project.
  3. Use the disks create command to create a Hyperdisk Balanced High Availability disk from your snapshot.

    gcloud compute disks create DISK_NAME \
     --size=SIZE \
     --type=hyperdisk-balanced-high-availability \
     --source-snapshot=SNAPSHOT_NAME \
     --provisioned-iops=PROVISIONED_IOPS \
     --provisioned-throughput=PROVISIONED_THROUGHPUT \
     --region=REGION \
     --replica-zones=ZONE1,ZONE2
    

    Replace the following:

Terraform

To create a Hyperdisk Balanced High Availability volume, you can use the google_compute_region_disk resource, as shown in the following example, but change the disk type from pd-ssd to hyperdisk-balanced-high-availability.

REST

To create a Hyperdisk Balanced High Availability volume, construct a POST request to the compute.regionDisks.insert method.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/disks
{
  "name": "DISK_NAME",
  "sourceSnapshot": "SNAPSHOT_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/hyperdisk-balanced-high-availability"
}

Replace the following:

Make the new disk accessible to your VM instance

After you create the disk, you must attach the disk or attach the regional disk to your compute instance before you can use it.

Because the new disk you created isn't a blank disk, after attaching the disk to an instance, you only need to mount the disk to make it available the operating system.

Caution: Don't format the disk before mounting it, because this will remove all the copied data from the disk.

For information on how to mount the disk, refer to the following:

Remove the original disk

After verifying the new disk, you can:

What's next

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

Last updated 2025-07-02 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[[["You cannot directly change a disk's type, encryption, or move it in/out of a Hyperdisk Storage Pool; instead, a new disk must be created."],["To change a disk's attributes, first create a snapshot of the existing disk, then use that snapshot as the data source when creating the new disk."],["Creating a new disk with modified attributes requires selecting the appropriate disk type, setting the disk source type to \"Snapshot,\" and specifying the snapshot name."],["When creating a disk in a storage pool, ensure the selected zone matches the location of the storage pool, and verify that the disk type is compatible with the storage pool."],["After creating the new disk and attaching it to an instance, the original disk and the snapshot can be deleted once it is confirmed that the data is present in the new disk."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4