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 attached to up to 16 Elastic Compute Service (ECS) instances that support the NVMe protocol within the same zone to allow concurrent read and write access from the instances.

Benefits

This 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: This feature enables data to be shared by multiple ECS instances to reduce storage costs and improve service flexibility.
  • Disaster recovery: This feature allows fast scheduling of services to healthy 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.
  • 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.
  • After the multi-attach feature is enabled for an ESSD, we recommend that you use cluster file systems such as 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) on the ESSD.
    Warning 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 file systems such as EXT2, EXT3, EXT4, XFS, and New Technology File System (NTFS) are used.
  • The performance of ESSDs is capped. When an ESSD is attached to multiple ECS instances, the total performance of this ESSD on all these instances cannot exceed the maximum performance that the ESSD can deliver.
Shared NVMe disks are subject to the functionality limits described in the following table.
FeatureLimits
Disk attachingA single shared NVMe disk can be attached to up to 16 instances that support the NVMe protocol.
Disk resizingShared NVMe disks can only be resized online.
Partitioning in the ECS consoleNot supported.
Disk billing method changeNot supported.
Release of disks with instancesNot supported.
Disk re-initializationNot supported.
Disk category changeNot supported.
ESSD performance level changeNot supported.
Snapshot-consistent groupNot supported.
Application-consistent snapshotNot supported.

Use multi-attach

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

To use the multi-attach feature, you must enable this feature when you create ESSDs.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Storage & Snapshots > 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.
    Create an ESSD for which the multi-attach feature is enabled
    ParameterDescription
    AttachSelect Not Attach to specify not to attach the ESSD to ECS instances.
    Billing MethodSelect Pay-as-you-go.
    StorageConfigure storage settings and enable the multi-attach feature.
    • Select Enhanced SSD (ESSD) from the drop-down list and set the Capacity and Performance Level parameters.
    • If the number of instances within a same zone is two or more, select Multi-attach to attach a single ESSD to multiple instances in the zone.

    To encrypt an ESSD, select Disk Encryption and then select an encryption key.

    QuantitySpecify 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 remaining capacity quota are displayed on the disk buy page.
    Terms of ServiceRead and select ECS Terms of Service.
    Note For more information about how to create disks, see Create a disk.
  5. Confirm the configurations 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. The ESSD supports the multi-attach feature. Disks page

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 ID of the instance 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 ID in the instance list. Instance list
  2. In the left-side navigation pane, choose Storage & Snapshots > Disks.
  3. Find the ESSD that you want to attach. In the Actions column, choose More > Attach.
  4. In the Attach Disk dialog box, configure the parameters.
    Disk attaching
    1. Select an instance to which you want to attach the disk and configure the release settings for the disk.
      • Destination Instance: Select the instance ID that you obtained in Step 1 from the drop-down list.
        Note You can attach the ESSD to only a single instance each time you perform the preceding operations. To attach the ESSD to multiple instances, repeat the preceding operations.
      • 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 its 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 backup data, 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.
    You can click the Question mark icon icon in the Multi-attach (All) column to view the attach information of the ESSD on one or more instances. Attach information

What to do next

After the ESSD is attached to multiple instances, we recommend that you create cluster file systems based on your business requirements. Common cluster file systems include OCFS2, GFS2, Veritas CFS, Oracle ACFS, and DBFS.

Warning 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 file systems such as EXT2, EXT3, EXT4, XFS, and New Technology File System (NTFS) are used.