我正在和Open-iSCSI玩,遇到了一些麻烦。当我的发起者和目标之间的网络链接失败时,iscsid将恢复连接,这是很好的。但我的坐骑坏了,并产生I/O error,直到它被重新安装。
是否有一个干净的解决方案来自动重装lun?比如恢复后的钩子或配置设置,但我不知何故错过了?我试图避免使用轮询脚本或类似的内容:)
Jan 14 08:03:45 localhost iscsid[1415]: iscsid: Kernel reported iSCSI connection 1:0 error (1022 - ISCSI_ERR_NOP_TIMEDOUT: A NOP has timed out) state (3)
Jan 14 08:04:22 localhost iscsid[1415]: iscsid: connect to 10.0.2.100:9999 failed (No route to host)
[...]
Jan 14 08:38:43 localhost iscsid[1415]: iscsid: connect to 10.0.2.100:9999 failed (No route to host)
Jan 14 08:38:47 localhost iscsid[1415]: iscsid: connection1:0 is operational after recovery (195 attempts)
Jan 14 08:39:52 localhost iscsid[1415]: iscsid: Kernel reported iSCSI connection 1:0 error (1020 - ISCSI_ERR_TCP_CONN_CLOSE: TCP connection closed) state (3)
Jan 14 08:40:11 localhost iscsid[1415]: iscsid: connection1:0 is operational after recovery (2 attempts)UUID=cf3d20cd-a8cd-4a9a-acbf-1c61289a37bb /data xfs defaults,_netdev,x-systemd.requires=iscsid.service 0 0发布于 2022-04-19 15:37:17
总之,不,没有神奇的清洁的解决方案。最干净的恢复是重新启动。
问题是,当连接超过iscsid的replacement_timeout时,文件系统就开始获取I/O错误。除非您有一个非常特殊的应用程序,否则通常不会从I/O错误中返回。它对服务造成了各种各样的破坏。你几乎总是更好的重新启动,而不是你试图理清所有的程序如何停止工作。
话虽如此,你能做的就是把replacement_timeout推到你喜欢的地方。您将在web上找到对应用程序的引用,比如建议超时一个小时(3600秒)或更长时间的数据库。这就把问题推到了像NFS硬安装卡一样的东西上。如果您需要设计一个系统,在这个系统中人类必须进行干预才能修复它,那么更长的超时时间是件好事。系统只是挂起,直到链接回来。
可以在/etc/iscsi/iscsid.conf中为整个系统设置默认值。编辑这一行:
node.session.timeo.replacement_timeout = 120https://serverfault.com/questions/1090058
复制相似问题