Issue
0 Hey I have a question regarding AWS EC2 instance store.
I understand that EC2 instance store volume cannot be unmounted from an instance once we create it, according to this document "You can't detach an instance store volume from one instance and attach it to a different instance." Link : https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html
Does that mean, the ec2 instance volume is fixed to only 1 instance when we create it? is there no way to unmount that instance store volume?
If it is not fixed can we attach the instance store to an instance in a different AZ?
Not sure im understanding this correctly, hoping to get some answers on this.!
I tried looking at all the public docs available in AWS and open source data along with YT videos, but do not seem to find a clear explanation on this>!
Solution
In the AWS datacenter, there are racks of EC2 servers. Each of these servers is called a host.
The host contains CPU, RAM, disk drives, networking, and perhaps GPUs. The host is divided into instances, each with a subset of that CPU, RAM, disk, etc.
Here's some information from Amazon EC2 Instance Types - Amazon Web Services:
It is showing that the Host contains 128 vCPUs, 1024GiB RAM, 8 x 3750 GB storage
. This is shown in the metal
instance size, which means the 'whole host'.
AWS then divides this Host into multiple instances. For example, if the Host is configured to provide i4i.4xlarge
instances, it can provision 8 of these instances, each with 16 vCPUs, 128GiB RAM, 3750GB storage
.
The SSD disks used for storage are inside the host computer itself, as opposed to Amazon EBS Volumes that are network-attached storage (like a SAN). This is why it is not possible to detach/attach an Instance Store volume -- it's because it is only connected to the one host computer and is not network-accessible. When you stop one of these instances, the contents of the disk is (effectively) erased because it needs to be used by the next instance that is launched on that host computer. So, Instance Store only persists as long as an instance is Running. (It survives Reboots, but not a Stop/Start.)
Amazon EBS Volumes can be detached/attached to other instances because they are network-attached. However, they can only connect to instances in the same Availability Zone (Data Center) because they would be too slow operating between AZs/Data Centers.
To compare these storage options with your own computer at home:
- Instance Store is like the disk inside your computer
- EBS Volumes are like the
H:
drive on your computer, which connects to a network file server
(You could think of EBS volumes being like USB drives that you connect to your computer, but they are much more flexible. For example, they can change size and speed because they are not tied to a specific piece of hardware.)
Answered By - John Rotenstein Answer Checked By - David Goodson (WPSolving Volunteer)