User Guide
DDOC0108-000-A2
CNS4 CSfC
11 - 25
Command Line Interface
Revision 0.0
11.2.17
istarget
Syntax
istarget [ -h | --help | --version]
istarget [ --start | --stop | --status | --setTargetName <index> <iqn name>]
istarget [ --getTargetName ] [ --blocksize <int> ] [ --getBlockSize <int> ]
istarget [ --sw ] | --fsep <char> ]
Description
The istarget command starts, stops, and reports the status of the iSCSIi target server.
Options
-h, --help........................................................ Print help message.
--version ........................................................ Print program version.
--start............................................................. Start iSCSI Target service.
--stop............................................................. Stop iSCSI Target service.
--status .......................................................... Status of iSCSI Target service (default).
--setTargetName <index> <iqn name>.......... Set iSCSI qualified name (iqn)
<index> ......................................................... Ethernet port number 0,1,2 etc or all
<iqn name> .................................................. iSCSI Qualified Name (IQN)
--getTargetNames ......................................... Get iSCSI qualified name (iqn} of each Ethernet port
--blocksize <int>............................................ Set target block size
--getBlockSize............................................... Get target block size
--sw ............................................................... Generate single line machine output
--fsep "<char>" .............................................. Specify field separation char for machine output.
When used --sw or --fsep should be the first
argument
NOTE
The IQN format takes the form 'iqn.yyyy-mm.naming-authority:unique name', where: 'yyyy-mm' is
the year and month when the naming authority was established. 'naming-authority' is usually
reverse syntax of the Internet domain name of the naming authority.
NOTE
'unique name' is any name you want to use, for example, the name of your host. The information
following the colon must be unique, such as:
iqn.2015-05.net.cwnas.iscsi:gbe1
iqn.2015-05.net.cwnas.iscsi:gbe2
Responses
ISCSI#_L#........................... <idevY> [is_tgt_en] <status>
idevY ................................... ISCSI target device iqn.2015-05.net.cwnas.iscsi:gbeY (Y=ISCSI
target disk 0,1,2 or 3)
[is_tgt_en] ........................... iSCSI Target Enabled <bool> (0,1)
<status> .............................. Status <enum> (OK, ERR "<str>")
INVALID .............................. <status>
INVALID .............................. Command parameter(s) invalid
<status> .............................. Status <str> (ERR "<str>")
ERROR ............................... <status>
ERROR ............................... Critical error has occurred
<status> .............................. Status <str> (ERR "<str>")
Example 1
cns>
istarget --start
[istarget]
iSCSI0_L0: iqn=iqn.2015-05.net.cwnas.iscsi:gbe0 is_tgt_en=1 status=OK
iSCSI1_L0: iqn=iqn.2015-05.net.cwnas.iscsi:gbe1 is_tgt_en=1 status=OK
[!istarget] OK