Setting the SCSI command timeout
You can change the timeout if the default is not suitable for your storage system.
Before you begin
About this task
There is a timeout for SCSI commands. If the timeout expires before a SCSI command completes, error recovery starts. The default timeout is 30 seconds.
To find out the current timeout,
read the timeout
attribute of the SCSI device:
# cat /sys/bus/scsi/devices/<scsi_host_no>:0:<scsi_id>:<scsi_lun>/timeout
where:
- <scsi_host_no>
- is the SCSI host number that corresponds to the FCP device.
- <scsi_id>
- is the SCSI ID of the target port.
- <scsi_lun>
- is the LUN of the SCSI device.
The attribute value specifies the timeout in seconds.
Procedure
To set a different timeout, enter a command of this form:
# echo <timeout> > /sys/bus/scsi/devices/<scsi_host_no>:0:<scsi_id>:<scsi_lun>/timeout
where <timeout> is the new timeout in seconds.
Example
In the following example, the timeout of a SCSI device 1:0:18:1086537744 is first read and then set to 45 seconds:
# cat /sys/bus/scsi/devices/1:0:18:1086537744/timeout
30
# echo 45 > /sys/bus/scsi/devices/1:0:18:1086537744/timeout