Hello,

In your example, you're not actually discoverying a target, AFAIK, you don't create blank records w/o target info.

I believe the proper way is to add the update changes during the discovery request.

 -m discovery --type=[type] --interface=iscsi_ifacename \
                        --portal=[ip:port] --login --print=[N] \
                        --op=[op]=[NEW | UPDATE | DELETE | NONPERSISTENT]
                          perform [type] discovery for target portal with
                          ip-address [ip] and port [port].

                          This command will not use the discovery record
                          settings. It will use the iscsid.conf discovery
                          settings and it will overwrite the discovery
                          record with iscsid.conf discovery settings if it
                          exists. By default, it will then remove records for
                          portals no longer returned. And,
                          if a portal is returned by the target, then the
                          discovery command will create a new record or modify
                          an existing one with values from iscsi.conf and the
                          command line.

                          [op] can be passed in multiple times to this
                          command, and it will alter the DB manipulation.

                          If [op] is passed in and the value is
                          "new", iscsiadm will add records for portals that do
                          not yet have records in the db.

                          If [op] is passed in and the value is
                          "update", iscsiadm will update node records using
                          info from iscsi.conf and the command line for portals
                          that are returned during discovery and have
                          a record in the db.



Regards,

 Don

On 02/22/2013 04:48 PM, [email protected] wrote:
Is there a way to override the default CHAP credentials in the iscsid.conf file when using iscsiadm to discover and login to an iSCSI target?

I'd like to use iscsiadm to discover and login to targets from the same target portal as targets that have already been discovered, but with different CHAP credentials. I would like to specify a CHAP username for discovery and login that is different than the values in iscsid.conf (discovery.sendtargets.auth.username and node.session.auth.username). Is this possible?

I can use the -u update -n node.session.auth.username -v newChapUsername options to update an existing node record but that's not really what I'm looking for.

I tried to create a new node record but got the following error:

# iscsiadm -m node -o new -n node.conn[0].address -v 10.10.10.11 -n node.conn[0].port -v 3260 -n node.name -v iqn.2010-01.com.foo:1234
/*No records added.*/

Is it possible to create a new node record this way?

Thanks!

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to