LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-23-2012, 01:01 AM   #1
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
RHEL6 - UDEV naming override


Hello there

I have a server with a bunch of attached SCSI disks (direct attached from an enclosure), and a bunch of internal, RAID'ed disks. The OS, keeps naming my internal disks /dev/sdt and /dev/sds ; when I would really prefer them to be /dev/sda and /dev/sdb .

How do I get it to override whatever udev (i assume it's udev anyway) has decided because the following:

Code:
[root@qss1 rules.d]# cat 75-localdisks.rules 
ACTION=="add", KERNEL=="sd*", SYSFS{serial}=="3600605b0042f6b30ff000220209236b3", NAME="sdb"
ACTION=="add", KERNEL=="sd*", SYSFS{serial}=="3600605b0042f6b30ff00021f20914b46", NAME="sda"
[root@qss1 rules.d]#
... seems to be getting overridden what is in /lib/udev which I'm not sure I should touch.
Google so far hasn't helped, and neither have the RHEL course notes on how to configure storage :S

This is on RHEL6.2 ;

Any help would be appreciated!

Last edited by chakkerz; 04-23-2012 at 01:02 AM. Reason: OS Version
 
Old 04-23-2012, 12:25 PM   #2
em31amit
Member
 
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190

Rep: Reputation: 55
Collect the SCSI Worldwide ID (WWID) for each device. The command must execute using the device node name, not the mount point of the device. For example, when performing operations against SCSI disk "sdb" Use '/block/sdb' not '/sys/block/sdb'.

# scsi_id -g -u -s /block/sdb SCSIID_54321afdec

Add an instance of the following line to the rules file (/etc/udev/rules.d/rulesfile) for each device. Substitute the SCSI WWID collected in above step

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="<scsi_id>", SYMLINK+="<your_disk_name>%n"

Note that When udev creates the symlink to the device the partition number will be appended to the end.

Test the configuration for each device:

# udevtest /block/sdb

Once the configuration has been tested and verified, reinitialize UDEV with the following command:

# start_udev
 
Old 04-23-2012, 04:19 PM   #3
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Original Poster
Rep: Reputation: 32
Hello there Amit

No, see apart from that not relating to RHEL6, that would create a new symlink for the devices that have already been named. I'm after naming the original device to that the current /dev/sds really is /dev/sda and not something that gives me a /dev/<something>/<something else>/sda

Any other thoughts?
 
Old 04-23-2012, 09:48 PM   #4
em31amit
Member
 
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190

Rep: Reputation: 55
Use NAME instead of SYMLINK in udev rules..
 
Old 04-23-2012, 09:57 PM   #5
em31amit
Member
 
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190

Rep: Reputation: 55
As far as I understand you would like to change device sds to sda on reboot and want to make it static persistent. And do not want to create symlink of device. Try to use NAME option in udev rules ..
 
  


Reply

Tags
udev, udev rules


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
Naming problem with udev zkab Debian 2 03-08-2012 03:25 AM
Help on naming iscsi devices with udev TheR_ Linux - Server 1 09-09-2009 07:46 AM
Hotswap and udev persisten naming Thure Linux - Server 3 01-26-2009 06:41 AM
Changing UDEV persistent naming schemes orbit Slackware 5 04-21-2008 09:22 PM
mail server the naming naming convention problem kashan Linux - Newbie 0 07-16-2004 02:08 PM


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

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