Scenarios
Snapshots are an important method for data sharing and migration. A cloud disk created from a snapshot contains all the data in the snapshot. You can use a snapshot to create a cloud disk with a capacity equal to or greater than that of the snapshot.
- When a snapshot is used to create a data disk of the same size, the new data disk can be read and written properly after direct mounting to the CVM, and no initialization is required.
- When you use a snapshot to create a data disk with a capacity larger than the snapshot, the system only completes the disk scaling out at the block device level, and does not implement the file system scaling out or automatic conversion of the partition format. When a new data disk is mounted, only the file system and data of the source snapshot can be used, and the new disk space cannot be directly used. You need to manually scale out the file system or even convert the partition format.
For example, use a data disk snapshot with an MBR partition format 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 repartition it using GPT, which deletes the original data. Therefore, please operate with caution according to your actual needs.
This document describes how to create a cloud disk from a snapshot on the Snapshot List page. Additionally, when creating a cloud disk, you can configure the snapshot parameter to specify the corresponding snapshot for creating a cloud disk.
Operation Steps
Creating a Cloud Disk from a Snapshot Using the Console
- Log in to console and enter the Snapshot List page.
- In the row of the target snapshot, click More > Create Cloud Disk.
- In the purchase data disk dialog box, set the following parameters:
| Parameter | Parameter Description |
|---|---|
| AZ | This parameter is required. The availability zone where a cloud disk is located cannot be changed after a cloud disk is created. |
| Cloud Disk Type | This parameter is required. Cloud disk types include: - Premium Disk - Cloud SSD |
| Capacity | This parameter is required. When you create a cloud disk using a snapshot, the capacity cannot be smaller than the snapshot size. If you do not specify the capacity of a cloud disk, the capacity defaults to the same as the snapshot size. |
| Snapshot | This parameter is optional. When creating a cloud disk from a snapshot, check Create Cloud Disk with Snapshot and select the snapshot you want to use. - The capacity of a cloud disk created with a snapshot is equal to the snapshot size by default, and you can increase the capacity to a value larger than the default value. - When a cloud disk is created with a snapshot, the disk type is consistent with the type of the source cloud disk by default. You can adjust the cloud disk type. |
| Disk Name | This parameter is optional. The name of cloud disk supports up to 20 characters. After the cloud disk is created, it can be modified. - Create a single cloud disk: The disk name is the name of the cloud disk. - Create cloud disks in batches: When creating multiple cloud disks at once, the disk name will use the cloud disk name as a prefix. The final cloud disk name will be formed as Disk Name_ Number, ranging from "Disk Name_0" to "Disk Name_49". |
| Billing Mode | Pay-as-you-go by default. |
| Purchase Quantity | This parameter is optional. The default quantity is 1 , indicating that only one cloud disk is created. Currently, a maximum of 50 cloud disks can be created in batches. |
- Click OK.
- You can check the created cloud disk on the Cloud Disk List page. The newly created elastic cloud disk is in the to be attached state. See Attaching Cloud Disks to attach the cloud disk to CVM in the same availability zone.
Creating a Cloud Disk from a Snapshot Using the API
You can use CreateDisks API to create a snapshot.