Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-10-2009, 07:51 AM   #1
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 ->
lrwxrwxrwx 1 root root 34 Jan 9 12:40 /dev/sdb1 ->
lrwxrwxrwx 1 root root 34 Jan 9 12:40 /dev/sdb2 ->
brw-rw---- 1 root disk 8, 32 Jan 9 12:47 /dev/sdc
lrwxrwxrwx 1 root root 34 Jan 9 12:47 /dev/sdc1 ->
lrwxrwxrwx 1 root root 34 Jan 9 12:47 /dev/sdc2 ->

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/ %k %b %n", NAME="%c{1}",
SYMLINK+="%k %c{2}"
BUS="scsi", KERNEL="sd[a-z][0-9]*",
PROGRAM="/etc/udev/scripts/ %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.


Last edited by kshitij_dixit; 01-10-2009 at 07:53 AM.
Old 01-13-2009, 08:26 AM   #2
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, 09:34 AM   #3
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,087

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


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 01:20 AM
Unable to see new scsi disks surkude SUSE / openSUSE 2 03-27-2007 01:42 PM
how to 'spin down' scsi disks ? dansawyer Linux - Hardware 2 02-03-2007 05:41 PM
cheep scsi disks berrance Linux - Hardware 0 12-06-2004 07:00 AM
dualbooting from two scsi disks till Linux - General 0 02-20-2001 04:29 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:35 AM.

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