iSCSI timeout configuration settings for the system

You can set the timeout value for disks.

The disk timeout is set in the /sys/block/<device>/device/timeout file. Depending on operating system and OS version, increase the default value of 30 or 60 seconds to 120 in most situations.

For example, if the device is /dev/sdc, you would use:

[root@R64SRV6 ~]#echo -n 60 > /sys/block/sdc/device/timeout
Note: All RHEL7 systems need to have the parameter changed to 30 seconds, otherwise RHEL7 hosts cannot regain previously failed paths such as in the case of an SVC upgrade or where a node is manually rebooted.
To resolve this issue, change the RHEL7 host parameter by completing the following steps:
  1. Open the file /sys/module/scsi_mod/parameters/inq_timeout
  2. Set the parameter to scsi_mod.inq_timeout of 30 (which means the parameter is now changed to 30 seconds)
Once the setting is changed, RHEL7 will not lose paths permanently during upgrade.
To increase the SCSI command timeout for the system, create the following udev rule so that it is not necessary to set the timeout manually for each mapped disk:
udev rules file
cat /etc/udev/rules.d/99-ibm-2145.rules

# Set SCSI command timeout to 120s (default == 30 or 60) for IBM 2145 devices
SUBSYSTEM=="block", ACTION=="add", ENV{ID_VENDOR}=="IBM",
ENV{ID_MODEL}=="2145", RUN+="/bin/sh -c 'echo 120 > /sys/block/%k/device/timeout'"
  
Reconfirm the settings after your restart the system. After you set up your volumes, use multipath -ll | grep sd to locate the block device paths. Also, check with cat /sys/block/sd<x>/device/timeout for 120 seconds, where <x> is a 2145 path. For example:
edam:~ # multipath -ll | grep sd | tail -1
  `- 10:0:0:4 sdl 8:176 active ready running
edam:~ # cat /sys/class/block/sdl/device/timeout
120
edam:~ #