EBS Multi Attach in AWS

Learn via video courses
Topics Covered

Overview

A single Provisioned IOPS SSD (io1 or io2) volume can be attached to numerous instances that are in the same AZ using EBS Multi-Attach. Every instance or collection of instances can have several Multi-Attach enabled volumes attached. The shared disk is fully readable and writable from each instance with which it is associated. In Linux clustered applications that handle concurrent writing operations, Multi-Attach enables greater application availability.

Properties of EBS Multi-Attach

Users can connect one Provisioned IOPS SSD (io1 or io2) volume to several instances which are located in the same AZs using AWS EBS Multi-Attach. Any instance or collection of instances can have numerous Multi-Attach enabled volumes attached to them. The common disk is fully readable and writable from each instance to which it is associated. Users may more easily achieve improved application performance using Multi-Attach in Linux clustered applications that control simultaneous writing operations.

Some of the features of EBS Multi-Attach include:

  • Proprietorship and Highly Available: All EC2 instances to which the volumes are associated should be operating in the very same AWS AZ, just like with singularly attached volumes. Concerns about maintaining the continuity of operations may arise because if the single AZ fails, the Multi-Attach volume and all of their instance will also fail.
  • Shared Multi-AZ Data: The EBS volumes should be in the same AZs as the EC2 instance that is linked to it. EBS volumes located in different AZs are inaccessible to EC2 instances.
  • Type of Disk: AWS Multi-Attach EBS is the only form of EBS volumes that may be used with IOPS SSD (io1) volume and EC2 instances powered by the AWS Nitro System. Programs that need the ultimate capacity and the smallest latencies should use the io1 disk types. The Nitro System, a brand-new underpinning architecture for the task, highly performing EC2 instance, serves as the foundation for the Nitro Scheme EC2 instance.
  • Write Consistency in Data Sequence: The integrity of data must be protected since numerous EC2 instances can use AWS EBS Multi-Attach volume. The EBS volumes are completely within the control of every EC2 instance. This indicates that write sequencing is necessary to ensure the consistency of data. In those other words, it's crucial in this regard to adopting cluster-aware system files.
  • Delete-on-Termination: The EBS volumes could be supposed to automatically deleted or be kept once an EC2 instance is terminated. To prevent unexpected or uneven termination behavior in addition to additional fees when using Multi-Attach EBS volume, each instance that is connected to Multi-Attach volumes must be set up with a regular delete or keep configuration.

EBS Multi-Attach Considerations & Limitations

Higher than or equal to 16 Linux instances created on the Nitro Systems which are located within the same AZs can have Multi-Attach configured volume linked to them. Windows instances can have Multi-Attach capable volumes attached to them, however, this can lead to inconsistent data since the OS does not recognize the volume's shared data.

Only Provisioned IOPS SSD volume enable Multi-Attach.

Just the following Regions provide Multi-Attach for IO1 volumes: US East (N. Virginia), US West (N. California), US West (Oregon), and Asia Pacific (Seoul).

Most Regions that accept such volume kinds have Multi-Attach accessible for io2 and io2 Block Express volume.

The Multi-Attach configured io2 volume cannot be attached simultaneously to instances kinds that accept Block Express and instances type that don't. 

Instances type which enables io2 Block Express need not enable io1 volume using Multi-Attach enable. Users have to use io2 volume with all these instances types if users wish to employ Multi-Attach.

Servers, including such EC2 instances, cannot use standard file systems like XFS and EXT4 concurrently. It is unsafe to use Multi-Attach with normal system files since it might cause data loss or corruption. To guarantee data resilience and dependability for production workloads, users can employ cluster system files.

I/O fencing is not supported by volume with Multi-Attach enabled. To preserve the consistency of data, I/O fence methods regulate write rights in a common storage system. To preserve data integrity, your apps must offer writing orders for the associated instance.

Boot volume cannot be generated for Multi-Attach supported volume.

Each block device mapping can have Multi-Attach enabled volumes linked to it per instance.

Neither the AWS EC2 UI nor the RunInstances API allows Multi-Attachs to be configured during instances startup.

The most attached instance cannot access Multi-Attach configured volumes that are experiencing a problem at the AWS EBS infrastructure layer. Only part of the associated instances may be impacted by problems at the AWS EC2 or network layer.

The table below shows post-creation volume modifications capability for io1 and io2 volume with Multi-Attach allowed.

