mkiscsi Command

Purpose

Adds iSCSI target data.

Syntax

mkiscsi -l AdapterName -g static -t TargetName -n PortNumber -i IPaddress [-p password]

mkiscsi -l AdapterName -g auto -t TargetName -p password

mkiscsi -l AdapterName -g group -f FileName

Description

The mkiscsi command adds iSCSI target data to 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 FileName Specifies the filename from which iSCSI target information will be read and then placed into ODM.
-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.
-i IPaddress Specifies the IP address of the iSCSI target.
-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.
-n NewPortNumber Specifies the port number on which the iSCSI target is accessed. The default port number is 3260.
-p password Specifies the new password for this iSCSI target.
-t TargetName Specifies the iSCSI target name (for example, iqn.sn9216.iscsi-hw1).

Exit Status

Item Description
0 The command completed successfully.
>0 An error occurred.

Security

The mkiscsi command is executable only by root.

Examples

  1. To add one statically configured iSCSI target, enter the following command:
    mkiscsi -l ics0 -g static -t iqn.sn1234.iscsi_hw1
     
    
  2. To add all the entries from the file /etc/iscsi/targetshw, enter the following command:
    mkiscsi -l ics0 -g static -f /etc/iscsi/targetshw
     
    

Location

/usr/sbin/mkiscsi

Files

Item Description
src/bos/usr/sbin/iscsia Contains the common source files from which the iSCSI commands are built.