Sample Header Ad - 728x90

How to force drives to be on a predictable device name

12 votes
1 answer
1003 views
I have a computer, running Debian 12, that is equipped with 2 RDX (from dead Tandberg / Overland company) cartridge drives. One is an internal SATA, and one is an external USB. They are cartridge drives. That means that they can be without a cartridge inserted. Maybe because of that, the drives are not always assigned to the same device node. For example, if both have a cartridge, the SATA one is on sdb, and the second on sdc. If the SATA is empty and I reboot, the drive will be sdb and the SATA on sdc. The device have been swapped. I want to be sure they will always be at the same device, regardless of the fact they have a drive inserted or not. I guess I need to write a custom udev rule, but I am not sure on how to do so. I already have a udev rule to make it execute some action on drive cartridge insertion: KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="usb", ATTRS{vendor}=="TANDBERG", ACTION=="add", RUN+="/bin/systemctl start rdx_mount@%k.service" KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="scsi", ATTRS{vendor}=="TANDBERG", ACTION=="add", RUN+="/bin/systemctl start rdx_mount@%k.service" KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="usb", ATTRS{vendor}=="TANDBERG", ACTION=="remove", RUN+="/bin/systemctl stop rdx_mount@%k.service" KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="scsi", ATTRS{vendor}=="TANDBERG", ACTION=="remove", RUN+="/bin/systemctl stop rdx_mount@%k.service" Keeping these rules working, how can I force each drive on a predictable device?
Asked by iXô (327 rep)
Jul 19, 2025, 07:40 PM
Last activity: Jul 25, 2025, 12:59 PM