io2 volumesio1 volumes
Modify volume typeNoNo
Modify volume sizeYesNo
Modify provisioned IOPSYesNo
Enable Multi-AttachYesNo
Disable Multi-AttachYesNo

Performance

According to the volume's full permitted performance, each associated instance can drive its full IOPS effectiveness. The maximal provisioned capacity of the volume cannot be exceeded by the combined performance of all associated instances. The volume won't perform better than it is planned for if the associated instances' IOPS demands are greater than its allocated IOPS.

Consider the scenario where you construct a volume with io2 Multi-Connect enabled that has 50,000 Provisioned IOPS and attach it to both m5.8xlarge and c5.12xlarge instances. Max IOPS for the m5.8xlarge and c5.12xlarge instances are 30,000 and 40,000, respectively. As long that it is lower than the 50,000 Provisioned IOPS for the volumes, every instance can use its max IOPS.

Nevertheless, when both instances concurrently drive I/O to the volume, their total IOPS are limited to the 50,000 IOPS of provided performance for the volumes. The IOPS won't go beyond 50,000 for the volumes.

It is recommended practice to distribute I/O driven by connected instances throughout the sector of a Multi-Attach capable volumes in order to ensure consistent performances.

Each instance to which the volume is attached has full read and write permission to the shared volume. Multi-Attach makes it easier for you to achieve higher application availability in clustered Linux applications that manage concurrent write operations.

Work with Multi-Attach

Similar to how you'd handle anyone else AWS EBS volume, Multi-Attach capable volume may be handled. Nevertheless, users must allow Multi-Attach for the volumes in order to utilize the feature. By convention, Multi-Attach is disabled whenever users create new volumes.

Multi-Attach is Enabled

With io1 and io2 volume, Multi-Attach can be enabled upon formation.

For enabling Multi-Attach for an io1 or io2 volumes on creation, employ one of the following techniques.

  1. Go to link to access the Ec2 console.
  2. Select Volume in the menu window. Select Create volumes.
  3. Select Provisioned IOPS SSD (io1) or Provisioned IOPS SSD as the Volume type (io2).
  4. Select the desired volume level and the provisioned IOPS under Size and IOPS.
  5. Select the same AZ as the instances for Availability Zone.
  6. Select Enable Multi-Attach under Amazon EBS Multi-Attach.
  7. (Optional) Select the snapshot from which to construct the volume by entering its Snapshot ID.
  8. Set the volume's encryption state.
  9. Encryption is immediately activated and cannot be turned off if the chosen snapshot is encrypted or if your account has encryption set by default. The KMS key that is used to encrypt the volume is your choice. Encryption is not required if indeed the chosen snapshots are not secured and the accounts are not by default enabled for encryption. Choose your KMS key to use before selecting Encrypt this volume under Encryption to secure the volumes.
  10. (Optional) Select Add tag in the Tags section, then input a tag key and value pair to add custom tags to the volume. 
  11. Select Create volumes.

To activate Multi-Attach for an AWS EBS volume after it has been created, employ any of the following methods.

Following creation, to make Multi-Attach available

  1. Go to link to access the AWS EC2 console.
  2. Select Volume in the menu bar.
  3. Click Action, Modify Volumes after selecting the volumes.
  4. Select Enable Multi-Attach under AWS EBS Multi-Attach.
  5. Select Modify.

Turn off Multi-Attach

Only when an IO2 volume is associated with no and over one instance can users deactivate Multi-Attach for that volume?

For io2 volumes, utilize one of the two strategies to deactivate Multi-Attach.

Following Creation, Multi-Attach Should Be Disabled

  1. Go to link to access the AWS EC2 console.
  2. Select Volume in the navigation window.
  3. Click Action, and Modify Volume after selecting the volumes.
  4. Select Enabling Multi-Attach on AWS EBS Multi-Attach.
  5. Select Modify.

Include a Volume with Instance

The Multi-Attach capable volumes are attached to an instance in the same manner as any other EBS volumes. 

Upon Termination, Delete

When the last attached instance is terminated and that instance is set up to destroy the volumes on termination, Multi-Attach configured volumes are erased on instances terminations. The volume's block device mappings option for the final associated instances governs the volume's remove-on-terminate behavior if the volume is connected to several instances with various delete-on-terminating options.

Activate or deactivate remove on termination for each of the instances that the volume is connected to guarantee consistent delete on termination performance.

Whenever a volume is associated with instances, the block device mapping's remove on terminate option is by default set to false. Change the block devices mapping to allow deletion on terminations for a Multi-Attach configured volume.

