Windows iSCSI记录
iSCSI 读写超时
To work around this issue, increase the following registry value to 90:
HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}\<Instance Number>\Parameters
The values that can be modified are:
- MaxRequestHoldTime: Increase this value to 90 if MPIO is not installed.
- LinkDownTime: Increase this value to 90 if MPIO is installed.
需要注意的是 {4D36E97B-E325-11CE-BFC1-08002BE10318}
下面是所有 SCSI Class 号码,要先找到 iSCSI initiator 对应的 SCSI Class。
修改生效问题
If one needs to change the above values, a reboot is required for the change to take effect.
Alternatively, one can also unload and reload the initiator driver for the change to take effect.
In "Device Manager" GUI, look under "SCSI and RAID Controllers". Right click on "Microsoft iSCSI Initiator" and select "Disable" to unload the driver. Then select "Enable" to reload the driver.
Microsoft iSCSI Initiator Driver Timers
TCPConnectTime
Timeout given to TCP when a Connect request is sent.
The default value is 15 seconds.
TCPDisconnectTime
Timeout given to TCP when a Disconnect request is sent.
The default value is 15 seconds.
WMIRequestTimeout
Timeout value set for WMI requests such as LoginToTarget, LogoutFromTarget, SendTargets, etc.
The default value is 30 seconds.
DelayBetweenReconnect
If a connection is dropped while it is in FullFeature phase, the driver will attempt to relogin. This parameter sets the delay between each re-login attempts.
The default value is 1 second.
MaxConnectionRetries
Maximum number of times a lost TCP connection will be retried.
The default value is -1, which means the driver will retry indefinitely.
MaxRequestHoldTime
Maximum time (in seconds) for which requests will be queued if connection to the target is lost and the connection is being retried. After this hold period, requests will be failed with "error no device" and device (disk) will be removed from the system.
The default value is 60 seconds
MaxPendingRequests
Maximum number of outstanding requests allowed by the initiator. At most this many requests will be sent to the target before receiving response for any of the requests.
The default value is 255
EnableNOPOut
If set to non-zero value, the initiator will send NOP OUT PDUs to target if there is no activity for 2 minutes.
The default value is 0
MaxTransferLength
This is maximum data size of an I/O request.
The default value is 262144 (256KB)
MaxBurstLength
This is the negotiated Max Burst Length.
The default value is 262144 (256KB)
FirstBurstLength
This is the negotiated First Burst Length.
The default value is 65536 (64KB)
MaxRecvDataSegmentLength
This is the negotiated MaxRecvDataSegmentLength.
The default value is 65536 (64KB)
IPSecConfigTimeout
Timeout value used when the driver calls the discovery service to configure\release ipsec for an iscsi connection.
The default value for this is 15 seconds.
InitialR2T
If set to Non-Zero value, initiator will request InitialR2T (InitialR2T=Yes). Else initiator will not request InitialR2T (InitialR2T=No).
The default value for this is 0 (InitialR2T=No)
ImmediateData
If set to Non-Zero value, initiator will request ImmediateData (ImmediateData=Yes). Else initiator will not request ImmediateData (ImmediateData=No).
The default value for this is 1 (ImmediateData=Yes)
LinkDownTime
This value determines how long requests will be held in the device queue and retried if the connection to the target is lost. If MPIO is installed this value is used. If MPIO is not installed MaxRequestHoldTime is used instead.
The default value for this is 15 seconds.
PortalRetryCount
This value is used to determine how many times a connect request to a target portal should be retried if the portal is down.
The default value for this is 1
NetworkReadyRetryCount
This value is used to detemine how many times initiator should retry getting the IP address of NIC corresponding to the PortNumber specified in the login request.
The default value for this is 10.
ErrorRecoveryLevel
Error recovery level that the initiator will request.
The default value for this is 2.
SRBTimeoutDelta
The timeout set by class drivers (such as disk.sys, etc) for various requests does not take into account network delays. This value is used to increment the timeout set by class drivers.
SrbTimeoutDelta can be as low as 5 seconds. If it is lower than that, initiator will use 15 instead.
SrbTimeoutDelta gets added to the timeout set by the class driver.
The default value is 15 seconds.
AsyncLogoutPauseTimeout
This is the number of seconds that the initiator will pause the I/O queue after receiving an async logout.
The default value is 10 seconds.