lsiscsi Command
Purpose
Displays information for iSCSI target data.
Syntax
Description
The lsiscsi command displays iSCSI target data from ODM. There are two categories of data stored in ODM. The first is for statically configured iSCSI targets, which require that all the relevant iSCSI target information (such as target name, IP address, and port number) are specified in order for AIX® to discover them. The second category of iSCSI target data is for iSCSI target devices that can be configured automatically, but require authentication from the host (such as passwords). These two categories of iSCSI target data are associated with the static and auto groups, respectively, specified by the -g flag.
Flags
Item | Description |
---|---|
-F Format | Displays the output in a user-specified format, where the Format parameter is a quoted list of column names, separated and possibly ended by nonalphanumeric characters or white space. If white space is used as the separator, the lsiscsi command displays the output in aligned columns. |
-g group | Specifies which group this iSCSI target is associated with. There two valid groups are static and auto. The static group is for iSCSI targets that cannot be automatically discovered from this host; all relevant iSCSI target information for them (such as target name, IP address, and port number) must be specified. The auto group is for iSCSI targets that are automatically discovered, but require authentication information such as passwords. |
-l AdapterName | Specifies the adapter name for the iSCSI TCP/IP Offload Engine (TOE) adapter that is attached to this iSCSI target. It can also specify the iSCSI protocol device for the iSCSI software solution device. |
-p | Displays the iSCSI target's password used for iSCSI logins from this adapter. |
-u | Displays the Challenge Handshake Authentication Protocol (CHAP) user name that can be used for each iSCSI target. |
Exit Status
Item | Description |
---|---|
0 | The command completed successfully. |
>0 | An error occurred. |
Security
The lsiscsi command is executable only by root.
Examples
- To list all iSCSI target data for the iSCSI TOE adapter
ics0
, enter:
The system displays output similar to the following:lsiscsi -l ics0
10.1.2.116 3260 iqn.sn9216.iscsi-hw1 10.1.2.116 3260 iqn.sn2105.iscsi-target
- To list all iSCSI target data for this host, enter:
The system displays output similar to the following:lsiscsi
ics0 1 10.1.2.116 3260 iqn.sn9216.iscsi-hw1 ics0 10.1.2.116 3260 iqn.sn2105.iscsi-target ics1 11.23.45.67 iqn.mds9216.iscsi_hw2.116 3260 iqn.sn2105.iscsi-target
Location
/usr/sbin/lsiscsi
Files
Item | Description |
---|---|
src/bos/usr/sbin/iscsia | Contains the common source files from which the iSCSI commands are built. |