Activate deletes on terminations in the block devices map for each of the associated instances if you wish the volumes to be erased as they are terminated. Disable remove on terminating in the block devices map for each associated instance if you wish to maintain the volume after the attached instance has ended.

During the start or after it has already launched, you can change the instance delete on the terminations option. The options only apply to the volumes that are associated at launch if deletion on terminations is enabled or disabled during instance launch. A volume's delete on terminations action must be explicitly configured if it is attached to an instance after the start.

Just command prompt methods may be used to alter an instance delete on the terminations option.

To change an existent instance's delete on terminations settings

Put the DeleteOnTermination attribute in the —block-device-mapping option of the modify-instance-attribute function.

Monitor a Multi-Attach Enabled Volume

View the volume of a Multi-Attach capable device. The AWS CloudWatch Metrics for AWS EBS volume may be used to track a Multi-Attach enabled volume. 

Each of the associated instance data is combined. Metrics for certain associated instances cannot be watched.

Amazon CloudWatch metrics are statistical data that you may use to see, analyze, and set alarms about your volumes' operational performance.

Data is made accessible automatically in 1-minute increments at no cost.

When retrieving data from CloudWatch, you may determine the granularity of the delivered data by using a Period request option. This differs from the time period used to collect the data (1-minute periods). To guarantee that the supplied data is legitimate, we recommend that you include a period in your request that is equal to or larger than the collecting period.

The data may be obtained using the CloudWatch API or the Amazon EC2 GUI. The console reads raw data from the CloudWatch API and generates a series of graphs based on it. Depending on your requirements, you may want to use the API data or the graphs in the console.

Several metrics are sent to CloudWatch by Amazon Elastic Block Store (Amazon EBS). All Amazon EBS volume types provide 1-minute metrics to CloudWatch automatically, but only when the volume is associated with an instance.

The AWS/EBS namespace includes the metrics listed below for EBS volumes attached to all instance types.

Pricing and Billing

The use of Amazon EBS Multi-Attach does not incur any additional fees. The normal fees for Provisioned IOPS SSD (io1 and io2) volumes are applied to your account.

Utilizing Amazon EBS Multi-Attach volumes is free of extra fees. You are charged the typical fees for Provisioned IOPS SSD (io1) volumes.

Volume storage for EBS Provisioned IOPS SSD (io2 and io1) volumes is paid based on the quantity of storage provisioned in GB per month until the storage is released. With Provisioned IOPS SSD (io1 and io2) volumes, you are additionally paid by the number of IOPS (input/output operations per second) you provision every month.

Provisioned storage and IOPS for io1 and io2 volumes will be paid in per-second increments, with a minimum of 60 seconds.

Volume storage for EBS Provisioned IOPS SSD io2 volumes is paid based on the quantity of storage provisioned in GB per month until the storage is released. With Provisioned IOPS SSD io2 volumes, you are additionally paid by the number of IOPS (input/output operations per second) you provision every month. The provided IOPS costs are divided into tiers.

As a result, as you provide more IOPS on a single volume, the effective provisioned IOPS costs fall, making scaling IOPS on a single volume more cost-efficient. Provisioned storage and IOPS for io2 volumes will be paid in per-second increments, with a minimum of 60 seconds.

Assume you supply a 2,000 GB volume with 1,000 IOPS for 12 hours (43,200 seconds) in a 30-day month.

Conclusion

  • A one Provisioned IOPS SSD (io1 or io2) volume can be attached to numerous instances that are in the same AZ using EBS Multi-Attach.
  • An instance or collection of instances can have several Multi-Attach enabled volumes attached.
  • The shared disk is fully readable and writable from each instance with which it is associated.
  • In Linux clustered applications that handle concurrent writing operations, Multi-Attach enables greater application availability.
  • The restriction that only allows you to attach EBS volumes to one EC2 instance is overcome via AWS EBS Multi Attach.
  • Access to Cloud Volume ONTAP iSCSI LUNs by EC2 instances is not constrained to a particular AZ.
  • Only IOPS SSD (io) is supported by AWS EBS Multi-Attach.
  • A greater variety of instance types are supported by ONTAP, including EBS Provisioned IOPS SSD (io1), General Purpose SSD (gp2), Throughput Optimized HDD (st1), Cold HDD (sc1), and more.
  • Snapshots from Cloud Volumes ONTAP use less storage space than those from EBS.
  • By synchronously replicating data between Availability Zones, Cloud Volumes ONTAP provides high availability.