I’m running a cold backup of my system using live media.
However, I noticed strange behavior.
I have booted Alma 8.x live media 50 times tries, the detection order never shifted.
Why does the SCSI ID and alphabetical order attach in the correct order only with the Alma 8.x kernel?
Environment:
ESXi 8 or Hyper-V (Win2022)
VM with 16 virtual disks
Test result:
Alma 8.x live media
Upon boot, the SCSI IDs and /dev/sdx are attached in the correct order.
[0.0.0.0] /dev/sda
[0.0.0.1] /dev/sdb
:
[0.0.0.15] /dev/sdo
Alma 9.x live media
Upon boot, the SCSI IDs and /dev/sdx are attached in a random order.
For example:
[0.0.0.0] /dev/sdc
[0.0.0.1] /dev/sdg
:
[0.0.0.15] /dev/sdk
Alma 10.x live media
Upon boot, the SCSI IDs and /dev/sdx are attached in a random order.
I have also tested other distributions.
Debian 12 or Debian 13
Upon boot, the SCSI IDs and /dev/sdx are attached in a random order.
Ubuntu 24.04
Upon boot, the SCSI IDs and /dev/sdx are attached in a random order.
Both Debians and the Ubuntu have some version 6 kernel.
The el9 has version 5 kernel and the el8 has version 4. (4.18.0-553.x).
It is totally possible that the older kernel enumerates differently,
but the practice to not trust – to assume random – the /dev/sdX names
did start way before el8.
Besides, getting tails 50 times in a row in coin toss does not prove that the toss is not random. 50 in row is rather unlikely though.
Thanks for your reply.
I installed script in Live Media and verified 600 times disk detection order .
In Alma 8.x, all SCSI IDs and alphabets were in the correct order.
I’ll try it on Oracle Linux 7.5 uek (kernel 4.14), which uses a similar kernel.
Creating live media with the UEK kernel for Oracle Linux 7 was a troublesome, so I tried it with Debian 10 (kernel 4.19).
As I guessed, I checked the disk detection order 500 times and all OK.
It seems the disk detection code has changed in kernel 5.
For us, disk detection was better in kernel 4.