# Rocky linux 9.3 nvme device order changes every reboot

**URL:** <https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-9\
**Created:** [February 20, 2024, 3:16am UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926 "2024-02-20T03:16:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dadf](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dadf](https://forums.rockylinux.org/u/dadf)\
**Post date:** [February 20, 2024, 3:16am UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/1 "2024-02-20T03:16:37Z")

</div>

I faced the following problems.

1. Installing 10 U.2 Type nvme
2. ROCKY Linux 9.3 Installation / Kernel Version 5.14.0-362.18.1.e19\_3.x86\_64
3. nvme device order changes with each reboot
4. In ROCKY LINUX 9.2 / Kernel version 5.14.0-284.11.el9\_2.x86\_64, the order of nvme devices is fixed without any settings

Settings and Rules

1. udevadm, udev rule not available
2. Disable the aspm option in the BIOS
3. After rebooting from nvmebay 0 to 9, there should be no change in the order of the devices in the nvmelist.
4. Disable SR-IOV
5. UUID not available

I know uuid or udev is a realistic solution, but the customer says it’s difficult to use and manage, so I’m looking for other ways, but it’s still not resolved, so I’m posting a question.

I’ve tried applying a number of kernel options to help with the order nvme list twist issue, but the symptoms don’t improve

I ask for your help.  
Thank you.

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [February 20, 2024, 6:33am UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/2 "2024-02-20T06:33:41Z")

</div>

Since for a while now, mounting partitions in `/etc/fstab` uses `UUID=` which solves problems when disk ordering changes. Obviously if they are using `/dev/nvmexxxx` in fstab then this will be a problem. Which is why since a long time now, it’s been preferred to mount disks in fstab via UUID.

Can we ask what exactly is the problem that the disk ordering changes? Because if fstab is configured correctly, the system will **always** boot when UUID’s are being used and in such a situation the device ordering change is purely cosmetic. So I’m curious as to what the problem actually is?

---

<div class="post-metadata">

**Author:** ![dadf](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dadf](https://forums.rockylinux.org/u/dadf)\
**Post date:** [February 20, 2024, 6:41am UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/3 "2024-02-20T06:41:14Z")

</div>

Hi iwalker

Thank you for your response.

Except for nvme0n1 with OS installed, the rest of the nvme has not created partitions and is not registered in fstab.

The values in the nvmelist command must remain constant after the reboot.

This is the customer’s testing process.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [February 20, 2024, 8:07am UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/4 "2024-02-20T08:07:31Z")

</div>

> [@dadf](#):
>
> This is the customer’s testing process.

That is their mistake.

Names, like sda and eth0 are assigned during device enumeration on boot. They are not persistent. An observation “were always same in the past” is pure _bad luck_. One can roll Nat-20 many times in the row.

The filesystem UUID, LVM, RAID, MAC address, and some others are identifiers stored in the devices. They are persistent. The question is, do those blank devices have any?

Do run:

```auto
ls -l /dev/disk/by-*/

```

If that output contains any persistent id’s, then tell the customer to use those.

* * *

If issue seems to be that random order is random, then solution is not necessarily to enforce arbitrary order, but to find the least inconvenient way to live in chaos.

---

<div class="post-metadata">

**Author:** ![ssoto](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/ssoto/32/3395_2.png) [@ssoto](https://forums.rockylinux.org/u/ssoto)\
**Post date:** [February 22, 2024, 7:39pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/6 "2024-02-22T19:39:37Z")

</div>

You might want to look at the `nvme-cli` package from there you can do `nvme id-ctrl -v /dev/nvmeNNNN` to gather information about the disk. It might help you perform whatever task you are trying to do.

I use it for doing packer builds where i need to partition drives in AWS where i want to map the NVME device name to what amazon lists as their device name

---

<div class="post-metadata">

**Author:** ![nouvo09](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/nouvo09/32/2920_2.png) [@nouvo09](https://forums.rockylinux.org/u/nouvo09)\
**Post date:** [February 24, 2024, 1:33pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/7 "2024-02-24T13:33:19Z")

</div>

And why don’t you just use the “label” option ? It is reliable and very simple to use.  
Available also in grub2 cmds

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [February 24, 2024, 6:18pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/8 "2024-02-24T18:18:11Z")

</div>

> [@nouvo09](#):
>
> And why don’t you just use the “label” option ?

Even though I forgot that from the list it does not change anything. Label and UUID are both properties of a filesystem. The OP does not have filesystem on the block devices. Not even partition table to get _partition UUID_.

---

<div class="post-metadata">

**Author:** ![nouvo09](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/nouvo09/32/2920_2.png) [@nouvo09](https://forums.rockylinux.org/u/nouvo09)\
**Post date:** [February 24, 2024, 6:38pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/9 "2024-02-24T18:38:28Z")

</div>

I don’t think so. If grub sees the labels, no os is yet launched.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [February 24, 2024, 10:00pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/10 "2024-02-24T22:00:27Z")

</div>

What “labels”? The grub can clearly search by _filesystem labels_, but it can’t find those from blank drives.

---

<div class="post-metadata">

**Author:** ![nouvo09](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/nouvo09/32/2920_2.png) [@nouvo09](https://forums.rockylinux.org/u/nouvo09)\
**Post date:** [February 25, 2024, 8:52am UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/11 "2024-02-25T08:52:20Z")

</div>

And what are we discussing about ?  
If the disk is blank, there is no need to call it in anyway. UUID, /dev/ or label or something else (don’t know what it could be)  
And if you create a parttition it is given an UUID and you can label it and use it.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [February 25, 2024, 3:11pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/12 "2024-02-25T15:11:24Z")

</div>

I do agree with that logic.

> [@nouvo09](#):
>
> what are we discussing about ?

That you have to ask from @dadf

---

<div class="post-metadata">

**Author:** ![dadf](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dadf](https://forums.rockylinux.org/u/dadf)\
**Post date:** [February 26, 2024, 6:53am UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/13 "2024-02-26T06:53:49Z")

</div>

Thank you for your many answers to solve the problem.

The above is not applicable due to circumstances.

I don’t understand, but I can’t help it. I’ll just shut down this case.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [April 26, 2024, 6:54am UTC](https://forums.rockylinux.org/t/rocky-linux-9-3-nvme-device-order-changes-every-reboot/12926/14 "2024-04-26T06:54:27Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
