Hi,
I’ve bought an Intel NUC515RYH. It’s now having an internal m.2 sata ssd (500GB) and a 2.5 Zoll sata hdd (2TB).
When I first installed Nixos, the ssd was on /dev/sda and the hdd on /dev/sdb
A few reboots later it’s reversed (ssd = /dev/sdb, hdd = /dev/sda)
Yeah, the system works (I’m using fileSystems entries with /dev/disk/by-label/…) but I do want to get back the old behavior^^
So I’ve added this to configuration.nix:
services.udev = {
extraRules = ''
# Seagate SpinPoint M9T 2TB SATA HDD
KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="ST2000LM003 HN-M", SYMLINK+="sdb%n"
# Crucial MX500 500GB m.2 SATA SSD
KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="CT500MX500SSD4", SYMLINK+="sda%n"
'';
};
When I use
nixos-rebuild switch
it adds these entries to the 99-local.rules file but when I reboot both drives still use the reversed /dev/sda|b names.
Are my rules just executed too late by the udev service and if this should be the case, how can I let them be executed earlier in the process?