Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    udev rule, sata host appears to change

    Hi All,

    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...

    Many Thanks

  2. #2
    What about the DEVNAME parameter (e.g., /dev/sdb), can you use that in your udev rule? Or does that sometimes change, too?

  3. #3
    Hi atreyu, sorry for the lare reply.

    The /dev/sdb parameter seems to be dependant on the order that the disks are put in and if a 'space' say sdc becomes available, the next disk would be mounted there.

    I am not sure whether it was a Kernel problem which has been corrected as I was using fc12 but ubuntu 11.04 seems to be ok... I know that the older version of udev (or kernel) has no problems keeping the same host.

    Although I am not sure for definate yet.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts