FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-15-2011, 12:54 PM
Rudi Ahlers
 
Default working with multiple password protected iSCSI targets on one host

Hi,

How do I setup multiple password protected iSCSI targets on Linux?

I know that mounting a password protected iSCSI target requires modify
these records with the appropriate values:


node.session.auth.username = My_ISCSI_USR_NAME
node.session.auth.password = MyPassword
discovery.sendtargets.auth.username = My_ISCSI_USR_NAME
discovery.sendtargets.auth.password = MyPassword


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?

--
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-15-2011, 03:11 PM
Santi Saez
 
Default working with multiple password protected iSCSI targets on one host

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:

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@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-18-2011, 01:20 AM
"Dr. Ed Morbius"
 
Default working with multiple password protected iSCSI targets on one host

on 17:11 Tue 15 Feb, Santi Saez (santisaez@woop.es) 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@centos.org
> 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@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 03:47 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org