Add new comment

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Submitted by oarandes (registered user) on Tue, 2007-10-09 12:19.

"If you want to use sdb after the next reboot, you should change the following entry:
node.conn[0].startup = manual to automatic
in the /etc/iscsi/nodes/<iscsi target name>/<ip address> file. After you change it the iSCSI daemon will login to this target."

For those who try this Howto on a OpenSUSE 10.2 server:

I also needed to add a "sleep 30" instruction   to function iscsi_login_all_nodes() in order to successfully log in to the target.
this function can be found in the /etc/init.d/open-iscsi script and, after this addition should look like:

iscsi_login_all_nodes()
{
    sleep 30
    $ISCSIADM -m node 2> /dev/null | while read line; do
        set ${line}
        TARGET=$(echo $line | cut -d" " -f2)
        PORTAL=$(echo $line | cut -d"," -f1)
        STARTUP=`$ISCSIADM -m node --targetname $TARGET -p $PORTAL | grep "node.conn\[0\].startup" | cut -d' ' -f3`
        NODE=`$ISCSIADM -m node --targetname $TARGET -p $PORTAL | grep "node.name" | cut -d' ' -f3`
        if [ $STARTUP = "automatic" ] ; then
            echo -n "Logging into $NODE: "
            $ISCSIADM -m node --targetname $TARGET -p $PORTAL -l
            rc_status -v
        fi
    done
}
 

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.