Re: iSCSI persistent device naming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, it works fine with the below configuration on RHEL4...

#cat /etc/udev/rules.d/55-iscsi.rules


KERNEL="sd[a-z]*", BUS="scsi", PROGRAM="/etc/udev/scripts/iscsi.sh
%b",SYMLINK="iscsi/%c/part%n"



#cat /etc/udev/scripts/iscsi.sh


#!/bin/sh

# FILE: /etc/udev/scripts/iscsi.sh

BUS=${1}
HOST=${BUS%%:*}

[ -e /sys/class/iscsi_host ] || exit 1

#file="/sys/class/iscsi_host/host${HOST}/device/session*/iscsi_session*/targetname"
file="/sys/class/iscsi_transport/target${HOST}:0:0/target_name"

target_name=$(cat ${file})

# This is not an open-scsi drive
if [ -z "${target_name}" ]; then
   exit 1
fi

echo "${target_name##*.}"
#echo "${target_name}" 
-- 
View this message in context: http://old.nabble.com/iSCSI-persistent-device-naming-tp6774978p27659406.html
Sent from the linux-iscsi-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
linux-iscsi-users mailing list
linux-iscsi-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/linux-iscsi-users

[Index of Archives]     [IP Storage]     [IETF]     [Linux SCSI]     [Yosemite News]     [IETF Announcements]     [IETF Discussion]

  Powered by Linux