📄 iscsi_manage
字号:
iscsi_manage is a tool to configure iSCSI parameters on the iSCSI
initiator and iSCSI target implementations. The iSCSI initiator and
iSCSI target are implemented as dynamically loadable modules in the
linux 2.4.xx kernel.
iscsi_manage uses the table of parameters that has been configured
with default values on the iSCSI initiator and iSCSI target
modules at compile time. iscsi_manage can change the default values
associated with parameters and can set the type of negotiation allowed
for the parameter. Each parameter falls into exactly one of the
following categories for negotiation.
Category Description
-----------------------------------------------------------------------
|
1 | Parameter that has to be negotiated and whose value can be
| changed on negotiation.
2 | Parameter that has to be negotiated and whose value can not be
| changed on negotiation.
3 | Parameter whose default value has to be changed but not to be
| negotiated.
It is invoked with at least three mandatory arguments and two optional
arguments from the command line as given below.
+------------------------------------------------------------------------------+
iscsi_manage <role> <what-to-do> <parameter-value-list> <opt-host> <opt-target>
+------------------------------------------------------------------------------+
+------+
| role |
+------+
role determines the device that is being configured.
It can be one of the following:
"init" the device that is configured is an iSCSI initiator.
"target" the device that is configured is an iSCSI target.
+------------+
| what-to-do |
+------------+
what-to-do specifies the operation to be performed on the parameter.
It can be one of the following:
"set" sets the parameter's type to category 1.
"setr" sets the parameter's type to category 2.
"setp" sets the parameter's type to category 3.
"unset" undoes a previous "set", "setr" or "setp"
"restore" restores the type of all parameters with the
default set of values (set of values the parameters
took when the module was first installed). The
parameter-value-list must be empty.
"force" forces actions specified by the parameter-value-list.
"snack" sets the parameters related to the snack interface.
+----------------------+
| parameter-value-list |
+----------------------+
For the "set", "setr", "setp" and "unset" values for what-to-do, the
parameter-value-list specifies the name of a parameter and a list of
values with which it is to be configured. It is of the form:
<Parameter>=<value_list>
where <Parameter> can be one of the following case-sensitive names:
"HeaderDigest"
"DataDigest"
"MaxConnections"
"SendTargets"
"TargetName"
"InitiatorName"
"TargetAlias"
"InitiatorAlias"
"TargetAddress"
"FMarker"
"OFMarker"
"IFMarker"
"RFMarkInt"
"SFMarkInt"
"OFMarkInt"
"IFMarkInt"
"InitialR2T"
"BidiInitialR2T"
"ImmediateData"
"MaxRecvDataSegmentLength"
"MaxRecvPDULength"
"DataPDULength"
"MaxBurstLength"
"FirstBurstLength"
"MaxBurstSize"
"FirstBurstSize"
"DefaultTime2Wait"
"DefaultTime2Retain"
"LogoutLoginMaxTime"
"LogoutLoginMinTime"
"MaxOutstandingR2T"
"DataPDUInOrder"
"DataSequenceInOrder"
"AuthMethod"
"ErrorRecoveryLevel"
"SessionType"
"TargetPortalGroupTag"
and
<value_list> is an UTF-8 string.
<Parameter> and <value_list> are separated by an '=' character.
When the what-to-do value is "force", the parameter-value-list has the
form:
<option>
or
<option>=<number>
or
<option>=<string>
The acceptable options are (unless mentioned otherwise, an option can
be used on either initiator or target):
s must not have a number. Forces login negotiation to enter
security parameter negotiation phase, even if there are no
security parameters to negotiate.
o must not have a number. Forces login negotiation to enter
operational parameter negotiation phase, even if there are no
operational parameters to negotiate.
f must not have a number. Forces initiator to use flat space
addressing method when packing a LUN value into the LUN field of
a PDU. This method enables the LUN value to occupy 14 bits.
Without this option-letter, the initiator uses the peripheral
device addressing method in packing the LUN field, which limits
the LUN value to 8 bits.
(Initiator only, illegal on target.)
r must not have a number. Forces the responder during negotiations
to always reply to any offer, even if the response is optional.
Without this option-letter, optional replies are not sent.
t must not have a number. Forces target authentication during
CHAP and SRP security negotiations (the default is to use only
initiator authentication in CHAP or SRP).
b must not have a number. Forces reply keys send during security
negotiations that send large binary numbers to format these
numbers using base64 format (the default is to use hex format).
xok must not have anumber. Forces the responder during negotiations
to reply to an X- or X# key with the value received, rather than
NotUnderstood.
n must have a number. Forces sending of nops at a periodic interval
which is given (in seconds) by the number.
p must have a number. On the Initiator, forces the command
retransmission period. The initiator retransmits any command that
hasn't seen any activity from the target for p seconds.
On the target, forces the phase collapse value as follows:
0 means never use phase collapse on DataIn pdus
1 means always use phase collapse on DataIn pdus
2 means alternate use of phase collapse on DataIn pdus
(i.e., use it when first possible, then don't use it,
then use it again, then don't, etc.)
sch must have a number. Forces the connection scheduling algorithm
used by the initiator to dispatch commands between multiple
connections within a single session.
0 means use only one connection for everything
1 means Round_Robin between all connections
2 means LUN_Specific (when a new lun is brought up, it
is permanently assigned to the connection having the
fewest luns assigned so far)
(Initiator only, illegal on target.)
r2tp must have a number. Forces the time-out value for the target's
R2T timer to be the number in seconds.
(Target only, illegal on initiator.)
cl must have a number. Forces the length (in bytes) of the CHAP
challenge value to that number. Must be a value in the range
[1..1024].
px must have a string. Forces the CHAP peer secret to this string.
pn must have a string. Forces the CHAP peer name to this string.
lx must have a string. Forces the CHAP local secret to this string.
ln must have a string. Forces the CHAP local name to this string.
sx must have a string. Forces the SRP secret to this string.
sn must have a string. Forces the SRP name to this string.
sg must have a string. Forces the SRP group to this string.
Legal values for this key are:
sg=SRP-768
sg=SRP-1024
sg=SRP-1280
sg=SRP-1536
sg=SRP-2048
(Initiator only, illegal on target.)
V must have a number. Forces the debug trace bit mask to this value.
When and what-to-do value is "snack", the parameter-value-list has the
form:
<option-letter>=<number>
or
<option-letter>=<letter>
The acceptable option-letters are:
d must have a value 'y', 'Y', 'n' or 'N'. Indicates if the data snack
is enabled or not.
This is used by both Initiator and Target.
s must have a value 'y', 'Y', 'n' or 'N'. Indicates if the status
snack is enabled or not.
This is used by both Initiator and Target.
h must have a number. Indicates to the target how to handle the
data snack request. The target may either retransmit or reject
a data snack request:
1 means data retransmission
2 means snack reject
+---------------+
| optional-host |
+---------------+
This is an optional field. If omitted assumes a value of 0.
Format is
host=<number>
If the role is initiator this specifies the SCSI Adapter number
assigned by the kernel to the iSCSI initiator.
If the role is target this specifies the target number assigned
by the SCSI Target Mid-Level to the iSCSI target.
+-----------------+
| optional-target |
+-----------------+
This is an optional field. If omitted assumes a value of 0.
Format is
target=<number>
If the role is initiator this specifies the SCSI Target ID
to be configured.
+----------+
| Examples |
+----------+
1. If the target can accept just a single connection it has to
set the MaxConnections parameter's value to 1.
iscsi_manage target setr MaxConnections=1
setr is used because the target cannot support value other
than 1 for MaxConnections parameter.
2. If the initiator supports both the options (yes/no) but likes
the no value as the default for InitialR2T, then we might want to
configure the initiator like this
iscsi_manage init set InitialR2T=no
3. If the initiator just wants to change the default behavior of
the key InitialR2T (setting InitialR2T=no) but did not want to
negotiate for it, then
iscsi_manage init setp InitialR2T=no
4. If the initiator wants to restore the default values of all the
parameters to its original state (state when the module was
initially loaded),
iscsi_manage init restore
5. If the initiator wants to force NopOut PDUs to be sent to the
target if there has been no activity on a connection for more than
20 seconds, then use
iscsi_manage init force n=20
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -