LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-28-2007, 10:08 PM   #1
patrarch
LQ Newbie
 
Registered: Nov 2007
Posts: 2

Rep: Reputation: 0
udev rule failing to create iscsi symlinks!


Hello. 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
 
Old 11-29-2007, 03:42 PM   #2
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
No Udev guru here but did you refer to the guide?
http://reactivated.net/writing_udev_rules.html

Also it may be a typo but I see a _space_ at the end of
Code:
SYSFS{vendor}="EQLOGIC "
May be that's causing you problems..
 
Old 10-21-2021, 01:01 PM   #3
datadesigner
LQ Newbie
 
Registered: Oct 2021
Posts: 1

Rep: Reputation: Disabled
Here's how I do that...

I see this is an ancient post but its still an issue that comes up from time to time...so... In RHEL 7, I identify the iSCSI disks using their UUID. This must fire at the appropriate time because it consistently works. It creates aliases in a oracleasm directory under /dev (which is a nice way to keep them organized away from the other devices, IMHO) and sets up the ownership and permissions. Hope this helps others...

KERNEL=="sd*1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="360014054087765d0ea44fa8ba672b084", OWNER="oracle", GROUP="dba", MODE="0660", SYMLINK+="oracleasm/asm-grid-disk1-dc3"

Last edited by datadesigner; 10-21-2021 at 01:03 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Udev Rule Help Please Toods Slackware 1 11-23-2007 08:55 AM
what udev rule to create /dev/inet/tcp? bbeers Slackware 2 02-21-2007 04:55 PM
need help with udev rule hussam Linux - Software 2 12-05-2006 03:30 AM
udev complains about symlinks binarybob0001 Linux - Software 6 10-16-2006 08:00 PM
How to manage hard disk partitions symlinks in udev? linx win Debian 1 01-11-2006 04:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration