I am quite new to Linux and have been trying to scour the internet for days for the answer to this question.
I am trying to create a udev rule for a specific sata port on my motherboard, so that when a disk is inserted (regardless of what it is) into a hot swap tray, it will be mounted in the same place. I have three of these drives and would like each to create a symbolic link to drive1, drive2 and drive3 respectively.
I have used udevadm to discover the kernel value for the scsi host, but this appears to change from time to time when the system is rebooted. However older versions of linux appear to keep this number (e.g. 5:0:0:0) a constant.
This is a bit annoying as if it changes I need to update the rules with the new kernels value.
I was wondering if there was a way to either:
a) stop this from happening
b) use a different value in the rule which will identify the port
I have seen something about the command scsi_id, but I am not sure whether this will work for a port...