Find the answer to your Linux question:
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 ...
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    5

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

  2. #2
    Linux Guru Rubberman's Avatar
    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!

  3. #3
    Just Joined!
    Join Date
    May 2010
    Posts
    5
    Quote Originally Posted by Rubberman View Post
    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.
    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]#
    ========================================

  4. #4
    Linux Guru Rubberman's Avatar
    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:
    cat: /sys/class/iscsi_host/host/device/session*/iscsi_session*/targetname: No such file or directory
    This indicates that you probably need to supply a target file name to the script.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    May 2010
    Posts
    5
    Quote Originally Posted by Rubberman View Post
    Well, the salient line of your output is this:

    This indicates that you probably need to supply a target file name to the script.
    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.

  6. #6
    Linux Guru Rubberman's Avatar
    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!

  7. #7
    Just Joined!
    Join Date
    May 2010
    Posts
    5
    Quote Originally Posted by Rubberman View Post
    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?
    Well, I have not written the iscsidev.sh script. It was posted as part of the document describing setting up of Oracle RAC using ISCSI by Jeff Hunter. Anyways, I will try to debug it and hope that the udev will behave the way it is supposed to..

  8. #8
    Linux Guru Rubberman's Avatar
    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!

  9. #9
    Just Joined!
    Join Date
    May 2010
    Posts
    5
    Quote Originally Posted by Rubberman View Post
    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.
    Thanks for the guidance provided.

    Regards,
    Murtaza.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...