iscsiadm command line syntax

100 views
Skip to first unread message

Vivek S

unread,
Jul 17, 2011, 6:55:49 AM7/17/11
to open-...@googlegroups.com
Hi,

I think the iscsiadm command line syntax should be simpler and easy to reproduce without having to look up the man page for the meaning of each option.

It should be something like

iscsiadm --mode discovery --portal 192.168.1.2:3260
iscsiadm --mode login --targetname iqn.2005-10.com.open-iscsi.test:12345 --portal 192.168.1.2:3260
iscsiadm --mode display --parameter session/discoverydb/connection

Also, in the current (TOT) iscsiadm man page, there is no mention is mode discovery whereas iscsiadm --help displays a line for mode discovery
"iscsiadm -m discovery [ -hV ] [ -d debug_level ] [-P printlevel] [ -t type -p ip:port -I ifaceN ... [ -l ] ] | [ [ -p ip:port ] [ -l | -D ] ] "
What is this mode used for ?

Thank you,
Vivek S

Mike Christie

unread,
Jul 18, 2011, 3:27:26 AM7/18/11
to open-...@googlegroups.com, Vivek S
On 07/17/2011 05:55 AM, Vivek S wrote:
> Hi,
>
> I think the iscsiadm command line syntax should be simpler and easy to
> reproduce without having to look up the man page for the meaning of each
> option.
>
> It should be something like
>
> iscsiadm --mode discovery --portal 192.168.1.2:3260
> iscsiadm --mode login --targetname iqn.2005-10.com.open-iscsi.test:12345
> --portal 192.168.1.2:3260
> iscsiadm --mode display --parameter session/discoverydb/connection

I am ok with something like this, but you need to support both old style
and new style for some time, because other apps rely on the current syntax.


>
> Also, in the current (TOT) iscsiadm man page, there is no mention is
> mode discovery whereas iscsiadm --help displays a line for mode discovery
> "iscsiadm -m discovery [ -hV ] [ -d debug_level ] [-P printlevel] [ -t
> type -p ip:port -I ifaceN ... [ -l ] ] | [ [ -p ip:port ] [ -l | -D ] ] "
> What is this mode used for ?
>

I am not sure what you mean. It is used for discovery. It is in the man
page. I am not sure what TOT stands for. Maybe that is why I am not
understanding your question.

For discovery you can have different types of discovery like isns or
sendtargets. You can pass in the ifaces you want to use for discovery.
You can log into the portals you found.

Vivek S

unread,
Jul 18, 2011, 12:53:40 PM7/18/11
to Mike Christie, open-...@googlegroups.com
There are two modes discoverydb and discovery. What is the difference ?

TOT = Top Of Trunk :-)

In iscsiadm man page, description of option -m/--mode lists the various modes which does not include discovery.

Mike Christie

unread,
Jul 18, 2011, 3:02:07 PM7/18/11
to open-...@googlegroups.com, Vivek S
On 07/18/2011 11:53 AM, Vivek S wrote:
> There are two modes discoverydb and discovery. What is the difference ?
>

It was due to a screw up on my part. discovery mode did not allow you to
manipulate discovery records. So if you did something like
iscsiadm -m discovery -t st -p ip1
iscsiadm -m discovery -t st -p ip2
then you wanted to modify the settings for the discovery portal at ip2,
you would think you could do

iscsiadm -m discovery -t st -p ip2 -o update -n setting -v value

but you could not because the -o update was being used to control if
iscsadm would update the records for the portals that were found (the
setting and value were ignored).

So I added a discoverydb mode that allowed you to do the second command.
You would also use the discoverydb mode to setup discoveryd mode.


> TOT = Top Of Trunk :-)
>

Doh, yeah makes sense :)


> In iscsiadm man page, description of option -m/--mode lists the various
> modes which does not include discovery.

Ah, yeah that was a screw up on my part. discoverydb mode does
everything discovery mode does and more, so instead of just marking
discovery mode depreciated I just dropped it in some of the docs hoping
new users would only use discoverydb mode. For another example in the
README and example commands in other places, I then only used
discoverydb mode too. I think I meant to go back and mark it as
depreciated instead of dropping it from the docs.


>
> On Mon, Jul 18, 2011 at 12:57 PM, Mike Christie <mich...@cs.wisc.edu
> <mailto:mich...@cs.wisc.edu>> wrote:
>
> On 07/17/2011 05:55 AM, Vivek S wrote:
> > Hi,
> >
> > I think the iscsiadm command line syntax should be simpler and easy to
> > reproduce without having to look up the man page for the meaning
> of each
> > option.
> >
> > It should be something like
> >
> > iscsiadm --mode discovery --portal 192.168.1.2:3260

> <http://192.168.1.2:3260>


> > iscsiadm --mode login --targetname
> iqn.2005-10.com.open-iscsi.test:12345

> > --portal 192.168.1.2:3260 <http://192.168.1.2:3260>


> > iscsiadm --mode display --parameter session/discoverydb/connection
>
> I am ok with something like this, but you need to support both old style
> and new style for some time, because other apps rely on the current
> syntax.
>
>
> >
> > Also, in the current (TOT) iscsiadm man page, there is no mention is
> > mode discovery whereas iscsiadm --help displays a line for mode
> discovery
> > "iscsiadm -m discovery [ -hV ] [ -d debug_level ] [-P printlevel] [ -t
> > type -p ip:port -I ifaceN ... [ -l ] ] | [ [ -p ip:port ] [ -l |
> -D ] ] "
> > What is this mode used for ?
> >
>
> I am not sure what you mean. It is used for discovery. It is in the man
> page. I am not sure what TOT stands for. Maybe that is why I am not
> understanding your question.
>
> For discovery you can have different types of discovery like isns or
> sendtargets. You can pass in the ifaces you want to use for discovery.
> You can log into the portals you found.
>
>

> --
> You received this message because you are subscribed to the Google
> Groups "open-iscsi" group.
> To post to this group, send email to open-...@googlegroups.com.
> To unsubscribe from this group, send email to
> open-iscsi+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/open-iscsi?hl=en.

Vivek S

unread,
Jul 19, 2011, 11:35:06 AM7/19/11
to Mike Christie, open-...@googlegroups.com
So how do we go about this ? Shall we remove discovery mode completely or leave it by marking it as deprecated (We have to remove deprecated things at some point).

Mike Christie

unread,
Jul 20, 2011, 11:28:31 PM7/20/11
to open-...@googlegroups.com, Vivek S
On 07/19/2011 10:35 AM, Vivek S wrote:
> So how do we go about this ? Shall we remove discovery mode completely

We cannot remove it now. I think we have only had 1 release with
discoverydb support. I do not think anyone would have had time to
convert over.


In general if we want to remove something I would normally work with the
distros and target and hba vendors to make sure their tools are
converted. Then make sure users know it is going away, have some
releases with it still in there, then remove it.

Reply all
Reply to author
Forward
0 new messages