The udev tool is included in RHEL 4 and SLES 9 SP1 and can be configured to provide persistent
names for SCSI drives.

- SLES 9

On SLES 9 SP1, udev is configured by default to create persistent device names for each disk and
partition in the /dev/disk/by-id directory. These names are symbolic links to the current /dev/sd block
device. The names are derived from information retrieved from the disk itself and will therefore follow the
disk even if it's /dev/sd name changes. For example:

sles9:/ # ls -l /dev/disk/by-id
total 8
drwxr-xr-x 2 root root 4096 Mar 3 21:33 .
drwxr-xr-x 4 root root 4096 Feb 10 08:49 .
lrwxrwxrwx 1 root root 9 Mar 3 21:11 32000000c5005d6e4 -> ../../sdb
lrwxrwxrwx 1 root root 9 Mar 3 21:11 32000000c5005df9d -> ../../sdc
lrwxrwxrwx 1 root root 9 Mar 3 21:11 32000000c5005dfae -> ../../sdd
lrwxrwxrwx 1 root root 10 Mar 3 21:33 32000000c5005dfae1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Mar 3 21:33 32000000c5005dfae2 -> ../../sdd2
In this example, only the third disk (sdd) has partitions. As partitions are added and removed, udev
creates and deletes the corresponding soft links.



- RHEL 4
udev can be configured to create persistent names on RHEL 4. To do this, first create a file called 20-
local.rules in the /etc/udev/rules.d directory containing just the following line:

KERNEL="sd*", BUS="scsi", PROGRAM="/sbin/scsi_id", SYMLINK="disk-%c%n"

The exact name of the file is not important, but it must start with a number lower than 50 to override the
default rules file.

- Enable scsi_id

(For RHEL only. SLES does not require this step.) The scsi_id utility generates unique identifiers for
SCSI devices. udev uses these identifiers to create a persistent name for devices under /dev. By default
scsi_id is disabled.

Method 1: enable scsi_id for all devices

You can enable scsi_id by making the following changes to /etc/scsi_id.conf:
Change:
options=-b
To:
## options=-b

And change:
## options=-g
Driver for Linux - Configuration Section Page 20
To:
options=-g


Method 2: enable scsi_id for particular devices, such as all disks made by Seagate, by adding this line to
/etc/scsi_id:
vendor=SEAGATE, options=-g

Then load or reload the lpfc driver. udev creates symbolic links for each SCSI disk and its partitions. For
example:
rhel4:/ # ls -l /dev/disk*
lrwxrwxrwx 1 root root 3 Mar 7 00:06 /dev/disk-32000000c507985c4 -> sdb
lrwxrwxrwx 1 root root 3 Mar 7 00:06 /dev/disk-32000000c50797d92 -> sdc
lrwxrwxrwx 1 root root 4 Mar 7 00:06 /dev/disk-32000000c50797d921 -> sdc1
lrwxrwxrwx 1 root root 3 Mar 7 00:06 /dev/disk-32000000c507985bb -> sdd
lrwxrwxrwx 1 root root 4 Mar 7 00:06 /dev/disk-32000000c507985bb1 -> sdd1
lrwxrwxrwx 1 root root 4 Mar 7 00:06 /dev/disk-32000000c507985bb2 -> sdd2
For further information about udev, consult the following resources:
udev Web Page: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
"Kernel Korner - udev-Persistent Device Naming in User Space" Linux Journal article by Greg Kroah-
Hartman
http://www.linuxjournal.com/article.php?sid=7316
"Writing udev rules" by Daniel Drake
http://www.reactivated.net/writing_udev_rules.html

+ Recent posts