I am having a weird issue with lsblk and my nvme devices. This occurs on CentOS 7.7, 7.8, 8.2
On first boot after installation the devices are ordered as expected under lsbk
[root@pqclient-1-127 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 1.8T 0 disk
├─nvme0n1p1 259:2 0 600M 0 part /boot/efi
├─nvme0n1p2 259:3 0 1G 0 part /boot
└─nvme0n1p3 259:4 0 1.8T 0 part
├─cl-root 253:0 0 50G 0 lvm /
├─cl-swap 253:1 0 4G 0 lvm [SWAP]
└─cl-home 253:2 0 1.8T 0 lvm /home
nvme1n1 259:1 0 1.8T 0 disk
After reboot nvme1n1 (2nd NVMe device) gets changed to 259:0 and nvme0n1 (first NVMe device) is changed to 259:1
[root@pqclient-1-127 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme1n1 259:0 0 1.8T 0 disk
nvme0n1 259:1 0 1.8T 0 disk
├─nvme0n1p1 259:2 0 600M 0 part /boot/efi
├─nvme0n1p2 259:3 0 1G 0 part /boot
└─nvme0n1p3 259:4 0 1.8T 0 part
├─cl-root 253:0 0 50G 0 lvm /
├─cl-swap 253:1 0 4G 0 lvm [SWAP]
└─cl-home 253:2 0 1.8T 0 lvm /home
I suspect some kind of hardware issue but does anyone have any ideas?
Numbering of Linux
nvme*
orsd*
devices is not stable, the order has no particular guarantee. Storage systems may have race conditions in how they are discovered, or the physical paths to devices may change.Persistent device names are available as various symlinks under
/dev/disk/by*
Or, you are using LVM. You can see volumes by name with LVM tools, like
pvs; vgs; lvs;
Doesn't show non-LVM boot partitions, or major/minor numbers, but those are not always important for what you are trying to do.