Device Naming on Linux Instances
When you attach a volume to your instance, you include a device name for the volume. This device name is used by Amazon EC2. The block device driver for the instance assigns the actual volume name when mounting the volume, and the name assigned can be different from the name that Amazon EC2 uses.
For information about device names on Windows instances, see Device Naming on Windows Instances in the Amazon EC2 User Guide for Microsoft Windows Instances.
Available Device Names
The following table lists the available device names for Linux instances. The number of volumes that you can attach to your instance is determined by the operating system. For more information, see Instance Volume Limits.
| Virtualization Type | Available | Reserved for Root | Used for Instance Store Volumes | Recommended for EBS Volumes |
|---|---|---|---|---|
|
Paravirtual |
/dev/sd[a-z] /dev/sd[a-z][1-15] /dev/hd[a-z] /dev/hd[a-z][1-15] |
/dev/sda1 |
/dev/sd[b-e] /dev/sd[b-y] (hs1.8xlarge) |
/dev/sd[f-p] /dev/sd[f-p][1-6] |
| HVM |
/dev/sd[a-z] /dev/xvd[b-c][a-z] |
Differs by AMI* /dev/sda1 or /dev/xvda |
/dev/sd[b-e] /dev/sd[b-y] (hs1.8xlarge) /dev/sd[b-i] (i2.8xlarge) |
/dev/sd[f-p] |
Note that you can determine the root device name for your particular AMI with the following AWS CLI command:
aws ec2 describe-images --image-ids image_id --query Images[].RootDeviceNameFor more information about instance store volumes, see Amazon EC2 Instance Store. For information about the root device storage, see Amazon EC2 Root Device Volume.
Device Name Considerations
Keep the following in mind when selecting a device name:
Although you can attach your EBS volumes using the device names used to attach instance store volumes, we strongly recommend that you don't because the behavior can be unpredictable.
Depending on the block device driver of the kernel, the device might be attached with a different name than what you specify. For example, if you specify a device name of
/dev/sdh, your device might be renamed/dev/xvdhor/dev/hdhby the kernel; in most cases, the trailing letter remains the same. In some versions of Red Hat Enterprise Linux (and its variants, such as CentOS), even the trailing letter might also change (where/dev/sdacould become/dev/xvde). In these cases, each device name trailing letter is incremented the same number of times. For example,/dev/sdbwould become/dev/xvdfand/dev/sdcwould become/dev/xvdg. Amazon Linux AMIs create a symbolic link with the name you specify at launch that points to the renamed device path, but other AMIs might behave differently.There are two types of virtualization available for Linux instances: paravirtual (PV) and hardware virtual machine (HVM). The virtualization type of an instance is determined by the AMI used to launch the instance. Some instance types support both PV and HVM, some support HVM only, and others support PV only. Be sure to note the virtualization type of your AMI, because the recommended and available device names that you can use depend on the virtualization type of your instance. For more information, see Linux AMI Virtualization Types.
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/sdcand another volume as/dev/sdc1, only/dev/sdcis visible to the instance. To use trailing digits in device names, you must use trailing digits on all device names that share the same base letters (such as/dev/sdc1,/dev/sdc2,/dev/sdc3).Hardware virtual machine (HVM) AMIs don't support the use of trailing numbers on device names.
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].

