Device Name on Instances console does not match "Filesystem" device name from "df -k" command


On the Instances console page, the EBS volume for the root device is reported to be: /dev/xvda

But, the "df -k" command from the instance itself is reporting: /dev/nvme0n1p1 (an NVMe) device.

$  df -k
Filesystem      1K-blocks     Used  Available Use% Mounted on
devtmpfs        193955196        0  193955196   0% /dev
tmpfs           193965976        0  193965976   0% /dev/shm
tmpfs           193965976      780  193965196   1% /run
tmpfs           193965976        0  193965976   0% /sys/fs/cgroup
/dev/nvme0n1p1 1048563692 26926468 1021637224   3% /
tmpfs            38793196        0   38793196   0% /run/user/1000

Is there something wrong? Shouldn't they match? I need to know what kind of device it is so I know which instructions to follow for extended the file system as I just finished resizing the volume. There are two different instructions on this page depending on if the device is XVD or NVMe:

Thanks, Al

1 Answer


You mention that the device name on the instance console does not match the “Filesystem” device name from the “df-k” command.

Well with that being said the process of attaching a volume to your instance, you include a device name for the volume. The name you have included is to be used by your EC2 instance. What assigns the actual volume name is the block device driver when mounting the volume. Note that the assigned name can be different from the name that your EC2 instance uses.

Therefore it is advisable to note the virtualisation type of your AMI because the recommended and available device names that you can use depends on the virtualisation type of your instance . With regards to NVMe EBS volumes the device name that you use in a block device mapping are renamed using NVMe device names (/dev/nvme[0-26]n1). The block device driver can assign NVMe device names in a different order than you specified for the volumes in the block device mapping. Also note that NVMe instance store volumes are automatically enumerated and assigned an NVMe device name.

References :

Linux Device Names: https:[1] //

answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions