Reminder: Linux disk device names are not persistent or predictable
Repeat with me:
Linux disk device names are not persistent or predictable
These two Red Hat KCS notes provide lots of information:
-
https://access.redhat.com/solutions/3962551 - How to make disk letter /dev/sdX more likely to be consistent at each reboot
-
https://access.redhat.com/solutions/2975361#RHEL9_ASYNC - How are custom persistent names assigned for SCSI devices using udev in Red Hat Enterprise Linux 7 and later kernels?
... but TLDR: disk under /dev/sd*
and /dev/vd*
are not persistent nor
guaranteed to be predictable in any newer kernel version.
DO:
- Rely on filesystem's UUID for
/etc/fstab
mount settings (seeblkid
) - Use persistent names like: DM multipath, LVM device names, kernel persistent names (
/dev/disk-by-*
), or udev-assigned custom names.
DO NOT:
- Try to create names in the
/dev/sd*
namespace. - Try to ensure
/dev/sd*
are consisent across machines, or even reboots of the same machine. They won't be. - Try to implement kernel or module options, they will fail.
If you find any software that tries to impose any logic into the /dev/sd*
namespace, that software is buggy and must be rewritten accordingly.
Happy hacking!