| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-23-2012, 01:01 AM
|
#1
|
|
Member
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 652
Rep:
|
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
|
|
|
|
04-23-2012, 12:25 PM
|
#2
|
|
Member
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190
Rep:
|
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
|
|
|
|
04-23-2012, 04:19 PM
|
#3
|
|
Member
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 652
Original Poster
Rep:
|
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?
|
|
|
|
04-23-2012, 09:48 PM
|
#4
|
|
Member
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190
Rep:
|
Use NAME instead of SYMLINK in udev rules..
|
|
|
|
04-23-2012, 09:57 PM
|
#5
|
|
Member
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190
Rep:
|
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 ..
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:45 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|