LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   udev rule failing to create iscsi symlinks (https://www.linuxquestions.org/questions/linux-networking-3/udev-rule-failing-to-create-iscsi-symlinks-603155/)

patrarch 11-28-2007 10:12 PM

udev rule failing to create iscsi symlinks
 
Hello. I posted this initially in the newbies section, then realized maybe it belonged here instead.

Any udev gurus out there?

I have a udev rule that simply creates a symbolic link in /dev given an iscsi device:

BUS="scsi", SYSFS{vendor}="EQLOGIC ", PROGRAM="/root/devpath2alias %k %n", SYMLINK="%c"

I know this rule is valid because it works perfectly when I run 'udevstart' manually, but I want the rule to run at boot, which it does not.

To generate the link name, I have a script that uses iscsi-ls to retrieve the TARGET NAME of an iscsi connection at /dev/sd[whatever]. Again, it works great - but not at boot.

Looking at the boot log, I noticed that the device nodes (/dev/sd[whatever]) are created AFTER my rule is executed! That is,

...
Nov 28 20:37:25 pndtest1 udev[7773]: configured rule in '/etc/udev/rules.d/95-local.rules' at line 4 applied, added symlink '%c'
...
Nov 28 20:37:26 pndtest1 udev[5145]: creating device node '/dev/sde4'
...

Is it possible that my rule is failing because the device node has not been assigned yet? If so, what would be the correct rule to write then? If not, why in the world is this happening?


Many many thanks for any help you can give me.

patrarch

acid_kewpie 11-29-2007 01:41 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 05:34 AM.