Storage Controller initialisation order

Jun 8, 2016
344
69
68
47
Johannesburg, South Africa
We have a 3 x Intel S2600WTTR systems where the storage controllers are initialised out of order, resulting in the discs being associated out of order:
/dev/sda - disk 5
/dev/sdb - disk 6
/dev/sdc - disk 1
/dev/sdd - disk 2
/dev/sde - disk 3
/dev/sdf - disk 4

We previously addressed something similar on RedHat Linux by changing the order of 'alias scsi_hostadapter' lines in /etc/modules.conf but Proxmox is Debian based so I'm a little lost as to where start looking. The storage adapters are also both the same (AHCI mode).

Could someone kindly point me at something which could assist? Reviewing 'dmesg' output reveals the primary AHCI controller being at 'ahci 0000:00:1f.2' and the secondary controller being at 'ahci 0000:00:11.4'.

PS: I assume subsequent sd* assignments are based on active ports of controllers, in the order the controllers are intialised.
 
We have a service desk who would need to assist with replacing drives on the systems, in the event of a failure. We would like to keep it as standard and straightforward as possible, in that /dev/sda correlates to the first disc in the system when reviewing eg /cat/proc/mdstat or Ceph OSDs.

I suppose I'm essentially hoping to find something similar to the process of renaming network interfaces via systemd:
ie: udevadm info /sys/class/net/eth2, record 'MATCHADDR' MAC address, then ensure /etc/udev/rules.d is empty and create the following:
/etc/systemd/network/10-eth0.link
[Match]
MACAddress=00:1e:67:fd:06:bc

[Link]
Name=eth0
 
The Debian wiki has information regarding persistent device names but it's unfortunately not possible to rename kernel device. Could anyone possibly provide guidance on blacklisting the ahci driver and then specifically loading it for 1f.2 ahead of 11.4?

What I tried with udev:
udevadm info --query=property --name=/dev/sda
DEVNAME=/dev/sda
DEVPATH=/devices/pci0000:00/0000:00:11.4/ata1/host0/target0:0:0/0:0:0:0/block/sda
DEVTYPE=disk
MAJOR=8
MINOR=0
SUBSYSTEM=block
TAGS=:systemd:
USEC_INITIALIZED=348317
/etc/udev/rules.d/60-persistent-storage.rules
KERNEL=="sd?", SUBSYSTEM=="block", DEVPATH=="*1f.2/ata5/host*", SYMLINK+="slot1", GOTO="END_20_PERSISTENT_DISK"
KERNEL=="sd?", SUBSYSTEM=="block", DEVPATH=="*1f.2/ata6/host*", SYMLINK+="slot2", GOTO="END_20_PERSISTENT_DISK"
KERNEL=="sd?", SUBSYSTEM=="block", DEVPATH=="*1f.2/ata7/host*", SYMLINK+="slot3", GOTO="END_20_PERSISTENT_DISK"
KERNEL=="sd?", SUBSYSTEM=="block", DEVPATH=="*1f.2/ata8/host*", SYMLINK+="slot4", GOTO="END_20_PERSISTENT_DISK"
KERNEL=="sd?", SUBSYSTEM=="block", DEVPATH=="*11.4/ata1/host*", SYMLINK+="slot5", GOTO="END_20_PERSISTENT_DISK"
KERNEL=="sd?", SUBSYSTEM=="block", DEVPATH=="*11.4/ata2/host*", SYMLINK+="slot6", GOTO="END_20_PERSISTENT_DISK"
KERNEL=="sd?", SUBSYSTEM=="block", DEVPATH=="*11.4/ata3/host*", SYMLINK+="slot7", GOTO="END_20_PERSISTENT_DISK"
KERNEL=="sd?", SUBSYSTEM=="block", DEVPATH=="*11.4/ata4/host*", SYMLINK+="slot8", GOTO="END_20_PERSISTENT_DISK"
LABEL="END_20_PERSISTENT_DISK"
udevadm test /devices/pci0000:00/0000:00:11.4/ata1/host0/target0:0:0/0:0:0:0/block/sda
creating link '/dev/slot5' to '/dev/sda'

Replacing 'SYMLINK+="slot1"' with 'NAME="sda"' yields the following error when performing the udevadm test or reviewing 'journalctl' after restarting:
NAME="sda" ignored, kernel device nodes can not be renamed; please fix it in /etc/udev/rules.d/60-persistent-storage.rules
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!