Can we attach an EBS volume to more than one EC2 instan…

Can we attach an EBS volume to more than one EC2 instance at the same time?

Can we attach an EBS volume to more than one EC2 instance at the same time?

A.
No

B.
Yes.

C.
Only EC2-optimized EBS volumes.

D.
Only in read mode.



Leave a Reply 5

Your email address will not be published. Required fields are marked *


Mohammed Faisal Siddique

Mohammed Faisal Siddique

You can attach an EBS volume to one of your instances that is in the same Availability Zone as the volume. If it is not in the same availability zone you cannot. The questions does not talk about the locations of EC2 instances.

hippo

hippo

Nobody mentions the location of the instances or the volumes. The problem is general and resides in the ability to attach one EBS volume to more than one instance, which is a service constraint, not geographical or whatever else.

leo

leo

Even if you were able to get an EBS volume attached to more than one instance, it would be a _REALLY_BAD_IDEA_. To quote Kekoa, “this is like using a hard drive in two computers at once”

Why is this a bad idea? … The reason you can’t attach a volume to more than one instance is that EBS provides a “block storage” abstraction upon which customers run a filesystem like ext2/ext3/etc. Most of these filesystems (eg, ext2/3, FAT, NTFS, etc) are written assuming they have exclusive access to the block device. Two instances accessing the same filesystem would almost certainly end in tears and data corruption.

hippo

hippo

No offense, but your explanation shows general lack of understanding of the storage domain. Yes, ext/fat/ntfs lack the support for shared ownership and asynchronous writes to the same volume, but there’re file systems that do, like NFS,CFS, etc. You could even get an NTFS volume and create a CSV on-top of it for multi-master writes. Also whoever kekoa is, seems they have little if any understanding of modern enterprise SAN solutions too. EBS is mirrored across multiple SAN appliances and does NOT reside on a single hard drive somewhere, as you obviously think. Check out the docs before you write BS in comments….

SebLIU

SebLIU

An EBS volume can be attached to only one instance at a time