iscsiadm - enable management of iSCSI initiators
iscsiadm subcommand direct-object [options] [operand]
The iscsiadm command enables management of the iSCSI (Internet SCSI) initiator on a host. iscsiadm is implemented as a set of subcommands, many with their own options, which are described in the section for that subcommand. Options not associated with a particular subcommand are described under OPTIONS.
The iscsiadm command supports the following subcommands, which are described in detail in subsections that follow:
add
list
modify
remove
The iscsiadm subcommands operate on a direct-object. These are described in the section for each subcommand.
The iscsiadm command supports the Internet Storage Name Service (iSNS) for the discovery of iSCSI targets. The command supports the Challenge Handshake Authentication Protocol (CHAP) for authentication.
The syntax for the add subcommand is:
# iscsiadm add direct_object [operands...]
The add subcommand adds the following direct_objects:
discovery-address discovery-address [...]
The discovery-address parameter is formatted as:
<IP address>[:port]
If port is not specified, the default of 3260 will be used.
isns-server isns-server [...]
The isns-server parameter is formatted as:
IP_address[:port]
If a port is not specified, the default of 3205 is used.
static-config static_target [...]
The static_target parameter is formatted as:
<target-name>,<target address>[:port-number][,tpgt]
<target-name> can be up to 223 characters.
The syntax for the list subcommand is:
# iscsiadm list direct-object [options]
The list subcommand displays data for the following direct-objects:
discovery
initiator-node
static-config [static_target[, ...]]
target [-S] [-v] [target[, ...]]
When used with the -S option for a specified target, this subcommand returns:
A return of NA as the discovery method parameter indicates that the target was created with a iscsiadm modify target-param command and does not exist as a discovered object. To remove such targets, use iscsiadm remove target-param.
target-param [-v] target [...]
discovery-address [-v] [discovery-address[, ...]]
When used with the -v option, lists all known targets at a specified discovery-address. The -v option returns one or more target names along with zero or more target addresses and associated target portal group tags (TPGT), if applicable.
isns-server [-v] [isns-server[, ...]]
When used with the -v option, this subcommand lists all known targets at a specified isns-server address. The -v option returns one of more target names along with zero or more target addresses and associated target portal group tags, if applicable.
The syntax for the modify subcommand is:
# iscsiadm modify direct_object [options]
The modify subcommand supports the following direct_objects:
discovery [options]
Options for modify discovery are as follows:
-i, -iSNS enable | disable
-s, --static enable | disable
-t, --sendtargets enable | disable
initiator-node [options]
Options for modify initiator-node are as follows:
-A, --node-alias <initiator node alias>
-a, --authentication chap | none
-C, --CHAP-secret
-c, --configured-sessions <num_sessions> | <IP address>[,<IP address>...]
-d, --datadigest none | CRC32
-H, --CHAP-name CHAP name
-h, --headerdigest none | CRC32
-N, --node-name <initiator node name>
Note -
-P, --radius-shared-secret (exclusive)
-R, --radius-access enable | disable
-r, --radius-server <IP address>[:<port>]
target-param [options] target
Options for modify target-param are as follows:
-B, --bi-directional-authentication enable | disable
-C, --CHAP-secret
-c, --configured-sessions <num_sessions> | <IP address>[,<IP address>...]
-d, --datadigest none | CRC32
-H, --CHAP-name CHAP name
-h, --headerdigest none | CRC32
-p, --login-param
Note -
dataseqinorder
defaulttime2retain
defaulttime2wait
firstburstlength
immediatedata
initialr2t
maxburstlength
datapduinorder
maxoutstandingr2t
maxrecvdataseglen
The syntax for the remove subcommand is:
# iscsiadm remove direct_object
The remove subcommand supports the following direct_objects:
discovery-address discovery-address, ...
discovery-address must be formatted as:
<IP address>[:<port>]
There are no options associated with this direct object.
isns-server isns-server, ...
isns-server must be formatted as:
IP_address[:port]
There are no options associated with this direct object.
static-config static_target, ...
static_target must be formatted as:
<target-name>,<target-address>[:port-number][,tpgt]
There are no options associated with this direct object.
target-param target-name
<target-name>
There are no options associated with this direct object.
Do not configure a target to be discovered by both static and dynamic discovery methods. The consequence of using redundant discovery methods might be slow performance when communicating with the iSCSI target device.
The following generic options are supported:
-V, --version
-?, --help
# iscsiadm modify initiator-node --help
...iscsiadm responds with a display of the options available for that combination of subcommand and direct object.
Example 1 Adding a Discovery Address
The following command uses the add subcommand to add a discovery address.
# iscsiadm add discovery-address 10.0.0.1:3260 10.0.0.2:3260
Example 2 Adding a Static Target
The following command uses the add subcommand to add a static target.
# iscsiadm add static-config \ iqn.1999-08.com.array:sn.01234567,10.0.0.1:3260
Example 3 Listing Current Discovery Settings
The following command uses the list subcommand to list current discovery settings.
# iscsiadm list discovery Discovery: Static: enabled Send Targets: disabled iSNS: enabled
Example 4 Obtaining Verbose Discovery Output
The following commands uses the -v option (one with, one without) with the list subcommand to obtain verbose output.
# iscsiadm list discovery-address Discovery Address: 10.0.0.1:3260 Discovery Address: 10.0.0.2:3260 # iscsiadm list discovery-address -v 10.0.0.1:3260 Discovery Address: 10.0.0.1:3260 Target name: eui.210000203787d1f7 Target address: 10.0.0.1:3260 Target name: eui.210000203787a693 Target address: 10.0.0.1:3260
Example 5 Displaying Information on the Initiator
The following command uses the list subcommand to display information on the initiator.
# iscsiadm list initiator-node Initiator node name: iqn.1986-03.com.company.central.interopv20-1 Initiator node alias: interopv20-1 Login Parameters (Default/Configured): Header Digest: NONE/NONE Data Digest: NONE/NONE Authentication Type: CHAP CHAP Name: iqn.1986-03.com.company.central.interopv20-1 RADIUS Server: NONE RADIUS access: disabled Configured Sessions: 1
Example 6 Displaying Static Configuration Information
The following command uses the list subcommand to display information about static configurations.
# iscsiadm list static-config Static target: eui.210000203787a693,10.0.0.1:3260
Example 7 Displaying Target Information
The following commands show the use of the list subcommand with various options to display information about targets.
# iscsiadm list target Target: iqn.2004-05.com.abcStorage:Tgt-1 Alias: - TPGT: 12288 ISID: 4000002a0000 Connections: 1 # iscsiadm list target -v iqn.2004-05.com.abcStorage:Tgt-1 Target: iqn.2004-05.com.abcStorage:Tgt-1 Alias: - TPGT: 12288 ISID: 4000002a0000 Connections: 1 CID: 0 IP address (Local): 10.4.52.158:32803 IP address (Peer): 10.4.49.70:3260 Discovery Method: SendTargets Login Parameters (Negotiated): Data Sequence In Order: yes Data PDU In Order: yes Default Time To Retain: 20 Default Time To Wait: 2 Error Recovery Level: 0 First Burst Length: 65536 Immediate Data: yes Initial Ready To Transfer (R2T): yes Max Burst Length: 262144 Max Outstanding R2T: 1 Max Receive Data Segment Length: 65536 Max Connections: 1 Header Digest: NONE Data Digest: NONE # iscsiadm list target -S iqn.2004-05.com.abcStorage:Tgt-1 Target: iqn.2004-05.com.abcStorage:Tgt-1 Alias: - TPGT: 12288 ISID: 4000002a0000 Connections: 1 LUN: 6 Vendor: ABCStorage Product: iSCSI Target OS Device Name: /dev/rdsk/c3t1d0s2 LUN: 5 Vendor: ABCStorage Product: iSCSI Target OS Device Name: /dev/rdsk/c3t0d0s2
Example 8 Displaying Target Parameter Information
The following command uses the list subcommand to display target information for a specific target.
# iscsiadm list target-param -v iqn.2004-05.com.abcStorage:Tgt-1 Target: iqn.2004-05.com.abcStorage:Tgt-1 Alias: - Bi-directional Authentication: disabled Authentication Type: NONE Login Parameters (Default/Configured): Data Sequence In Order: yes/- Data PDU In Order: yes/- Default Time To Retain: 20/- Default Time To Wait: 2/- Error Recovery Level: 0/- First Burst Length: 65536/- Immediate Data: yes/- Initial Ready To Transfer (R2T): yes/- Max Burst Length: 262144/- Max Outstanding R2T: 1/- Max Receive Data Segment Length: 65536/- Max Connections: 1/- Header Digest: NONE/- Data Digest: NONE/- Connections: 1
Example 9 Enabling Static Discovery Method
The following command uses the modify subcommand to enable the static discovery method.
# iscsiadm modify discovery --static enable
Example 10 Setting the IP Address for the Radius Server
The following command uses the modify subcommand to set the IP address for the radius server, which will be used for CHAP authentication.
# iscsiadm modify initiator --radius-server 10.0.0.1
Example 11 Setting the Node Name for Initiator
The following command uses the modify subcommand to set the node name for the initiator node.
# iscsiadm modify initiator-node -N iqn.2004-10.com.SUN.host-1
Example 12 Changing Target Parameters
The following command uses the modify subcommand to change the target parameters for a specified target.
# iscsiadm modify target-param -d none -h none eui.210000203787a693
Example 13 Removing a Discovery Address
The following command uses the remove subcommand to remove a discovery address.
# iscsiadm remove discovery-address 10.0.0.1:3260
Example 14 Removing Target Parameters
The following command uses the remove subcommand to remove a set of target parameters.
# iscsiadm remove target-param eui.210000203787a693
See attributes(5) for descriptions of the following attributes:
|
attributes(5), scsi_vhci(7D)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |