HPlogo HP-UX iSCSI Software Initiator Support Guide: HP-UX 11i v1 & 11i v2 > Chapter 5 Management

The iscsiutil tool

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

The iscsiutil command is a management and diagnostic tool used with the iSCSI Software Initiator.

The iscsiutil tool provides a command line interface to:

  • Configure the iSCSI Software Initiator related parameters.

  • Display statistics for the interface driver, connection processing, session processing, and the discovery sequence.

  • Execute diagnostic functionality.

Device files are automatically created to access the iSCSI transport and interface drivers.

The device file to interface to the iSCSI transport driver is /dev/iscsi, which is created during installation.

The iSCSI transport driver defines iSCSI session management common to all iSCSI interface drivers.

The iSCSI transport driver defines interfaces with the SCSI services layer.

NOTE: For a complete list of options supported by the iscsiutil tool, review the iscsiutil manpage on an HP-UX system that has the iSCSI Software Initiator installed on it. From the command line enter:

# man iscsiutil

iscsiutil Command Utilization

Most command sequences require root or super user permission.

NOTE: The parameters enclosed within [ ] are optional. The parameters enclosed within < > are mandatory.

Configuration with iscsiutil

To add an iSCSI discovery target IP address or a target portal group tag to the kernel registry, use:

# iscsiutil [/dev/iscsi] -a -I <ip-address> [-P <tcp-port>][-M <portal-grp-tag>]
  • The iSCSI target will be probed during ioscan processing using the static scanning technique described in “Device Discovery”.

  • <ip-address> The ip_address specified can be an IPv4 formatted address or a DNS host name. The bracketed [ ] parameters are optional.

  • <tcp-port> A TCP port may be specified for the iSCSI target. If no port is specified, the default iSCSI port (3260) will be used.

  • <portal-grp-tag> The target portal group tag may be specified (a value from 0 to 65535 inclusive); otherwise, a default value of 1 will be used.

To Delete an iSCSI discovery target IP address from the kernel registry, use:

# iscsiutil [/dev/iscsi] -d -I <ip-address> [-P <tcp-port>][-M <portal-grp-tag>]
  • <ip-address> The ip_address specified can be an IPv4 formatted address or a DNS name

  • <tcp-port> A TCP port may be specified for the iSCSI target. If no port is specified, the default iSCSI target port (3260) will be used.

  • <portal-grp-tag> The target portal group tag may be specified (a value from 0 to 65535 inclusive); otherwise a default value of 1 will be used.

To add an initiator name and optionally add an initiator alias, use:

# iscsiutil   [/dev/iscsi] -i  -N  <initiator-name> [-A <initiator-alias>]

(names must be in “iqn” or “eui” format)

See “Configuring the iSCSI Software Initiator”, for more information on iqn and eui naming formats.

Management with iscsiutil

To display statistics from the iSCSI Software Initiator, use:

# iscsiutil [/dev/iscsi] -s [-G] [-S [<ssn_inst> [-C [<cid>]]]]
  • where:

  • -G  displays the global statistics.

  • -S  displays the session statistics for all sessions; if an initiator session identifier instance (ssn_inst) is specified, then statistics will be displayed for that session only.

  • -C  displays statistics for all connections of the specified session instance (ssn_inst); if a connection identifier (cid) is specified, then statistics will be displayed for that connection.

To display the iSCSI name and alias for the iSCSI initiator node, as well as the current authentication method and login key information, use:

# iscsiutil [/dev/iscsi] -l

To display the transport driver name and version, use:

# iscsiutil [/dev/iscsi]

To display information about current sessions, targets, and connections, use:

# iscsiutil [/dev/iscsi] -p [-O | -D | [-T <target-name>]]

or

# iscsiutil [/dev/iscsi] -p [-S [<ssn_inst> [-C [<cid>]] [-V]]]
  • where:

  • -D  displays all current discovery target information.

  • -O   displays all current operational targets and related information.

  • -T displays information for the iSCSI target-name  specified.

  • -S   displays the session information for all sessions; if an initiator session identifier instance (ssn_inst) is specified, then information will be displayed for that session only.

  • Session information displayed includes:

  •           -  The session instance number.

  •           -  The target iSCSI name.

  •           -  The target IP address and port.

  •          -  The target portal group tag.

  • -C  displays statistics for all connections of the specified session instance (ssn_inst); if a connection identifier (cid) is specified, only the statistics for that connection will be displayed.

  • -V   displays negotiated login key information.

To display iscsiutil usage, use:

# iscsiutil 

To issue an iSCSI NOP-OUT indicating the destination session and connection, use:

# iscsiutil [/dev/iscsi] -n  -S  <ssn_inst> [-C <cid> ] [-L <data-size>]
  • where:

  • -S  provides an initiator session identifier instance (ssn_inst) on which the iSCSI NOP-OUT is to be sent

  • -C  provides a specific connection identifier (cid) for the iSCSI NOP-OUT

  • -L  is the <data-size>, or number of bytes, to be used for the NOP-OUT. The valid range for the data-size is 0 to 4096 bytes. The default data-size is 64 bytes.