Creating Cloud Disks Using Snapshots

Last updated: 2024-05-13 17:16:11

Scenario

Making snapshot is an important method for data sharing and migration. Cloud disks created using a snapshot own all data in the snapshot. You can use a snapshot to create a cloud disk whose capacity is greater than or equal to that of the snapshot.
When creating a data disk of the same size using a snapshot, the new data disk does not need to be initialized. Simply attach it and right-click

> Disk Management. After setting it online in "Disk Management", it can be read and written normally on the cloud server.
When creating a data disk with a capacity larger than the snapshot using a snapshot, the system only completes the block device-level disk expansion, and does not implement the expansion of the file system or the automatic conversion of the partition form. After the new data disk is attached, it can only use the file system and data of the source snapshot, and cannot directly use the new disk space. You need to manually expand the file system or even convert the partition form. For instance, when using a snapshot of a data disk with an MBR partition and a capacity of 1TB to create a new 3TB data disk. Since the maximum disk space supported by MBR is 2TB, you need to format the data disk and re-partition it using GPT, this operation will delete the original data. Therefore, please operate carefully according to your actual needs.
This document guides you to create a cloud disk through a snapshot on the Snapshot List page. In addition, you can also specify the corresponding snapshot to create a cloud disk by configuring the "Snapshot" parameter when creating a cloud disk.

Instructions

Creating a cloud disk with a snapshot in the console

1. Log in to the Snapshot List page.
2. In the row of the target snapshot, select More > Create Cloud Disk.
3. In the Purchase Data Disk pop-up window, configure the following parameters:
Configuration Item
Description
Availability Zones
Required.
The availability zone of the cloud disk cannot be modified after the cloud disk has been created.
Cloud Disk Type
Required.
For information on cloud disk types, see Cloud Disk Types.
Capacity
Required.
For the capacity and specifications of the cloud disk, please refer to Performance Metrics. When creating a cloud disk from a snapshot, the capacity cannot be less than the size of the snapshot. If you do not specify the capacity of the cloud disk, the capacity will default to the same size as the snapshot.
Snapshot
Optional parameter. When creating a cloud disk using a snapshot, you need to check "Create Cloud Disk with Snapshot" and select the snapshot you need to use.
You can adjust the capacity of a cloud disk created from a snapshot to be greater than the default value (snapshot size).
When you create a cloud disk using a snapshot, the disk type is the same as that of the snapshot's source disk. You can change the disk type.
Disk Name
Optional.
Supports up to 20 characters, starting with a letter (upper or lower case) or Chinese character. It can consist of letters (upper or lower case), Chinese characters, numbers, and special symbols ._:-. It can be modified after the cloud disk is created.
Creating a Single Cloud Disk: The disk name is the name of the cloud disk.
Batch creation of cloud disks: When creating multiple cloud disks at once, the disk name is the prefix of the cloud disk name. The final cloud disk name is composed of "Disk Name_Number", ranging from "Disk Name_0" to "Disk Name_49".
Project
Required.
When creating a cloud disk, you can set the project to which the cloud disk belongs. The default project is "Default Project".
Tag
Optional.
You can bind tags to the cloud disk when creating it. Tags are used to identify cloud resources, and you can categorize and search for cloud resources through tags. For more detailed information about tags, please refer to the Tag Product Documentation.
Billing
Required.
The cloud disk supports the following two billing types:
Monthly Subscription. If you choose this mode, you must set the "Validity Period".
Pay as you go.
Scheduled Snapshot
Optional.
You can choose to schedule backups when creating a cloud disk. Based on the created scheduled snapshot policy, you can regularly create snapshots for this cloud disk. For more detailed information about scheduled backups, please refer to Scheduled Snapshots.
Purchase quantity
Optional.
The default quantity is "1", indicating the creation of only one cloud disk. Currently, up to 50 cloud disks can be created in bulk.
Duration
If the "Billing Mode" is set to Monthly Subscription, this parameter is mandatory. The selectable time range is from 1 month to 5 years.
If the "Billing Mode" is set to pay-as-you-go, this parameter is not applicable.
Auto-Renewal
If the "Billing Mode" is set to Monthly Subscription, this is an optional parameter. When auto-renewal is selected, the device will be automatically renewed on a monthly basis after expiration, provided that the account balance is sufficient.
If the "Billing Mode" is set to pay-as-you-go, this parameter is not applicable.
4. Click OK.
If the Pay-as-You-Go option is selected for "Billing Mode", then the creation is complete.
If you select Monthly Subscription for "Billing Mode", you will be directed to the "Review Information" page.
a. After confirming the specifications are correct, decide whether to use a voucher based on the actual situation, then click Submit Order.
b. Complete the payment.
5. You can view the created cloud disks on the Cloud Disk List page. The newly created elastic cloud disk is in the "To Be Mounted" state. You can refer to Mounting Cloud Disks to attach the cloud disk to a cloud server within the same availability zone.

Using an API to create a cloud disk from snapshot

You can use the CreateDisks interface to create a snapshot. For specific operations, please refer to Creating a Cloud Disk.