6.5

Table Of Contents
Managing iSCSI Sessions
To communicate with each other, iSCSI initiators and targets establish iSCSI sessions. You can use esxcli
iscsi session to list and manage iSCSI sessions for software iSCSI and dependent hardware iSCSI.
Introduction to iSCSI Session Management
By default, software iSCSI and dependent hardware iSCSI initiators start one iSCSI session between each
initiator port and each target port.
If your iSCSI initiator or target has more than one port, your host can establish multiple sessions. The
default number of sessions for each target equals the number of ports on the iSCSI adapter times the number
of target ports. You can display all current sessions to analyze and debug them. You might add sessions to
the default for several reasons.
n
Cloning sessions - Some iSCSI arrays support multiple sessions between the iSCSI adapter and target
ports. If you clone an existing session on one of these arrays, the array presents more data paths for
your adapter. Duplicate sessions do not persist across reboot. Additional sessions to the target might
have performance benets, but the result of cloning depends entirely on the array. You must log out
from an iSCSI session if you want to clone a session. You can use the esxcli iscsi session add
command to clone a session.
n
Enabling Header and Data Digest - If you are logged in to a session and want to enable the Header and
Data Digest parameters, you must set the parameter, remove the session, and add the session back for
the parameter change to take eect. You must log out from an iSCSI session if you want to clone a
session.
n
Establishing target-specic sessions - You can establish a session to a specic target port. This can be
useful if your host connects to a single-port storage system that, by default, presents only one target
port to your initiator, but can redirect additional sessions to a dierent target port. Establishing a new
session between your iSCSI initiator and another target port creates an additional path to the storage
system.
C Some storage systems do not support multiple sessions from the same initiator name or endpoint.
Aempts to create multiple sessions to such targets can result in unpredictable behavior of your iSCSI
environment.
Listing iSCSI Sessions
You can use esxcli iscsi session to list sessions.
The following example scenario uses the available commands. Run esxcli iscsi session --help and each
command with --help for reference information. The example uses a conguration le to log in to the host.
Specify one of the options listed in “Connection Options for vCLI Host Management Commands,” on
page 19 in place of <conn_options>.
I The ESXi 4.x ESXCLI commands for managing iSCSI sessions are not supported against ESXi
5.0 hosts.
n
List a software iSCSI session at the adapter level.
esxcli <conn_options> iscsi session list --adapter=<iscsi_adapter>
n
List a software iSCSI session at the target level.
esxcli <conn_options> iscsi session list --name=<target> --adapter=<iscsi_adapter>
vSphere Command-Line Interface Concepts and Examples
98 VMware, Inc.