The IQN string format:
The IQN sub-fields:
Required type designator (iqn)
Date code (yyyy-mm)
Reversed domain name (tld.domain)
Any string guaranteeing uniqueness (string[[.string]...])
Optional colon-delimited sub-group string ([:substring])

tgtadm --lld iscsi --mode target --op new --tid 1 --targetname
tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 --backing-store /dev/sda5
tgtadm --lld iscsi --mode target --op bind --tid 1 --initiator-address

history |tail -n 4 >> /etc/rc.d/rc.local

tgtadm --lld iscsi --mode target --op show
iscsiadm --mode discoverydb --type sendtargets --portal --discover
iscsiadm --mode discovery --type sendtargets --portal,1
iscsiadm --mode node --targetname --portal --login
iscsiadm --mode node
iscsiadm --mode node --targetname --portal
iscsiadm --mode node --targetname --portal
iscsiadm --mode node --targetname --portal --logout

iscsiadm --mode node --op delete --targetname --portal

[root@rhel57 device]# iscsiadm --help
iscsiadm -m discovery2 [ -hV ] [ -d debug_level ] [-P printlevel] [ -t type -p ip:port -I ifaceN ... [ -Dl ] ] | [ [ -p ip:port -t type] [ -o operation ] [ -n name ] [ -v value ] [ -lD ] ]
iscsiadm -m discovery [ -hV ] [ -d debug_level ] [-P printlevel] [ -t type -p ip:port -I ifaceN ... [ -l ] ] | [ [ -p ip:port ] [ -l | -D ] ]
iiscsiadm -m node [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -L all,manual,automatic ] [ -U all,manual,automatic ] [ -S ] [ [ -T targetname -p ip:port -I ifaceN ] [ -l | -u | -R | -s] ] [ [ -o  operation  ] [ -n name ] [ -v value ] ]
iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P  printlevel] [ -r sessionid | sysfsdir [ -R | -u | -s ] [ -o operation ] [ -n name ] [ -v value ] ]
iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename ] [ [ -o  operation  ] [ -n name ] [ -v value ] ]
iscsiadm -m fw [ -l ]
iscsiadm -m host [ -P printlevel ] [ -H hostno ]
iscsiadm -k priority

       Discover targets at a given IP address:

            iscsiadm --mode discoverydb --type sendtargets --portal --discover

       Login, must use a node record id found by the discovery:

            iscsiadm --mode node --targetname --portal --login


            iscsiadm --mode node --targetname --portal --logout

       List node records:

            iscsiadm --mode node

       Display all data for a given node record:

            iscsiadm --mode node --targetname --portal


[root@oracledb ~]# tgtadm --help
Usage: tgtadm [OPTION]
Linux SCSI Target Framework Administration Utility, version 1.0.14
tgtadm --lld iscsi --mode target --op new --tid 1 --targetname iqn.<date_code>.<reversed_domain>.<string>[:<substring>] (
tgtadm --lld iscsi --mo

  --lld <driver> --mode target --op new --tid <id> --targetname <name>
                        add a new target with <id> and <name>. <id> must not be zero.
  --lld <driver> --mode target --op delete --tid <id>
                        delete the specific target with <id>. The target must
                        have no activity.
  --lld <driver> --mode target --op show
                        show all the targets.
  --lld <driver> --mode target --op show --tid <id>
                        show the specific target's' parameters.
  --lld <driver> --mode target --op update --tid <id> --name <param> --value <value>
                        change the target parameters of the specific
                        target with <id>.
  --lld <driver> --mode target --op bind --tid <id> --initiator-address <src>
                        enable the target to accept the specific initiators.
  --lld <driver> --mode target --op unbind --tid <id> --initiator-address <src>
                        disable the specific permitted initiators.
  --lld <driver> --mode logicalunit --op new --tid <id> --lun <lun> \
                        --backing-store <path> --bstype <type> --bsoflags <options>
                        add a new logical unit with <lun> to the specific
                        target with <id>. The logical unit is offered
                        to the initiators. <path> must be block device files
                        (including LVM and RAID devices) or regular files.
                        bstype option is optional.
                        bsoflags supported options are sync and direct
                        (sync:direct for both).
  --lld <driver> --mode logicalunit --op delete --tid <id> --lun <lun>
                        delete the specific logical unit with <lun> that
                        the target with <id> has.
  --lld <driver> --mode account --op new --user <name> --password <pass>
                        add a new account with <name> and <pass>.
  --lld <driver> --mode account --op delete --user <name>
                        delete the specific account having <name>.
  --lld <driver> --mode account --op bind --tid <id> --user <name> [--outgoing]
                        add the specific account having <name> to
                        the specific target with <id>.
                        <user> could be <IncomingUser> or <OutgoingUser>.
                        If you use --outgoing option, the account will
                        be added as an outgoing account.
  --lld <driver> --mode account --op unbind --tid <id> --user <name>
                        delete the specific account having <name> from specific
  --control-port <port> use control port <port>
  --help                display this help and exit

Report bugs to <>.