|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
This section describes how to attach an Amazon EBS volume that you created to an instance.
The following table lists the available device names on Amazon EC2. You can specify these names when attaching a volume to a running instance or when attaching a volume when launching an instance using a block device mapping. The block device driver for the instance assigns the actual volume names when mounting the volumes, and these names can be different than the names that Amazon EC2 recommends. For more information about the instance store, see Amazon EC2 Instance Store. For information about the root device storage, see Amazon EC2 Root Device Volume.
|Instance Type||Possible for Connection||Reserved for Root||Instance Store Volumes||Recommended for EBS Connection|
Linux / Unix (paravirtual)
|Linux / Unix (HVM)||
Differs by AMI
/dev/sda1 or /dev/xvda
/dev/sd[b-y] (for hs1.8xlarge instances)
xvdc[a-x] (for hs1.8xlarge instances)
xvd[f-p] (with Red Hat PV drivers)
xvd[f-z] (with Citrix PV drivers)
For Linux/Unix instance types, we've received reports that some custom kernels might have restrictions that limit use to /dev/sd[f-p] or /dev/sd[f-p][1-6]. If you're having trouble using /dev/sd[q-z] or /dev/sd[q-z][1-6], try switching to /dev/sd[f-p] or /dev/sd[f-p][1-6].
You cannot attach volumes that share the same device letters both with and without trailing digits. For example, if you attach a volume as /dev/sdc and another volume as /dev/sdc1, only /dev/sdc will be visible to the instance. If you wish use trailing digits in device names, you must use trailing digits on all device names that share the same base letters.
Depending on the block device driver of your instance's kernel, the device may be
attached with a different name than what you specify. For example, if you specify a device
/dev/sdh, your device may be renamed
/dev/hdh by the kernel; in some
cases, even the trailing letter may also change (where
/dev/xvde). Amazon Linux AMIs create a symbolic link from the renamed
device path to the name you specify, but other AMIs may behave differently.
Hardware virtual machine (HVM) AMIs (such as the base Windows and Cluster Compute images)
do not support the use of trailing numbers on device names
xvd[a-p][1-15]). You can view the virtualization type of your instance
on the Virtualization field of the instance's details pane.
Depending on the size of your instance, Amazon EC2 provides instance store volumes on sd[b-e] (on Linux/Unix) or xvd[a-e]. Although you can connect your Amazon EBS volumes using these device names, we highly recommend that you don't because the behavior can be unpredictable.
An Amazon EC2 Windows AMI comes with an additional service installed, the Ec2Config
Service. The Ec2Config service runs as a local system and performs various
functions to prepare an instance when it first boots up. After the devices have been mapped
with the drives, the Ec2Config service then initializes and mounts the drives. The root
drive is initialized and mounted as
c:\. The instance stores that comes
attached to the instance are initialized and mounted as
and so on. By default, when an Amazon EBS volume is attached to a Windows instance, it may show
up as any drive letter on the instance. You can change the settings of the Ec2Config service
to set the drive letters of the Amazon EBS volumes per your specifications. For more information,
see Using Ec2Config in the
Amazon Elastic Compute Cloud Microsoft Windows Guide.
To attach an Amazon EBS volume to an instance using the console
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
Click Volumes in the navigation pane.
The console displays a list of current volumes.
Select a volume and click Attach Volume.
The Attach Volume dialog box appears.
In the Instance box, start typing the name or ID of the instance to attach the volume to, and select it from the list of suggestion options (only instances in the same Availability Zone as the volume are displayed).
Enter a device name in the Device box, or verify that the suggested device name is suitable.
Click Attach to attach the volume to the instance. The volume and instance must be in the same Availability Zone.
Windows instances use either Red Hat or Citrix paravirtual (PV) drivers. If your Windows instance is using Citrix PV drivers, you can attach up to a total of 25 Amazon EBS volumes using the Amazon EC2 CLI; Windows instances with Red Hat PV drivers are limited to 16 volumes. Regardless of which drivers you are using, you can attach up to 16 Amazon EBS volumes using the Amazon EC2 console. To upgrade your Windows instance from Red Hat to Citrix paravirtual drivers, see Upgrading Your PV Drivers on Your Windows AMI.
Although it is technically possible to attach more than 25 volumes to a Windows instance with Citrix PV drivers, this is likely to cause performance issues and is not recommended.
If you want to push an Amazon S3 object to an Amazon EBS volume, follow the procedure above to attach the volume, then use a data transfer application (such as FTP/SFTP or SCP) on your running instance to transfer the data.
If a volume has an AWS Marketplace product code:
The volume can only be attached to the root device of a stopped instance.
You must be subscribed to the AWS Marketplace code that is on the volume.
The configuration (instance type, operating system) of the instance must support that specific AWS Marketplace code. For example, you cannot take a volume from a Windows instance and attach it to a Linux instance.
AWS Marketplace product codes are copied from the volume to the instance.