To enable efficient data sharing and fast failover, you can use the multi-attach feature to attach a single Enterprise SSD (ESSD) or ESSD AutoPL disk to multiple Elastic Compute Service (ECS) instances that support the Non-Volatile Memory Express (NVMe) protocol and reside in the same zone. After the attachment, the disk is called a shared NVMe disk. This topic describes how to attach a single cloud disk to multiple ECS instances by using the multi-attach feature.
For information about NVMe, see NVMe protocol.
Scenarios
The multi-attach feature is suitable for the following scenarios:
Billing
The multi-attach feature is free of charge. When resources such as cloud disks and ECS instances use the multi-attach feature, you are charged for the resources. For information about the billing of ECS resources, see Billing overview.
Limits
The following table describes the limits on the multi-attach feature.
Resource | Limit |
Cloud disks |
|
Regions and zones | Multi-attach-capable cloud disks are available in the same regions and zones as the instance families that support the cloud disks. |
ECS instances |
|
Images | The images must contain NVMe drivers. Note
|
Procedure
Step 1: Enable the multi-attach feature when you create a cloud disk
Log on to the ECS console.
In the left-side navigation pane, choose .
On the Block Storage page, click Create Cloud Disk.
On the cloud disk buy page, configure the parameters described in the following table.
NoteThis step describes how to enable the multi-attach feature for a cloud disk when you create the cloud disk. For information about other parameters, see Create an empty data disk.
Parameter
Description
Attach
Select Not Attach to specify not to attach the cloud disk to be created to ECS instances.
Region and Zone
Select a region and zone in which the multi-attach feature is supported.
Billing Method
Select Pay-as-you-go.
Cloud Disk
Specify the cloud disk storage parameters and enable the multi-attach feature.
Select the cloud disk category and specify parameters such as the cloud disk capacity.
Select Multi-Attach.
If Supported is displayed in the Multi-attach column on the Cloud Disk tab, the cloud disk is created.
Step 2: Attach a cloud disk for which the multi-attach feature is enabled to multiple ECS instances
In the left-side navigation pane, choose .
Obtain the ID of an NVMe-capable ECS instance to which you want to attach the cloud disk from the instance list.
In the left-side navigation pane, choose .
Find the disk that you want to attach and click Attach in the Actions column.
In the Attach Cloud Disk dialog box, configure parameters.
NoteThis step describes how to attach a cloud disk for which the multi-attach feature is enabled to an ECS instance. For information about other parameters, see Attach a data disk.
Destination Instance: Enter the ID of the ECS instance that you obtained.
Release Cloud Disk with Instance: Clear this option to retain the cloud disk if an associated instance is released.
Log on to the ECS instance to partition and format the cloud disk and mount file systems.
For more information, see Initialize a data disk.
ImportantIf the multi-attach-enabled cloud disk attached to multiple ECS instances uses a single-node file system, the ECS instances may fail to synchronize data, which leads to data inconsistency. A single-node file system can be one of the following types: extended file system 3 (Ext3), Ext4, eXtensible File System (XFS), and new technology file system (NTFS). To prevent data inconsistency, we recommend that you create a cluster file system that is suitable for your business scenarios. A cluster file system ensures that written data, created files, and modified metadata are synchronized across all instances to which the cloud disk is attached in real time. This ensures data consistency at the file system layer. Typical cluster file system types include Oracle Cluster File System version 2 (OCFS2), Global File System 2 (GFS2), Veritas Cluster File System (Veritas CFS), Oracle Automatic Storage Management Cluster File System (Oracle ACFS), and Databricks File System (DBFS).
(Optional) Repeat Step 2 to Step 5 as needed to attach the cloud disk to other ECS instances that support NVMe.
After the cloud disk is attached to all required ECS instances, the Status column of the cloud disk displays In Use on the Cloud Disk tab of the Block Storage (Disks) page. You can move the pointer over an instance ID or name in the Associated Instance column to view the mount information of the cloud disk on each ECS instance.
References
You can modify the NVMe driver attributes of a custom image as needed. For more information, see the Modify the attributes of an image section of the "Modify the attributes and tags of an image" topic.
If the multi-attach feature is enabled for a cloud disk and the cloud disk is resized, the new capacity of the cloud disk may not take effect. For more information, see Step 1: Resize a disk to extend the capacity of the disk.