Sorry. I missed the original mail. The difference is what you quoted from the man page where discovery mode uses the iscsid.conf settings and discoverydb uses the discovery record settings if it exists. The latter is useful when you have multiple targets that you need to do discovery to, but something like the CHAP settings are different for each one.
The discovery settings you are most interested in are the ones you see in the README/iscsid.conf discovery.*: # To enable CHAP authentication for a discovery session to the target # set discovery.sendtargets.auth.authmethod to CHAP. The default is None. #discovery.sendtargets.auth.authmethod = CHAP # To set a discovery session CHAP username and password for the initiator # authentication by the target(s), uncomment the following lines: #discovery.sendtargets.auth.username = username #discovery.sendtargets.auth.password = password # To set a discovery session CHAP username and password for target(s) # authentication by the initiator, uncomment the following lines: #discovery.sendtargets.auth.username_in = username_in #discovery.sendtargets.auth.password_in = password_in # To specify the maximum number of data bytes the initiator can receive # in an iSCSI PDU from a target during a discovery session, edit the # following line. # # The value is the number of bytes in the range of 512 to (2^24-1) and # the default is 32768 # #discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768 # When using discoverydb mode, you can tell iscsid to perform # discovery every discovery*.discoveryd_poll_inval seconds, and # log in/out of target sound. See the README section 7.4 for more # info. #discovery.*.use_discoveryd #discovery*.discoveryd_poll_inval There are other settings for timeouts and retries, but I do not think anyone has ever had to change them, so I think I have just forgot to document them. Will do that when I get some time. On 12/29/2014 05:32 AM, [email protected] wrote: > Hello guys, > > I have been looking for this information for a long time, because It is > not enough for me just to copy some commands from some guide in order to > make what I want. At least is handy to roughly understand what are you > doing while you are working with important data and setting in iscsi. I > think, the right answer for your question is on this web page: > > https://docs.oracle.com/cd/E37670_01/E41138/html/ch17s06.html > > Hope that will help you at least a bit. > Roberto > > > > > > Dne středa, 15. října 2014 23:34:14 UTC+1 [email protected] napsal(a): > > Hello, > > What's the difference between discovery and discoverydb modes? > > The man page for the iscsiadm gives no explanation. The > http://www.open-iscsi.org/docs/README > <http://www.open-iscsi.org/docs/README> gives the following description: > > -m discoverydb --type=[type] --interface=[iface...] > --portal=[ip:port] --print=[N] --op=[op]=[NEW | UPDATE | DELETE | > NONPERSISTENT] --discover > *This command will use the discovery record settings* matching the > record with type=type and portal=ip:port]. If a record does not > exist, it will create a record using the iscsid.conf discovery settings. > > -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. > > The difference seems to be that the first one will use, and the > second one will not use the discovery record settings. If that's the > only difference, then can someone please elaborate on this? What are > the discovery record settings? Is it iscsid.conf settings? What does > it practically mean for the command to not use the discovery > settings? What settings will it use then? > > I found that the following two commands seemingly do the same things > (perform target discovery). Are they actually anyhow functionally > different? > iscsiadm -m discovery -t st -p 127.0.0.1 > iscsiadm -m discoverydb -t st -p 127.0.0.1 --discover > > For me it seems that discovery mode is an obsolete precursor of the > discoverydb mode left there for compatibility purposes, but not > cleaned from the man page and readme file. > > Thanks, > Oleg > > -- > 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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/open-iscsi. > For more options, visit https://groups.google.com/d/optout. -- 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. For more options, visit https://groups.google.com/d/optout.
