All Products
Search
Document Center

ENS:Create and manage a disk

Last Updated:Feb 11, 2025

This topic describes how to create and manage a pay-as-you-go data disk.

Procedure

    Note

    Cloud disks are independent of each other and cannot be merged by formatting the disks. Therefore, we recommend that you determine the number and capacity of disks that you need before you create them.

    We recommend that you do not use logical volume manager (LVM) to create logical volumes on multiple disks. This is because a snapshot can back up the data of only a single disk. If you create a logical volume on multiple disks by using LVM, data discrepancies may occur when you roll back these disks.

  1. Log on to the Edge Node Service (ENS) console.

  2. In the left-side navigation pane, choose Storage and Snapshots > Cloud Disks.

  3. On the Cloud Disks page, click Create Disk.

  4. On the page that appears, configure the parameters that are described in the following table.

    Parameter

    Description

    Billing Method

    The billing method of the disk. Only Pay-as-you-go is supported.

    Name

    It must be 2 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), colons (:), and hyphens (-). It must start with a letter.

    Storage

    • Node: the edge node on which you want to create a disk. In the ENS console, you can create multiple disks that reside on different edge nodes at a time.

    • Disk Type: the disk type. Ultra disks and all-flash disks are supported.

    • Disk Capacity: the storage capacity of the disk. Valid values: 20 GiB to 32768 GiB.

    • Create with Snapshot: select a snapshot to create a disk. The data of the new disk is the same as that of the original disk when you create the snapshot.

    • Disks: the number of disks that you want to create on the edge node. You can create up to 100 disk at a time in the ENS console.

    • Encryption: specifies whether to encrypt the cloud disks. If you select this option, data stored on the created cloud disks is automatically encrypted.

    Note

    Encryption is performed by using Key Management Service (KMS).

    Tag

    • Tag Key: Select an existing tag key or enter a tag key. You can use fuzzy match to search for tag keys. A maximum of 20 tag keys can be specified at a time.

    • Tag Value: Select an existing tag value or enter a tag value. You can leave this parameter empty.

    Description

    It must be 2 to 256 characters in length and cannot start with http:// or https://.

  5. Click Confirm. After the disks are created, you can view the created disks on the Disks page.

Attach a disk

You can attach a disk as a data disk to an ENS instance that resides in the same edge node as the disk to increase storage capacity and meet your business requirements.ENS If you attach a disk that contains data, such as a disk created from a snapshot, as a data disk to an ENS instance, the operation does not cause data loss.

Note

Before you attach a disk, take note of the following items:

  • A disk that is created along with an ENS instance is automatically attached to the instance. The lifecycle of the disk is the same as that of the instance. You cannot detach the disk from the instance or attach the disk to another instance.

  • Up to 15 data disks can be attached to an ENS instance.

  • The instance to which you want to attach the disk and the disk must reside on the same node.

  • The instance to which you want to attach the disk is in the Running or Stopped state. The disk is in the Not attached state.

After you attach a disk, you need to initialize the disk before it can be used.

  • If the disk is a new empty disk that is not partitioned and on which no file systems are mounted, you must create partitions and mount file systems on the disk. For more information, see Initialize a disk.

  • If the disk is created from a snapshot or is detached from a different ENS instance but no file systems are mounted on the disk, you need to only mount file systems on the disk.

  1. Log on to the ENS console.

  2. In the left-side navigation pane, choose Storage and Snapshots > Cloud Disks.

  3. On the Cloud Disks page, find the disk that you want to attach and click Attach in the Actions column.

  4. In the dialog box that appears, select the ENS instance to which you want to attach the disk.

  5. Click OK.

Detach a disk

You can detach a data disk from an ENS instance when the disk is no longer needed. You must detach a data disk from an instance before you can attach the disk to another instance within the same edge node.

Note

Before you detach a disk, make sure that the following requirements are met:

  • The disk is attached to an instance and is in the In use state.

  • To prevent data loss and ensure data integrity, we recommend that you do not read data from or write data to the disk before you detach it.

  • You cannot detach a data disk from an ENS instance if the data disk is created along with the ENS instance.

  1. If file systems are mounted to the partitions of the data disk, detach the data disk from within the operating system of the instance to which the data disk is attached.

    1. Detach a data disk in Linux.

      1. Connect to the ENS instance.

      2. Run the df -h command to view the mount information of the data disk.

      3. Run the umount command to unmount the file system from the data disk.

      4. Run the blkid command to view the UUID information of the data disk partitions:

      5. Delete the automatic mounting configurations of the file systems in the data disk partitions that correspond to the UUID information from /etc/fstab.

        Note

        If you do not delete the automatic mount configuration information of the file systems in the data disk partitions from /etc/fstab, the instance cannot be restarted after you detach the data disk from the instance in the ENS console.

    2. Detach a data disk in Windows.

      1. Connect to the ENS instance.

      2. On the Windows Server desktop, right-click the 开始图标 icon and select Disk Management.

      3. In the Disk Management dialog box, right-click the disk that you want to detach and select Offline.

        脱机

  2. On the Cloud Disks page, find the disk that you want to detach and click Detach in the Actions column.

  3. In the message that appears, click OK.

    After you perform the preceding steps, find the disk in the disk list. If the state of the disk changes to Not attached, the disk is detached from the instance.

Delete a disk

If you no longer use a disk, you can delete the disk. After you delete a disk, the data stored on the disk is deleted.

Note
  • Make sure that the disk that you want to delete is in the Not attached state.

  • Before you delete a disk, delete the snapshots associated with the disk.

  1. Log on to the ENS console.

  2. In the left-side navigation pane, choose Storage and Snapshots > Cloud Disks.

  3. On the Cloud Disks page, find the disk that you want to delete and click Delete in the Actions column.

  4. In the message that appears, click OK.

Resize a disk

If your disk that is not created along with the instance does not have sufficient space, you can resize the disk in the ENS console to extend the capacity. If the capacity of a disk does not meet your storage requirements, you can resize the disk to increase the storage space to accommodate more data.

Note
  • You cannot resize system disks.

  • You can resize disks that are in use or not attached.

  • You cannot resize data disks or local disks that are created along with the instances.

  • You cannot resize disks for which a snapshot is being created. If a snapshot is being created for the disk, wait until the snapshot is created and then resize the disk.

  1. Log on to the ENS console.

  2. In the left-side navigation pane, choose Storage and Snapshots > Cloud Disks.

  3. On the Cloud Disks page, find the disk that you want to resize, choose 更多 > Resize in the Actions column.

  4. In the dialog box that appears, set the capacity after resizing. The value cannot be smaller than the current capacity.

  5. Extend the partitions and file systems of the disk.

    When a disk of an ENS instance is resized in the ENS console, the partitions and file systems on the disk are not automatically extended together with the disk. You must manually extend the partitions and file systems on the disk into the added disk space to make the new disk size take effect.