All Products
Search
Document Center

Elastic Compute Service:Enable multi-attach

Last Updated:Jun 21, 2024

When you create an enhanced SSD (ESSD), you can enable the multi-attach feature for the ESSD. Disks that support Non-Volatile Memory Express (NVMe) and have the multi-attach feature enabled are called shared NVMe disks. Shared NVMe disks can be simultaneously attached to up to 16 Elastic Compute Service (ECS) instances that support the NVMe protocol and reside in the same zone. Each instance to which a shared NVMe disk is attached has full read and write permissions on the disk. This topic describes how to enable the multi-attach feature for an ESSD.

Benefits

The multi-attach feature is suitable for high-availability databases and distributed database clusters that each consist of one write node and multiple read-only nodes and provides the following benefits:

  • Use of NVMe commands: NVMe commands can be used to control the permissions of ECS instances on ESSDs. This helps improve service availability without compromising data durability. For more information about NVMe commands, see NVM Express Base Specification.

  • Cross-instance data sharing: The multi-attach feature enables data to be shared by multiple ECS instances to reduce storage costs and improve service flexibility.

  • Disaster recovery: The multi-attach feature allows fast scheduling of services to normal ECS instances to ensure service continuity in single-point-of-failure (SPOF) scenarios.

Limits

The following limits apply to the multi-attach feature:

  • The following instance families support the multi-attach feature: g7se, c7se, r7se, c8y, g8y, r8y, g8ae, c8ae, r8ae, g8i, c8i, and r8i. For more information, see Overview of instance families.

  • The multi-attach feature is supported in the regions and zones where the preceding instance families are supported.

  • Only pay-as-you-go ESSDs are supported.

    Note

    ESSD Entry disks do not support the multi-attach feature.

  • Data disks are supported but system disks are not.

  • The multi-attach feature can be enabled only when ESSDs are created. This feature cannot be enabled or disabled for created ESSDs.

  • The performance of ESSDs is capped. When an ESSD is attached to multiple ECS instances, the total performance of the ESSD on all the instances cannot exceed the maximum performance that the ESSD can deliver.

Shared NVMe disks are subject to the functionality limits that are described in the following table.

Feature

Limit

Disk attachment

A single shared NVMe disk can be attached to up to 16 instances that support the NVMe protocol.

Disk resizing

Shared NVMe disks can only be resized online.

Partitioning in the ECS console

Not supported.

Disk billing method change

Not supported.

Release of disks with instances

Not supported.

Disk re-initialization

Not supported.

Disk category change

Not supported.

ESSD performance level change

Not supported.

Snapshot-consistent group

Not supported.

Application-consistent snapshot

Not supported.

Procedure

Step 1: Create an ESSD for which the multi-attach feature is enabled

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Storage & Snapshots > Block Storage (Disks) .

  3. In the upper-left corner of the Disks page, click Create Disk.

  4. On the Disk page, configure the parameters described in the following table.

    创建多重挂载ESSD云盘

    Parameter

    Description

    Attach

    Select Not Attach to specify not to attach the ESSD to ECS instances.

    Billing Method

    Select Pay-as-you-go.

    Storage

    Configure storage settings and enable the multi-attach feature.

    • Select Enhanced SSD (ESSD) from the drop-down list and specify the disk capacity and performance level.

    • If the number of instances within a same zone is two or more, you can select Multi-attach to attach the ESSD to multiple instances in the zone.

    To encrypt the ESSD, select Disk Encryption and then select an encryption key. For more information, see Encrypt disks.

    Quantity

    Specify the number of disks that you want to create.

    Note

    Pay-as-you-go disks have capacity quotas. The total capacity that you purchase cannot exceed your remaining capacity quota. You can use the following formula to calculate the total disk capacity: Total capacity = Capacity of a single disk × Number of disks. After you select a disk category, the purchased capacity and the capacity quota balance are displayed on the Disk page.

    Terms of Service

    Read and select ECS Terms of Service.

    Note

    For more information about how to create disks, see Create a disk.

  5. Confirm the configuration information and fees and click Preview.

  6. In the Preview message, confirm the purchase information and click Create.

    After the ESSD is created, you can view it on the Disks page and find that Supported is displayed in the Multi-attach column.

Step 2: Attach the ESSD to multiple instances that support the NVMe protocol

Before you attach the ESSD to instances, make sure that the following requirements are met:

  • The ESSD and the instances reside in the same zone.

  • The instance families and images of the instances comply with the NVMe protocol. For more information, see Limits.

  1. Obtain the IDs of the instances to which you want to attach the ESSD.

    In the left-side navigation pane, choose Instances & Images > Instances. On the Instances page, view and copy the instance IDs in the instance list.

  2. In the left-side navigation pane, choose Storage & Snapshots > Block Storage (Disks) .

  3. Find the ESSD that you want to attach. In the Actions column, choose 更多 > Attach.

  4. In the Attach Disk dialog box, configure parameters.

    挂载云盘

    1. Select an instance to which you want to attach the disk and configure the release settings for the disk.

      • Destination Instance: Select an instance ID that you obtained in Step 1 from the drop-down list.

      • Release Disk with Instance: If you select this option, the disk is released when its associated instance is released. If you do not select this option, the disk is retained when the associated instance is released.

      • Delete Automatic Snapshots While Releasing Disk: If you select this option, automatic snapshots created for the disk are released when the disk is released. To retain the automatic snapshots, do not select this option.

    2. Click Next.

    After the ESSD is attached, you can find that the state of the ESSD on the Disks page changes to In Use. Then, you can move the pointer over the instance ID or name in the Associated Instance column to view the attachment information of the disk.

    Important

    When you attach the disk, you can select only a single instance each time. If you want to attach the disk to multiple instances, repeat the steps.

What to do next

When an ESSD for which the multi-attach feature is enabled is attached to multiple ECS instances, data cannot be synchronized among the instances and data inconsistency may occur if single-node file systems such as EXT2, EXT3, EXT4, XFS, and New Technology File System (NTFS) are used. We recommend that you create cluster file systems that are suitable for your business. Common cluster file systems include OCFS2, GFS2, Veritas CFS, Oracle ACFS, and DBFS.