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 01-10-2009, 06:51 AM   #1
kshitij_dixit
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Rep: Reputation: 0
udev doesn't update the links to scsi disks properly.


Hi All,

udev doesn't update the links to scsi disks properly after removing and
reinserting a disk, which means that disks can't be accessed automatically by using the same name.

However after removing one disk physically and reinserting it we have the links below, note that kernel name changes but it shouldn't be a problem with udev, but it's not working and doesn't create the link for /dev/sdc.

lrwxrwxrwx 1 root root 33 Jan 9 12:40 /dev/sdb ->
scsi/host0/bus0/target2/lun0/disc
lrwxrwxrwx 1 root root 34 Jan 9 12:40 /dev/sdb1 ->
scsi/host0/bus0/target2/lun0/part1
lrwxrwxrwx 1 root root 34 Jan 9 12:40 /dev/sdb2 ->
scsi/host0/bus0/target2/lun0/part2
brw-rw---- 1 root disk 8, 32 Jan 9 12:47 /dev/sdc
lrwxrwxrwx 1 root root 34 Jan 9 12:47 /dev/sdc1 ->
scsi/host0/bus0/target1/lun0/part1
lrwxrwxrwx 1 root root 34 Jan 9 12:47 /dev/sdc2 ->
scsi/host0/bus0/target1/lun0/part2

After some investigation I found that udev rule for sdc
doesn't match any of the rules in devfs.rules and related script never run.However partitions on the disks match and works fine.
rules for:-

/dev/sd[a-z] and /dev/sd[a-z][0-9]*
BUS="scsi", KERNEL="sd[a-z]",
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", NAME="%c{1}",
SYMLINK+="%k %c{2}"
BUS="scsi", KERNEL="sd[a-z][0-9]*",
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", NAME="%c{1}",
SYMLINK+="%k %c{2}"

First rule doesn't match when the disk is inserted. Interestingly, when the udev is restarted it works.Kernel reports the device name correctly but there is a problem with the BUS name. It works with partitions but not with the main disk. Assuming that we'll only have sd[a-z] names from scsi bus I removed the BUS="scsi" rule from the first rule and it's working flawlessly. i am not sure is removing BUS option right method or not? could any one please help me in solveing this issue.

Thanks

Last edited by kshitij_dixit; 01-10-2009 at 06:53 AM.
 
Old 01-13-2009, 07:26 AM   #2
kshitij_dixit
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
can any one plese help me in that as i dont know much about udev.
 
Old 01-13-2009, 08:34 AM   #3
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
I am not sure from your post if "it's working flawlessly", or there is still some sort of problem.
Anyway, this link http://www.reactivated.net/writing_udev_rules.html might help you understand the udev rule(s).
 
  


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
Starting udev fails ,kernel doesnt boot properly........ raklo Linux - Kernel 3 09-24-2007 12:20 AM
Unable to see new scsi disks surkude Suse/Novell 2 03-27-2007 12:42 PM
how to 'spin down' scsi disks ? dansawyer Linux - Hardware 2 02-03-2007 04:41 PM
cheep scsi disks berrance Linux - Hardware 0 12-06-2004 06:00 AM
dualbooting from two scsi disks till Linux - General 0 02-20-2001 03:29 AM


All times are GMT -5. The time now is 06:41 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration