System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with UDEV for Serviceguard

cerosunos
Occasional Contributor

Problem with UDEV for Serviceguard

Hi all,

We use UDEV rules to secures the Locklun in Serviceguard.
The OS version is: Red Hat Linux 4 Update 4.

I found the LUN ID with the command:
# scsi_id -g -u -s /block/sdX
All work great, previously I changed /etc/scsi_id.config and put options=-g so I could reescan the LUN ID of my MSA1000 attached to my hosts.

Then I've created this rule:
BUS="scsi", KERNEL="sd*", PROGRAM="/sbin/scsi_id", RESULT="", NAME="%k", SYMLINK="locklun%n"

But nothing append when I tried #udevtest /block/sda
I noticed this message in /var/log/messages:
scsi_id[20631]: DEVPATH is not set

Another UDEV rules had this lines:
KERNEL="sd*[0-9]", PROGRAM="/sbin/scsi_id", SYMLINK="disk/by-id/scsi-%c-part%n"

KERNEL="sd*", PROGRAM="/sbin/path_id", SYMLINK="disk/by-path/%c"

Only second rule works well, and create something like /dev/disk/by-path/....

Anybody knows the problem? Our UDEV rule works great over another few customers; nothing has changed but here didn’t work.
2 REPLIES
Ragu_3
Trusted Contributor

Re: Problem with UDEV for Serviceguard

>> Anybody knows the problem? Our UDEV rule works great over another

What is the kernel version? Check whether MAKEDEV is installed, create the /dev node for the scsi device manually.


Debian GNU/Linux for the Enterprise! Ask HP ...
cerosunos
Occasional Contributor

Re: Problem with UDEV for Serviceguard

Finally we hade to create an script to call in the PROGRAM,something like this.

scsi_id_hp script:
#!/bin/bash
SCSI_ID="/sbin/scsi_id -g -u -s"
DEV=`echo $1 | sed -e 's/[0-9]//g'`
CMD="${SCSI_ID} /block/${DEV}"
#echo $CMD
RESULT=`${CMD}`
echo $RESULT

In the udev rule (PROGRAM parameter):
PROGRAM="/etc/udev/rules.d/scsi_id_hp %k",

We couldn't update the udev RPM and we couldn't do anything more, nothing works for this udev rule without the script.

This was the kernel:
2.6.9-42.ELsmp (x86_64)