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

0

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: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html

Thanks, Al

AJ
已提問 2 年前檢視次數 824 次
1 個回答
0

Hello!

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] //docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html#device-name-limits

Antonio
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南