LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   RHEL6 - UDEV naming override (http://www.linuxquestions.org/questions/linux-server-73/rhel6-udev-naming-override-941229/)

chakkerz 04-23-2012 02:01 AM

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!

em31amit 04-23-2012 01:25 PM

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

chakkerz 04-23-2012 05:19 PM

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?

em31amit 04-23-2012 10:48 PM

Use NAME instead of SYMLINK in udev rules..

em31amit 04-23-2012 10:57 PM

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 ..


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