Is there capacity within amazon/centos/linux to switch the ordering round of nitro disks?
I have an ami which consistently has devices in the incorrect order, by this I mean nvme1n1 and nvme2n1 should be switched round. If I run nvme id-ctrl -v /dev/nvme1n1 | grep sn
I get a different serial number back following a reboot. I know they’re "wrong" as the serial numbers are not reflective of their capacity… Hope that makes sense (I appreciate it’s a bit confusing). This only ever occurs on servers with two or more disks; upon a reboot the disks are "correct"
My question is, is there a method of forcing the nvme device to disconnect and reconnect (in the hope that the mapping works as expected in the correct order).
Thanks guys
2
Answers
Very simple in the end:
Amazon Linux version 2017.09.01 and later contains scripts and a udev rule that automatically maps NVMe devices to
/dev/xvd?
. It is very briefly mentioned in the documentation, but there is not much information there.You can obtain a copy by launching the Amazon Linux AMI, but there are also other places on the web where they have been posted. For example, I found this gist.