Modifying the iSCSI Timeout Parameter
Symptom
On an iSCSI network, path switchover takes a long time.
Root Cause
The default iSCSI timeout period is 120s. In the event of a path failure, the system keeps retrying the failed path before timeout. During this period, the system does not switch over services to an available path.
Solution
To temporarily change the timeout period, run the following command. Replace new_value in the command with the desired period, for example, 10 (seconds). The change loses efficacy after the host restarts.
iscsiadm -m node -o update -n node.session.timeo.replacement_timeout -v new_value
To permanently change the timeout period, find and modify node.session.timeo.replacement_timeout in the iSCSI configuration file (generally /etc/iscsi.conf or /etc/iscsi/iscsid.conf), save the modification, and restart the host for the modification to take effect.