Attach an EBS volume to multiple EC2 instances using Multi-Attach
Amazon EBS Multi-Attach enables you to attach a single Provisioned IOPS SSD (io2, io1) or
Provisioned IOPS Adaptive SSD (io2a) volume to multiple instances that are in the
same Availability Zone. You can attach multiple
Multi-Attach enabled volumes to an instance or set of instances. 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 applications that
manage concurrent write operations.
Pricing and billing
There are no additional charges for using Amazon EBS Multi-Attach. You are billed the
standard charges that apply to Provisioned IOPS SSD (io1, io2, and io2a) volumes. For more
information, see Amazon EBS pricing
Contents
Considerations and limitations
-
Multi-Attach enabled volumes can be attached to up to 16 instances built on the Nitro System that are in the same Availability Zone.
-
Linux instances support Multi-Attach enabled
io1,io2, andio2avolumes. Windows instances support Multi-Attach enabledio2andio2avolumes only. -
The maximum number of Amazon EBS volumes that you can attach to an instance depends on the instance type and instance size. For more information, see instance volume limits.
-
Multi-Attach is supported exclusively on Provisioned IOPS (io2, io1) and Provisioned IOPS Adaptive (io2a) SSD volumes.
-
Multi-Attach availability by Region:
-
Multi-Attach for
io1volumes is available in all Regions that supportio1. -
Multi-Attach for
io2volumes is available in all Regions that supportio2. -
Multi-Attach for
io2avolumes is available in all Regions that supportio2a.
NoteFor better performance, latency consistency, and durability at lower cost through its pay for used storage tiered billing model, we recommend that you use
io2avolumes. -
-
Standard file systems, such as XFS and EXT4, are not designed to be accessed simultaneously by multiple servers, such as EC2 instances. You should use a clustered file system to make sure that your data is resilient and reliable for your production workloads.
-
Multi-Attach enabled
io1,io2, andio2avolumes support I/O fencing. I/O fencing protocols control write access in a shared storage environment to maintain data consistency. Your applications must provide write ordering for the attached instances to maintain data consistency. For more information, see Use NVMe reservations with Multi-Attach enabled Amazon EBS volumes. -
TRIM commands (NVMe Dataset Management deallocate) modify volume data in the same way as write operations and are subject to the same write ordering and I/O fencing requirements. For more information, see Use NVMe reservations with Multi-Attach enabled Amazon EBS volumes.
-
Multi-Attach enabled volumes can't be created as boot volumes.
-
On a Multi-Attach volume, each instance's attachment has its own
TrimState, which reflects the volume'sTrimOnAttachvalue when that attachment was made and doesn't change for the life of the attachment. For more information, see Amazon EBS volumes TRIM support. -
Multi-Attach enabled volumes can be attached to one block device mapping per instance.
-
Multi-Attach can't be enabled during instance launch using either the Amazon EC2 console or RunInstances API.
-
Multi-Attach enabled volumes that have an issue at the Amazon EBS infrastructure layer are unavailable to all attached instances. Issues at the Amazon EC2 or networking layer might impact only some attached instances.
-
The following table shows volume modification support for Multi-Attach enabled
io1,io2, andio2avolumes after creation.io2avolumesio2volumesio1volumesModify volume type ✓ Yes ** ✓ Yes ** ✓ Yes ** Modify volume size ✓ Yes ✓ Yes ✓ Yes Modify provisioned IOPS ✓ Yes ✓ Yes ✓ Yes Enable Multi-Attach ✓ Yes * ✓ Yes * ✓ Yes * Disable Multi-Attach ✓ Yes * ✓ Yes * ✓ Yes * * You can't enable or disable Multi-Attach while the volume is attached to an instance.
** Volume type modification for Multi-Attach enabled volumes is supported only between
io1,io2, andio2a, in either direction, including while the volume is attached. Other volume type changes are not supported. -
Multi-Attach enabled volumes are deleted on instance termination if the last attached instance is terminated and if that instance is configured to delete the volume on termination. If the volume is attached to multiple instances that have different delete on termination settings in their volume block device mappings, the last attached instance's block device mapping setting determines the delete on termination behavior.
To ensure predictable delete on termination behavior, enable or disable delete on termination for all of the instances to which the volume is attached. For more information, see Preserve data when an instance is terminated.
-
You can monitor a Multi-Attach enabled volume using the CloudWatch Metrics for Amazon EBS volumes. Data is aggregated across all of the attached instances. You can't monitor metrics for individual attached instances. For more information, see Amazon CloudWatch metrics for Amazon EBS.