Show Table of Contents
Fibre Channel:
1.16. Modifying Link Loss Behavior
This section describes how to modify the link loss behavior of devices that use either fibre channel or iSCSI protocols.
1.16.1. Fibre Channel
If a driver implements the Transport
dev_loss_tmo callback, access attempts to a device through a link will be blocked when a transport problem is detected. To verify if a device is blocked, run the following command:
cat /sys/block/device/device/state
This command will return
blocked if the device is blocked. If the device is operating normally, this command will return running.
Procedure 1.6. Determining The State of a Remote Port
- To determine the state of a remote port, run the following command:
cat /sys/class/fc_remote_port/rport-H:B:R/port_state - This command will return
Blockedwhen the remote port (along with devices accessed through it) are blocked. If the remote port is operating normally, the command will returnOnline. - If the problem is not resolved within
dev_loss_tmoseconds, the rport and devices will be unblocked and all IO running on that device (along with any new IO sent to that device) will be failed.
Procedure 1.7. Changing dev_loss_tmo
- To change the
dev_loss_tmovalue,echoin the desired value to the file. For example, to setdev_loss_tmoto 30 seconds, run:echo 30 > /sys/class/fc_remote_port/rport-H:B:R/dev_loss_tmo
For more information about
dev_loss_tmo, refer to Section 1.1.1, “Fibre Channel API”.
When a device is blocked, the fibre channel class will leave the device as is; i.e.
/dev/sdx will remain /dev/sdx. This is because the dev_loss_tmo expired. If the link problem is fixed at a later time, operations will continue using the same SCSI device and device node name.
Fibre Channel: remove_on_dev_loss
If you prefer that devices are removed at the SCSI layer when links are marked bad (i.e. expired after
dev_loss_tmo seconds), you can use the scsi_transport_fc module parameter remove_on_dev_loss. When a device is removed at the SCSI layer while remove_on_dev_loss is in effect, the device will be added back once all transport problems are corrected.
Warning
The use of
remove_on_dev_loss is not recommended, as removing a device at the SCSI layer does not automatically unmount any file systems from that device. When file systems from a removed device are left mounted, the device may not be properly removed from multipath or RAID devices.
Further problems may arise from this if the upper layers are not hotplug-aware. This is because the upper layers may still be holding references to the state of the device before it was originally removed. This can cause unexpected behavior when the device is added again.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.