1.16.2. iSCSI Settings With dm-multipath
If
dm-multipath
is implemented, it is advisable to set iSCSI timers to immediately defer commands to the multipath layer. To configure this, nest the following line under device {
in /etc/multipath.conf
:
features "1 queue_if_no_path"
This ensures that I/O errors are retried and queued if all paths are failed in the
dm-multipath
layer.
You may need to adjust iSCSI timers further to better monitor your SAN for problems. Available iSCSI timers you can configure are NOP-Out Interval/Timeouts and
replacement_timeout
, which are discussed in the following sections.
1.16.2.1. NOP-Out Interval/Timeout
To help monitor problems the SAN, the iSCSI layer sends a NOP-Out request to each target. If a NOP-Out request times out, the iSCSI layer responds by failing any running commands and instructing the SCSI layer to requeue those commands when possible.
When
dm-multipath
is being used, the SCSI layer will fail those running commands and defer them to the multipath layer. The multipath layer then retries those commands on another path. If dm-multipath
is not being used, those commands are retried five times before failing altogether.
Intervals between NOP-Out requests are 10 seconds by default. To adjust this, open
/etc/iscsi/iscsid.conf
and edit the following line:
node.conn[0].timeo.noop_out_interval = [interval value]
Once set, the iSCSI layer will send a NOP-Out request to each target every [interval value] seconds.
By default, NOP-Out requests time out in 10 seconds[6]. To adjust this, open
/etc/iscsi/iscsid.conf
and edit the following line:
node.conn[0].timeo.noop_out_timeout = [timeout value]
This sets the iSCSI layer to timeout a NOP-Out request after [timeout value] seconds.
Note that this will not work for iSCSI targets already logged in or discovered once. In this case run
iscsiadm
to update configuration values explicitly.
iscsiadm -m node -T $target_name -p $target_ip:$port -o update -n \ node.session.timeo.replacement_timeout -v $timeout_value
SCSI Error Handler
If the SCSI Error Handler is running, running commands on a path will not be failed immediately when a NOP-Out request times out on that path. Instead, those commands will be failed after
replacement_timeout
seconds. For more information about replacement_timeout
, refer to Section 1.16.2.2, “replacement_timeout
”.
To verify if the SCSI Error Handler is running, run:
iscsiadm -m session -P 3