[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Stable NVMe block device names on AWS Nitro instances



Hi,

On AWS Nitro instances, EBS volumes are exposed as NVMe block devices by
the kernel on the /dev/nvme* paths.

The AWS documentation "Identifying the EBS Device" says that the Linux
kernel doesn't guarantee the creation order of these devices, as they
are discovered in the order the devices respond.

This creates a situation where you can start an instance with 2 (or
more) attached EBS and sometimes end up with the "root" EBS being named
/dev/nvme0n1 and the other one /dev/nvme1n1, sometimes the opposite.

(It's also even more confusing because the device names specified when
attaching the disks when creating the instance is also different...)

In its own Linux image, AWS apparently ships a set of udev rules + a
script to get these device names out of the information exposed by the
NVMe devices, which create appropriate symlinks in /dev towards each
/dev/nvme* devices.

This doesn't change the random detection order by the kernel, but this
provides a more stable interface to deal with instances containing
multiple disks.

I wonder if it would be possible to provide such a mechanism by default
in the official Debian AMI?
Is this type of cloud provider-specific configuration could be accepted?
(I guess that would make sense only for AWS images.)


Thanks,

 Jonathan


[1] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html#identify-nvme-ebs-device


Reply to: