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 |