Results 1 to 9 of 9
Hi All,
I am setting up iSCSI on Oracle Enterprise Linux.
After configuring the iscsi service, the symbolic link iscsi under the /dev folder is not created when the iscsi ...
- 05-03-2010 #1Just Joined!
- Join Date
- May 2010
- Posts
- 5
Error while configuring iscsi using udev
Hi All,
I am setting up iSCSI on Oracle Enterprise Linux.
After configuring the iscsi service, the symbolic link iscsi under the /dev folder is not created when the iscsi service is started.
Created the following UNIX shell script /etc/udev/scripts/iscsidev.sh on iscsi client node:
..............................................
#!/bin/sh
# FILE: /etc/udev/scripts/iscsidev.sh
BUS=${1}
HOST=${BUS%%:*}
[ -e /sys/class/iscsi_host ] || exit 1
file="/sys/class/iscsi_host/host${HOST}/device/session*/iscsi_session*/targetname"
target_name=$(cat ${file})
# This is not an open-scsi drive
if [ -z "${target_name}" ]; then
exit 1
fi
# Check if QNAP drive
check_qnap_target_name=${target_name%%:*}
if [ $check_qnap_target_name = "iqn.2004-04.com.qnap" ]; then
target_name=`echo "${target_name%.*}"`
fi
echo "${target_name##*.}"
..............................................
Following message is seen in the /var/log/messages:
May 2 17:10:44 rashida1 udevd-event[15897]: run_program: exec of program '/etc/udev/scripts/iscsidev.sh' failed
Please advice how I should proceed.
Regards,
Murtaza Doctor.
- 05-03-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Well, since the error log tells you what script failed, you can try running the script as root manually to see what errors it is generating. That would be the next step to take I think, assuming you cannot find the error output in any of the other log files.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 05-05-2010 #3Just Joined!
- Join Date
- May 2010
- Posts
- 5
Please find below the output of the script:
=========================================
[root@rashida1 scripts]# sh iscsidev.sh
cat: /sys/class/iscsi_host/host/device/session*/iscsi_session*/targetname: No such file or directory
[root@rashida1 scripts]# ls /sys/class/iscsi_host/host*
/sys/class/iscsi_host/host1:
device hwaddress initiatorname ipaddress netdev subsystem uevent
/sys/class/iscsi_host/host2:
device hwaddress initiatorname ipaddress netdev subsystem uevent
[root@rashida1 scripts]# sh iscsidev.sh 1
crs1
[root@rashida1 scripts]# sh iscsidev.sh 2
data1
[root@rashida1 scripts]#
========================================
- 05-06-2010 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Well, the salient line of your output is this:
This indicates that you probably need to supply a target file name to the script.cat: /sys/class/iscsi_host/host/device/session*/iscsi_session*/targetname: No such file or directorySometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 05-07-2010 #5Just Joined!
- Join Date
- May 2010
- Posts
- 5
If I supply an argument to the script, it returns proper result as shown below:
=============================
[root@rashida1 scripts]# sh iscsidev.sh 1
crs1
[root@rashida1 scripts]# sh iscsidev.sh 2
data1
=============================
But this input/argument value is supposed to be passed internally to the udev daemon. And its value will keep on varying.
Rgds,
Murtaza.
- 05-07-2010 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Well, I'm out of ideas. I am running CentOS 5.4 (functionally the same as Oracle Enterprise Linux) and have no such problems. I think you are just going to have to keep digging into the problem. Just a quick question - did you write the iscsdev.sh script, or was that either part of the package or created by the service installation process?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 05-08-2010 #7Just Joined!
- Join Date
- May 2010
- Posts
- 5
- 05-08-2010 #8Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Ah. You didn't mention that this was part of the Oracle RAC setup - a process that is often associated with the tearing of hair, gnashing of teeth, and sacrifice of first-born to ancient gods... Now I understand.
Unfortunately, my last "fun" experience with installing RAC was on an Itanium HPUX cluster about 6 years ago, so I am pretty much out of ideas here. I would suggest Oracle support or their FAQ pages and user forums for better help on this.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 05-09-2010 #9Just Joined!
- Join Date
- May 2010
- Posts
- 5


Reply With Quote
