10.2. 使用光纤通道确定设备链路丢失行为
如果驱动程序实现了传输 dev_loss_tmo
回调,当检测到传输问题时,通过链接访问设备的尝试将被阻止。
步骤
确定远程端口的状态:
cat /sys/class/fc_remote_ports/rport-host:bus:remote-port/port_state
$ cat /sys/class/fc_remote_ports/rport-host:bus:remote-port/port_state
Copy to Clipboard Copied! 这个命令返回以下输出之一:
-
当远程端口以及通过它访问的设备被阻止时为
Blocked
。 如果远程端口正常运行,则为
Online
如果在
dev_loss_tmo
秒内没有解决这个问题,则rport
和设备将被取消阻塞。所有在该设备上运行的 I/O 以及发送到该设备的新 I/O 将失败。
-
当远程端口以及通过它访问的设备被阻止时为
当链路丢失超过 dev_loss_tmo
时,会删除 scsi_device
和 sd_N_
设备。通常,光纤通道类不会更改设备,例如 /dev/sda
保留 /dev/sda
。这是因为目标绑定由 Fibre Channel 驱动程序保存,当目标端口返回时,SCSI 地址会被重新创建。但是,这无法保证,只有在没有 LUN 的存储框中配置时,才会恢复该设备。