From: Michael P. D. <MP...@Ac...> - 2009-07-27 15:02:55
|
Hi, during testing of OSR in an iSCSI setup, the iSCSI-Target (HP Lefthand) has problems caused by using the same Initiatorname on every node. Here is a patch that uses an extended rootsource syntax for setting an node-specific Initiatorname. The syntax used is: <rootsource name="iscsi://<target-ip>:<port>/<Initiatorname>"/> Currently this could be CentOS/RHEL specific as the file /etc/iscsi/initiatorname.iscsi is written. The patch is against the beta repo. I hope this could be usefull for someone else. Br, Michael --- iscsi-lib.sh-orig 2009-07-22 12:15:15.000000000 +0200 +++ iscsi-lib.sh 2009-07-22 12:15:01.000000000 +0200 @@ -34,6 +34,25 @@ iscsiparser1="iscsi://([^:/]+)" iscsiparser2="iscsi://([^:]+):([[:digit:]]+)/" iscsiparser3="^iscsi" +iscsiparser4="iscsi://([^:]+):([[:digit:]]+)/(.+)" + + +#****f* iscsi-lib.sh/getISCSIInitiatorFromParam +# NAME +# getISCSIInitiatorFromParam +# SYNOPSIS +# function getISCSIInitiatorServerFromParam { +# MODIFICATION HISTORY +# IDEAS +# SOURCE +# +function getISCSIInitiatorFromParam { + echo $1 | awk ' +{ + match($1, "'$iscsiparser4'", iscsiparms); + print iscsiparms[3]; +}' +} #****f* iscsi-lib.sh/getISCSIServerFromParam # NAME @@ -133,7 +152,13 @@ local nodename=$2 local iscsiserver=$(getISCSIServerFromParam $rootsource) local iscsimodules="iscsi_tcp" + local iscsiinitiatorname=$(getISCSIInitiatorFromParam $rootsource) echo_local -n "Starting iscsid" + + if [ -n "$iscsiinitiatorname" ]; then + echo "InitiatorName=$iscsiinitiatorname" >/etc/iscsi/initiatorname.iscsi + echo_local -n "Initiatorname is $iscsiinitiatorname" + fi modprobe -q iscsi_tcp modprobe -q ib_iser exec_local iscsid Actebis Peacock GmbH, Sitz der Gesellschaft Soest, HRB 8075, Amtsgericht Arnsberg, Geschäftsführer: Klaus Hellmich, Bärbel Schmidt, Dr. Ralf Retzko |
From: Gordan B. <go...@bo...> - 2009-07-27 15:23:30
|
Is this something specific to the HP SAN iSCSI initiator software trying to be too smart by half in checking initiators? I don't remember having any problems connecting to iSCSI shares with the shared config between all nodes on RHEL5 using the distro supplied iSCSI tools. Gordan On Mon, 27 Jul 2009 16:42:16 +0200, "Michael Peus, DE" <MP...@Ac...> wrote: > Hi, > > during testing of OSR in an iSCSI setup, the iSCSI-Target (HP Lefthand) > has problems caused by > using the same Initiatorname on every node. > Here is a patch that uses an extended rootsource syntax for setting an > node-specific Initiatorname. > The syntax used is: <rootsource > name="iscsi://<target-ip>:<port>/<Initiatorname>"/> > > Currently this could be CentOS/RHEL specific as the file > /etc/iscsi/initiatorname.iscsi is written. > The patch is against the beta repo. > > I hope this could be usefull for someone else. > > Br, > Michael > > --- iscsi-lib.sh-orig 2009-07-22 12:15:15.000000000 +0200 > +++ iscsi-lib.sh 2009-07-22 12:15:01.000000000 +0200 > @@ -34,6 +34,25 @@ > iscsiparser1="iscsi://([^:/]+)" > iscsiparser2="iscsi://([^:]+):([[:digit:]]+)/" > iscsiparser3="^iscsi" > +iscsiparser4="iscsi://([^:]+):([[:digit:]]+)/(.+)" > + > + > +#****f* iscsi-lib.sh/getISCSIInitiatorFromParam > +# NAME > +# getISCSIInitiatorFromParam > +# SYNOPSIS > +# function getISCSIInitiatorServerFromParam { > +# MODIFICATION HISTORY > +# IDEAS > +# SOURCE > +# > +function getISCSIInitiatorFromParam { > + echo $1 | awk ' > +{ > + match($1, "'$iscsiparser4'", iscsiparms); > + print iscsiparms[3]; > +}' > +} > > #****f* iscsi-lib.sh/getISCSIServerFromParam > # NAME > @@ -133,7 +152,13 @@ > local nodename=$2 > local iscsiserver=$(getISCSIServerFromParam $rootsource) > local iscsimodules="iscsi_tcp" > + local iscsiinitiatorname=$(getISCSIInitiatorFromParam > $rootsource) > echo_local -n "Starting iscsid" > + > + if [ -n "$iscsiinitiatorname" ]; then > + echo "InitiatorName=$iscsiinitiatorname" >>/etc/iscsi/initiatorname.iscsi > + echo_local -n "Initiatorname is $iscsiinitiatorname" > + fi > modprobe -q iscsi_tcp > modprobe -q ib_iser > exec_local iscsid > > Actebis Peacock GmbH, Sitz der Gesellschaft Soest, HRB 8075, Amtsgericht > Arnsberg, Geschäftsführer: Klaus Hellmich, Bärbel Schmidt, Dr. Ralf Retzko > > > ------------------------------------------------------------------------------ > _______________________________________________ > Open-sharedroot-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/open-sharedroot-devel |
From: Michael P. <MP...@Ac...> - 2009-07-27 17:55:00
|
Hi Gordan, it's the target that causes problems not the initiator. I have also checked against an OpenFiler based target without problems using the same Intitatorname on every Clusternode. Nevertheless, using different Initiatornames feels "more right" to me. Perhaps the iSCSI Spec. helps here? I don't know. Br, Michael -----Ursprüngliche Nachricht----- Von: Gordan Bobic [mailto:go...@bo...] Gesendet: Mo 27.07.2009 17:23 An: ope...@li... Betreff: Re: [OSR-devel] Setting the iSCSI Initiatorname Is this something specific to the HP SAN iSCSI initiator software trying to be too smart by half in checking initiators? I don't remember having any problems connecting to iSCSI shares with the shared config between all nodes on RHEL5 using the distro supplied iSCSI tools. Gordan On Mon, 27 Jul 2009 16:42:16 +0200, "Michael Peus, DE" <MP...@Ac...> wrote: > Hi, > > during testing of OSR in an iSCSI setup, the iSCSI-Target (HP Lefthand) > has problems caused by > using the same Initiatorname on every node. > Here is a patch that uses an extended rootsource syntax for setting an > node-specific Initiatorname. > The syntax used is: <rootsource > name="iscsi://<target-ip>:<port>/<Initiatorname>"/> > > Currently this could be CentOS/RHEL specific as the file > /etc/iscsi/initiatorname.iscsi is written. > The patch is against the beta repo. > > I hope this could be usefull for someone else. > > Br, > Michael > > --- iscsi-lib.sh-orig 2009-07-22 12:15:15.000000000 +0200 > +++ iscsi-lib.sh 2009-07-22 12:15:01.000000000 +0200 > @@ -34,6 +34,25 @@ > iscsiparser1="iscsi://([^:/]+)" > iscsiparser2="iscsi://([^:]+):([[:digit:]]+)/" > iscsiparser3="^iscsi" > +iscsiparser4="iscsi://([^:]+):([[:digit:]]+)/(.+)" > + > + > +#****f* iscsi-lib.sh/getISCSIInitiatorFromParam > +# NAME > +# getISCSIInitiatorFromParam > +# SYNOPSIS > +# function getISCSIInitiatorServerFromParam { > +# MODIFICATION HISTORY > +# IDEAS > +# SOURCE > +# > +function getISCSIInitiatorFromParam { > + echo $1 | awk ' > +{ > + match($1, "'$iscsiparser4'", iscsiparms); > + print iscsiparms[3]; > +}' > +} > > #****f* iscsi-lib.sh/getISCSIServerFromParam > # NAME > @@ -133,7 +152,13 @@ > local nodename=$2 > local iscsiserver=$(getISCSIServerFromParam $rootsource) > local iscsimodules="iscsi_tcp" > + local iscsiinitiatorname=$(getISCSIInitiatorFromParam > $rootsource) > echo_local -n "Starting iscsid" > + > + if [ -n "$iscsiinitiatorname" ]; then > + echo "InitiatorName=$iscsiinitiatorname" >>/etc/iscsi/initiatorname.iscsi > + echo_local -n "Initiatorname is $iscsiinitiatorname" > + fi > modprobe -q iscsi_tcp > modprobe -q ib_iser > exec_local iscsid > > Actebis Peacock GmbH, Sitz der Gesellschaft Soest, HRB 8075, Amtsgericht > Arnsberg, Geschäftsführer: Klaus Hellmich, Bärbel Schmidt, Dr. Ralf Retzko > > > ------------------------------------------------------------------------------ > _______________________________________________ > Open-sharedroot-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/open-sharedroot-devel ------------------------------------------------------------------------------ _______________________________________________ Open-sharedroot-devel mailing list Ope...@li... https://lists.sourceforge.net/lists/listinfo/open-sharedroot-devel |
From: Marc G. <gr...@at...> - 2009-07-28 09:17:34
|
Hi Gordan, Michael, @Michael: could you please sent this patch as attachement? for me this looks like a general problem that could be not only related to the lefthand storage. Although I didn't have problems using iscsi at least this patch makes life with iscsi more configurable. Besides as the iscsi-url we are using is and was never conforming to any standard I'll go with this and push it upstream. And it does no look like it would influence the standard behaviour in any way. Regards and Thanks Marc. On Monday 27 July 2009 19:54:09 Michael Peus wrote: > Hi Gordan, > > it's the target that causes problems not the initiator. I have also checked > against an OpenFiler based target without problems using the same > Intitatorname on every Clusternode. Nevertheless, using different > Initiatornames feels "more right" to me. Perhaps the iSCSI Spec. helps > here? I don't know. > > Br, > Michael > > > -----Ursprüngliche Nachricht----- > Von: Gordan Bobic [mailto:go...@bo...] > Gesendet: Mo 27.07.2009 17:23 > An: ope...@li... > Betreff: Re: [OSR-devel] Setting the iSCSI Initiatorname > > Is this something specific to the HP SAN iSCSI initiator software trying to > be too smart by half in checking initiators? I don't remember having any > problems connecting to iSCSI shares with the shared config between all > nodes on RHEL5 using the distro supplied iSCSI tools. > > Gordan > > On Mon, 27 Jul 2009 16:42:16 +0200, "Michael Peus, DE" <MP...@Ac...> > > wrote: > > Hi, > > > > during testing of OSR in an iSCSI setup, the iSCSI-Target (HP Lefthand) > > has problems caused by > > using the same Initiatorname on every node. > > Here is a patch that uses an extended rootsource syntax for setting an > > node-specific Initiatorname. > > The syntax used is: <rootsource > > name="iscsi://<target-ip>:<port>/<Initiatorname>"/> > > > > Currently this could be CentOS/RHEL specific as the file > > /etc/iscsi/initiatorname.iscsi is written. > > The patch is against the beta repo. > > > > I hope this could be usefull for someone else. > > > > Br, > > Michael > > > > --- iscsi-lib.sh-orig 2009-07-22 12:15:15.000000000 +0200 > > +++ iscsi-lib.sh 2009-07-22 12:15:01.000000000 +0200 > > @@ -34,6 +34,25 @@ > > iscsiparser1="iscsi://([^:/]+)" > > iscsiparser2="iscsi://([^:]+):([[:digit:]]+)/" > > iscsiparser3="^iscsi" > > +iscsiparser4="iscsi://([^:]+):([[:digit:]]+)/(.+)" > > + > > + > > +#****f* iscsi-lib.sh/getISCSIInitiatorFromParam > > +# NAME > > +# getISCSIInitiatorFromParam > > +# SYNOPSIS > > +# function getISCSIInitiatorServerFromParam { > > +# MODIFICATION HISTORY > > +# IDEAS > > +# SOURCE > > +# > > +function getISCSIInitiatorFromParam { > > + echo $1 | awk ' > > +{ > > + match($1, "'$iscsiparser4'", iscsiparms); > > + print iscsiparms[3]; > > +}' > > +} > > > > #****f* iscsi-lib.sh/getISCSIServerFromParam > > # NAME > > @@ -133,7 +152,13 @@ > > local nodename=$2 > > local iscsiserver=$(getISCSIServerFromParam $rootsource) > > local iscsimodules="iscsi_tcp" > > + local iscsiinitiatorname=$(getISCSIInitiatorFromParam > > $rootsource) > > echo_local -n "Starting iscsid" > > + > > + if [ -n "$iscsiinitiatorname" ]; then > > + echo "InitiatorName=$iscsiinitiatorname" > > > >>/etc/iscsi/initiatorname.iscsi > > > > + echo_local -n "Initiatorname is $iscsiinitiatorname" > > + fi > > modprobe -q iscsi_tcp > > modprobe -q ib_iser > > exec_local iscsid > > > > Actebis Peacock GmbH, Sitz der Gesellschaft Soest, HRB 8075, Amtsgericht > > Arnsberg, Geschäftsführer: Klaus Hellmich, Bärbel Schmidt, Dr. Ralf > > Retzko > > > > --------------------------------------------------------------------------- >--- > > > _______________________________________________ > > Open-sharedroot-devel mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/open-sharedroot-devel > > --------------------------------------------------------------------------- >--- _______________________________________________ > Open-sharedroot-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/open-sharedroot-devel -- Gruss / Regards, Marc Grimme http://www.atix.de/ http://www.open-sharedroot.org/ |
From: Michael P. <MP...@Ac...> - 2009-07-28 10:08:21
Attachments:
iscsi-lib.patch
|
Hi Marc, the patch is attached. Br, Michael > -----Original Message----- > From: Marc Grimme [mailto:gr...@at...] > Sent: Tuesday, July 28, 2009 8:54 AM > To: ope...@li... > Cc: Michael Peus > Subject: Re: [OSR-devel] Setting the iSCSI Initiatorname > > Hi Gordan, Michael, > > @Michael: could you please sent this patch as attachement? > > for me this looks like a general problem that could be not > only related to the lefthand storage. > > Although I didn't have problems using iscsi at least this > patch makes life with iscsi more configurable. > > Besides as the iscsi-url we are using is and was never > conforming to any standard I'll go with this and push it > upstream. And it does no look like it would influence the > standard behaviour in any way. > > Regards and Thanks > Marc. > On Monday 27 July 2009 19:54:09 Michael Peus wrote: > > Hi Gordan, > > > > it's the target that causes problems not the initiator. I have also > > checked against an OpenFiler based target without problems > using the > > same Intitatorname on every Clusternode. Nevertheless, > using different > > Initiatornames feels "more right" to me. Perhaps the iSCSI > Spec. helps > > here? I don't know. > > > > Br, > > Michael > > > > > > -----Ursprüngliche Nachricht----- > > Von: Gordan Bobic [mailto:go...@bo...] > > Gesendet: Mo 27.07.2009 17:23 > > An: ope...@li... > > Betreff: Re: [OSR-devel] Setting the iSCSI Initiatorname > > > > Is this something specific to the HP SAN iSCSI initiator software > > trying to be too smart by half in checking initiators? I don't > > remember having any problems connecting to iSCSI shares with the > > shared config between all nodes on RHEL5 using the distro > supplied iSCSI tools. > > > > Gordan > > > > On Mon, 27 Jul 2009 16:42:16 +0200, "Michael Peus, DE" > > <MP...@Ac...> > > > > wrote: > > > Hi, > > > > > > during testing of OSR in an iSCSI setup, the iSCSI-Target (HP > > > Lefthand) has problems caused by using the same Initiatorname on > > > every node. > > > Here is a patch that uses an extended rootsource syntax > for setting > > > an node-specific Initiatorname. > > > The syntax used is: <rootsource > > > name="iscsi://<target-ip>:<port>/<Initiatorname>"/> > > > > > > Currently this could be CentOS/RHEL specific as the file > > > /etc/iscsi/initiatorname.iscsi is written. > > > The patch is against the beta repo. > > > > > > I hope this could be usefull for someone else. > > > > > > Br, > > > Michael > > > > > > --- iscsi-lib.sh-orig 2009-07-22 12:15:15.000000000 +0200 > > > +++ iscsi-lib.sh 2009-07-22 12:15:01.000000000 +0200 > > > @@ -34,6 +34,25 @@ > > > iscsiparser1="iscsi://([^:/]+)" > > > iscsiparser2="iscsi://([^:]+):([[:digit:]]+)/" > > > iscsiparser3="^iscsi" > > > +iscsiparser4="iscsi://([^:]+):([[:digit:]]+)/(.+)" > > > + > > > + > > > +#****f* iscsi-lib.sh/getISCSIInitiatorFromParam > > > +# NAME > > > +# getISCSIInitiatorFromParam > > > +# SYNOPSIS > > > +# function getISCSIInitiatorServerFromParam { > > > +# MODIFICATION HISTORY > > > +# IDEAS > > > +# SOURCE > > > +# > > > +function getISCSIInitiatorFromParam { > > > + echo $1 | awk ' > > > +{ > > > + match($1, "'$iscsiparser4'", iscsiparms); > > > + print iscsiparms[3]; > > > +}' > > > +} > > > > > > #****f* iscsi-lib.sh/getISCSIServerFromParam > > > # NAME > > > @@ -133,7 +152,13 @@ > > > local nodename=$2 > > > local iscsiserver=$(getISCSIServerFromParam $rootsource) > > > local iscsimodules="iscsi_tcp" > > > + local iscsiinitiatorname=$(getISCSIInitiatorFromParam > > > $rootsource) > > > echo_local -n "Starting iscsid" > > > + > > > + if [ -n "$iscsiinitiatorname" ]; then > > > + echo "InitiatorName=$iscsiinitiatorname" > > > > > >>/etc/iscsi/initiatorname.iscsi > > > > > > + echo_local -n "Initiatorname is > $iscsiinitiatorname" > > > + fi > > > modprobe -q iscsi_tcp > > > modprobe -q ib_iser > > > exec_local iscsid > > > > > > Actebis Peacock GmbH, Sitz der Gesellschaft Soest, HRB 8075, > > > Amtsgericht Arnsberg, Geschäftsführer: Klaus Hellmich, Bärbel > > > Schmidt, Dr. Ralf > > > > Retzko > > > > > > > > > >------------------------------------------------------------- > ---------- > >---- > >--- > > > > > _______________________________________________ > > > Open-sharedroot-devel mailing list > > > Ope...@li... > > > https://lists.sourceforge.net/lists/listinfo/open-sharedroot-devel > > > > > >------------------------------------------------------------- > ---------- > >---- > >--- _______________________________________________ > > Open-sharedroot-devel mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/open-sharedroot-devel > > > > -- > Gruss / Regards, > > Marc Grimme > http://www.atix.de/ http://www.open-sharedroot.org/ > > > -------------------------------------------------------------- > ---------------- > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day trial. Simplify your report design, > integration and deployment - and focus on what you do best, > core application coding. Discover what's new with Crystal > Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Open-sharedroot-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/open-sharedroot-devel > |