Amazon Elastic Block Store (EBS) Multi-Attach allows an EBS volume to be attached to multiple Amazon Elastic Compute Cloud (EC2) instances at the same time. This feature allows you to build highly available and scalable applications by sharing storage across multiple instances. This feature is available for Nitro-based EC2 instances that are running in the same availability zone.

Table of Contents

  1. Cluster-aware file system
  2. AWS Nitro-Based Instance
  3. How to enable Multi-Attach for EBS volume?
  4. Limitations of EBS Multi-Attach
  5. Is it possible to use EBS Multi-Attach on Windows instances?
  6. Conclusion

Enable Multi-Attach for EBS Volumes

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

To build a highly available storage using EBS multi-attach feature, you need cluster-aware file systems which allows to read and write the same file systems from multiple instances. Before checking out more on EBS Multi-Attach , we need to understand the term “cluster-aware” and “Nitro-based” EC2 instance.

Cluster-aware file system:

A cluster-aware file system is a type of file system that is specifically designed to work with a cluster of computers, allowing multiple nodes to access and modify the file system simultaneously. These file systems are typically designed to handle issues such as data consistency and availability, and to provide transparent failover and recovery in the event of a node failure.

Download Banner

Examples of cluster-aware file systems include:

  • Global File System (GFS)
  • Microsoft Cluster Shared Volume (CSV)
  • Oracle Cluster File System (OCFS)
  • GlusterFS
  • Lustre

Cluster-aware file systems are commonly used in high-performance computing, big data processing, and other scenarios where high availability and scalability are required.

AWS Nitro-Based Instance:

EC2 Nitro-based instances are a type of Amazon Elastic Compute Cloud (EC2) instances that are built on the Nitro System, a collection of AWS-built hardware and software components that offloads some of the virtualization overhead to dedicated hardware. Nitro-based instances offer improved performance and additional networking and storage options compared to traditional EC2 instances. They also offer additional security features, such as secure boot and hardware-level isolation of virtualized instances.

How to enable Multi-Attach for EBS volume?

To enable Multi-Attach for an Amazon Elastic Block Store (EBS) volume, you will need to do the following:

  1. Create an EBS volume: You can create an EBS volume using the AWS Management Console, AWS Command Line Interface (CLI), or the AWS SDKs. When creating the volume, make sure to select “Nitro-based” instances types in the “Compatibility” section, and select the same availability zone as the instances you will be attaching the volume to.
  2. Attach the volume to an instance: Once the volume is created, you can attach it to an instance using the “Attach Volume” option in the EC2 Management Console, or by using the “attach-volume” command in the AWS CLI.

    Enable Multi-Attach for EBS Volumes

    Allow other instances to attach to the same volume: To enable Multi-Attach, you need to set the “EnableMultiAttach” attribute of the volume to “true” using the AWS CLI or SDKs.

  3. Attach the volume to other instances: Once the “EnableMultiAttach” attribute is set, you can attach the volume to other instances using the “Attach Volume” option in the EC2 Management Console or by using the “attach-volume” command in the AWS CLI.

Please note that the instances that you want to attach the volume to must be in the same availability zone and must be Nitro-based instances. Also, you cannot attach a Multi-Attach volume to an instance that is in the terminated state.

Limitations of EBS Multi-Attach:

There are a few limitations to be aware of when using Amazon Elastic Block Store (EBS) Multi-Attach volumes:

  • Only Nitro-based EC2 instances can use Multi-Attach volumes. This means that instances launched from certain older instance types or virtualization types will not be able to use Multi-Attach volumes
  • Multi-Attach volumes can only be attached to instances in the same availability zone. This means that you cannot use Multi-Attach to share a volume across multiple availability zones
  • Multi-Attach volumes can only be attached to instances that are in the running or stopped state. You cannot attach a Multi-Attach volume to an instance that is in the terminated state
  • Only certain types of workloads are suitable for Multi-Attach. High-performance workloads such as databases, big data, and HPC could be designed to use Multi-attach
  • Multi-Attach volumes can only be used with provisioned IOPS SSD (io1) and General Purpose SSD (gp2) volumes, and not with magnetic (standard) volumes
  • Multi-Attach volumes are currently only available in certain regions
  • The maximum IOPS and throughput limits per volume are lower when using Multi-Attach compared to when using a single-attach volume

Is it possible to use EBS Multi-Attach on Windows instances?

In order to access an EBS volume from multiple instances, the operating system must support a cluster file system, such as the Microsoft Cluster Shared Volume (CSV), which is only available on Windows Server instances. Without support for a cluster file system, it would not be possible for multiple instances to access the same EBS volume simultaneously without causing data inconsistencies.

Windows servers can use other AWS services like EFS & S3 object storage services to share the data across windows instances.

Conclusion:

Amazon EBS volumes can be attached to more than one EC2 instances (up to 16 instances) by enabling the Multi-Attach flag on the EBS volumes. This feature is only supported on Nitro based EC2 instances. This feature helps to achieve higher application availability in Linux clusters which manage concurrent read and write operations. This feature is not available in all the regions and only io1 and io2 volume types are supported. Hope this article is informative to you.

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Rate this post