Re: working with multiple password protected iSCSI targets on one host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



on 17:11 Tue 15 Feb, Santi Saez (santisaez@xxxxxxx) wrote:
> El 15/02/2011 14:54, Rudi Ahlers escribió:
> 
> Hi Rudi,
> 
> > How do I setup multiple password protected iSCSI targets on Linux?
> >
> > (..)
> >
> > But, now I need to mount another iSCSI target, from a different SAN
> > that has a different username&  password than whan I have configured
> > here for the one already mounted.
> >
> > How do I tell iscsiadm which CHAP settings to use with which iSCSI target?
> 
> I think there is not elegant way to do this.. I follow those steps:

Only if all CHAP auth is the same for all targets, in which case you can
specify the user/pass pairs in /etc/iscsi/iscsid.conf

Otherwise, you have to configure individual targets via iscsiadm.

I like your use of environment variables to specify targets and portals
(though I believe the default port is used if unspecified).  I'd arrived
at the same convention myself.

And though I'd turned up the authmethod assignment method somewhere, I
can't for the life of me remember where -- neither the
iscsi-initiator-utils document (README) nor the iscsiadm manpage seem to
address this -- they're otherwise pretty good.

Nice docs.
 
> 1) Set discovery.sendtargets.{auth,password} in iscsid.conf for target-1 
> + restart iscsid service.
> 
> 2) Set CHAP settings for target-1 + connect:
> 
> # iscsiadm -m node --targetname ${TARGETNAME1} -p ${PORTAL1} -o update 
> -n node.session.auth.username -v ${USERNAME}
> # iscsiadm -m node --targetname ${TARGETNAME1} -p ${PORTAL1} -o update 
> -n node.session.auth.password -v ${PASSWORD}
> # iscsiadm -m node --targetname ${TARGETNAME1} -p ${PORTAL1} -l
> 
> 3) Disconnect from target-1:
> 
> # iscsiadm -m node --logoutall all
> 
> 4) Set discovery.sendtargets.{auth,password} in iscsid.conf for target-2 
> + restart iscsid service.
> 
> 5) Set CHAP settings for target-2 + connect:
> 
> # iscsiadm -m node --targetname ${TARGETNAME2} -p ${PORTAL2} -o update 
> -n node.session.auth.username -v ${USERNAME}
> # iscsiadm -m node --targetname ${TARGETNAME2} -p ${PORTAL2} -o update 
> -n node.session.auth.password -v ${PASSWORD}
> # iscsiadm -m node --targetname ${TARGETNAME2} -p ${PORTAL2} -l
> 
> It works! Now you can login/logout in both iSCSI targets:
> 
> # iscsiadm -m node --logoutall all
> # iscsiadm -m node --loginall all
> 
> Cheers,
> 
> --
> Santi Saez
> http://woop.es
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos

-- 
Dr. Ed Morbius, Chief Scientist /            |
  Robot Wrangler / Staff Psychologist        | When you seek unlimited power
Krell Power Systems Unlimited                |                  Go to Krell!
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux