Root volumes for your Amazon EC2 instances
When you launch an instance, we create a root volume for the instance. The root volume contains the image used to boot the instance. Each instance has a single root volume. You can add storage volumes to your instances during or after launch.
The AMI that you use to launch an instance determines the type of root volume. You can launch an instance from either an Amazon EBS-backed AMI (Linux and Windows instances) or an instance store-backed AMI (Linux instances only). There are significant differences between what you can do with each type of AMI. For more information about these differences, see Root device type.
We recommend that you use AMIs backed by Amazon EBS, because these instances launch faster and use persistent storage.
We reserve specific device names for root volumes. For more information, see Device names for volumes on Amazon EC2 instances.
Contents
Amazon EBS-backed instances
Instances that use Amazon EBS for the root volume automatically have an Amazon EBS volume attached. When you launch an Amazon EBS-backed instance, we create an Amazon EBS volume for each Amazon EBS snapshot referenced by the AMI you use. You can optionally use other Amazon EBS volumes or instance store volumes, depending on the instance type.
An Amazon EBS-backed instance can be stopped and later restarted without affecting data stored in the attached volumes. There are various instance– and volume-related tasks you can do when an Amazon EBS-backed instance is in a stopped state. For example, you can modify the properties of the instance, change its size, or update the kernel it is using, or you can attach your root volume to a different running instance for debugging or any other purpose. For more information, see Amazon EBS volumes.
![Root volume and other Amazon EBS volumes of an Amazon EBS-backed instance](/images/AWSEC2/latest/UserGuide/images/ebs_backed_instance.png)
Limitation
You can't use st1
or sc1
EBS volumes as root volumes.
Instance failure
If an Amazon EBS-backed instance fails, you can restore your session by following one of these methods:
-
Stop and then start again (try this method first).
-
Automatically snapshot all relevant volumes and create a new AMI. For more information, see Create an Amazon EBS-backed AMI.
-
Attach the volume to the new instance by following these steps:
-
Create a snapshot of the root volume.
-
Register a new AMI using the snapshot.
-
Launch a new instance from the new AMI.
-
Detach the remaining Amazon EBS volumes from the old instance.
-
Reattach the Amazon EBS volumes to the new instance.
-
Instance store-backed instances (Linux instances only)
Note
Windows instances do not support instance-store backed root volumes.
Instances that use instance stores for the root volume automatically have one or more instance store volumes available, with one volume serving as the root volume. When an instance is launched, the image that is used to boot the instance is copied to the root volume. Note that you can optionally use additional instance store volumes, depending on the instance type.
Any data on the instance store volumes persists as long as the instance is running, but this data is deleted when the instance is terminated (instance store-backed instances do not support the Stop action) or if it fails (such as if an underlying drive has issues). For more information, see Instance store temporary block storage for EC2 instances.
![Root volume on an Amazon EC2 instance store-backed instance](/images/AWSEC2/latest/UserGuide/images/instance_store_backed_instance.png)
Supported instance types
Only the following instance types support an instance store volume as the root volume: C1, C3, D2, I2, M1, M2, M3, R3, and X1.
Instance failure
After an instance store-backed instance fails or terminates, it cannot be restored. If you plan to use Amazon EC2 instance store-backed instances, we highly recommend that you distribute the data on your instance stores across multiple Availability Zones. You should also back up critical data from your instance store volumes to persistent storage on a regular basis.