I attached an existing Amazon Elastic Block Store (Amazon EBS) volume to my Amazon Elastic Compute Cloud (Amazon EC2) instance. It failed with a message saying "vol-xxx is already attached to an instance."
Short description
Specific Amazon EC2 instance types require Scalable Reliable Datagram (SRD) to give you the benefit of high Amazon EBS performance. The SRD-capable instances include the following types:
- C6a
- C6in
- C7g
- Inf2
- M6a
- M6in
- M6idn
- M7g
- R5b
- R6a
- R6in
- R6idn
- R7g
- Trn1
- Trn1n
- X2idn
- X2iedn
SRD is a reliable, high performance, lower-latency network transport protocol that is designed specifically for AWS.
Resolution
When you attach an existing Amazon EBS volume to an instance type that requires SRD for the first time, Amazon EBS modifies the volume. Amazon EBS moves it to an SRD-capable infrastructure. There can only be one modification operation on the same volume at a time. If your volume is undergoing a modification during an attempt to attach the volume, the attempt to move the volume to the SRD-capable infrastructure fails.
When an existing EBS volume fails to attach to the SRD-capable instance, a notification is sent to your account's Personal Health Dashboard (PHD). This notification provides details about the operational activity that is required to move the EBS volume to the SRD-capable infrastructure.
Note: R5b.8xlarge is used in the following example.
If you initiated the existing modification, then the following notification appears:
r5b.8xlarge is an SRD capable instance. In order to give you the benefit of the performance of an r5b.8xlarge
instance, we have to move your volume to SRD capable
infrastructure via the modifyVolume process. We are unable
to perform the modification operation at this time because
your volume is already undergoing modification. You can track
the progress of the current modification via the
describe-volume-modifications API. Once the modification is
completed you can attach the volume to the instance r5b.8xlarge.
If you urgently need to access data from this volume, please
attach it to any instance family other than C6a, C6in, C7g, Inf2, M6a,
M6in, M6idn, M7g, R5b, R6a, R6in, R6idn, R7g, Trn1, Trn1n, X2idn, and X2iedn.
If Amazon EBS initiated the existing modification, then the following notification appears:
r5b.8xlarge is an SRD capable instance. In order to give you the benefit of the performance of an r5b.8xlarge instance, we have
to move your volume to SRD capable infrastructure via the modifyVolume
process. We are unable to perform the modification operation at this
time because of an operational activity being performed by EBS on the
server hosting your volume. Your volume is in a healthy and fully
redundant state. We will send an update as soon as the operational
activity is complete. You can then attach the volume to the instance
r5b.8xlarge. This operational activity may last for up to 48 hrs.
If you urgently need to access data from this volume, please attach
it to any instance family other than C6a, C6in, C7g, Inf2, M6a, M6in,
M6idn, M7g, R5b, R6a, R6in, R6idn, R7g, Trn1, Trn1n, X2idn, and X2iedn.
To view your accounts PHD notices, see Your account events.
The modification operational activity might last up to 48 hours. You can wait until the original volume modification is complete, then attach the EBS volume to the SRD-capable instance again.
If you must access data from your EBS volume, then attach the volume to an instance type other than what's listed in the PHD notification. After modification is complete, attach the EBS volume to your R5b instance.
Related information
In the search for performance, there's more than one way to build a network
Amazon EC2 instance types