我们设置了一个 Ubuntu 服务器 (22.04.3 LTS) 用作 Veeam 存储库。我们想通过 iSCSI 连接 NetApp 存储上的 LUN。设置本身没有问题,直到服务器必须重新启动。重新启动后,服务器最终进入紧急提示,登录并检查系统没有发现任何异常,因此我完成了启动,一切正常。当我重新启动以查找问题时,消息显示安装 iSCSI LUN 时出现问题,当我们再次在紧急提示结束时,这次我告诉它一两分钟后完成启动 (Control+D),再次,一切都正常。进一步的尝试没有提供任何进一步的信息,所以我去检查日志。这是我找到的相关部分:
它会尝试在启动初期挂载文件系统,但当然会失败
Jan 29 12:37:42 hwlxve01 systemd[1]: dev-disk-by\x2duuid-5e252ca3\x2d9f19\x2d4a9c\x2d946d\x2d4cd4e02d29ff.device: Job dev-disk-by\x2duuid-5e252ca3\x2d9f19\x2d4a9c\x2d946d\x2d4cd4e02d29ff.device/start timed out.
Jan 29 12:37:42 hwlxve01 systemd[1]: Timed out waiting for device /dev/disk/by-uuid/5e252ca3-9f19-4a9c-946d-4cd4e02d29ff.
Jan 29 12:37:42 hwlxve01 systemd[1]: Dependency failed for /mnt/veeam-hr01.
Jan 29 12:37:42 hwlxve01 systemd[1]: Dependency failed for Local File Systems.
Jan 29 12:37:42 hwlxve01 systemd[1]: local-fs.target: Job local-fs.target/start failed with result 'dependency'.
Jan 29 12:37:42 hwlxve01 systemd[1]: local-fs.target: Triggering OnFailure= dependencies.
Jan 29 12:37:42 hwlxve01 systemd[1]: mnt-veeam\x2dhr01.mount: Job mnt-veeam\x2dhr01.mount/start failed with result 'dependency'.
Jan 29 12:37:42 hwlxve01 systemd[1]: dev-disk-by\x2duuid-5e252ca3\x2d9f19\x2d4a9c\x2d946d\x2d4cd4e02d29ff.device: Job dev-disk-by\x2duuid-5e252ca3\x2d9f19\x2d4a9c\x2d946d\x2d4cd4e02d29ff.device/start failed with result 'timeout'.
稍后网络就会启动,例如
Jan 29 12:37:44 hwlxve01 kernel: ixgbe 0000:03:00.1 enp3s0f1: NIC Link is Up 10 Gbps, Flow Control: RX/TX
然后 iSCSI 开始登录
Jan 29 12:38:01 hwlxve01 systemd[1]: Starting Login to default iSCSI targets...
90秒后进入暂停
Jan 29 12:39:31 hwlxve01 systemd[1]: Timed out waiting for device /dev/disk/by-uuid/5e252ca3-9f19-4a9c-946d-4cd4e02d29ff.
Jan 29 12:39:31 hwlxve01 systemd[1]: Dependency failed for /mnt/veeam-hr01.
这个错误出现了几次:
Jan 29 12:39:32 hwlxve01 iscsiadm[986]: iscsiadm: Could not login to [iface: iscsi02, target: iqn.1992-08.com.netapp:sn.c45dccd4641511ee880bd039eaaae634:vs.7, portal: 192.168.114.3,3260].
Jan 29 12:39:32 hwlxve01 iscsiadm[986]: iscsiadm: initiator reported error (20 - could not connect to iscsid)
好极了,它进入了 Emergency Shell
Jan 29 12:42:34 hwlxve01 systemd[1]: Started Emergency Shell.
Jan 29 12:42:34 hwlxve01 systemd[1]: Reached target Emergency Mode.
几秒钟后,它就可以成功连接所有路径
Jan 29 12:42:35 hwlxve01 systemd[1]: Started iSCSI initiator daemon (iscsid).
Jan 29 12:42:35 hwlxve01 kernel: Loading iSCSI transport class v2.0-870.
Jan 29 12:42:35 hwlxve01 kernel: iscsi: registered transport (tcp)
Jan 29 12:42:35 hwlxve01 kernel: scsi host11: iSCSI Initiator over TCP/IP
Jan 29 12:42:35 hwlxve01 kernel: scsi host12: iSCSI Initiator over TCP/IP
Jan 29 12:42:35 hwlxve01 kernel: scsi 11:0:0:0: Direct-Access NETAPP LUN C-Mode 9131 PQ: 0 ANSI: 5
Jan 29 12:42:35 hwlxve01 kernel: scsi 11:0:0:0: alua: supports implicit TPGS
Jan 29 12:42:35 hwlxve01 kernel: scsi 11:0:0:0: alua: device naa.600a098038314c6f445d565238477871 port group 3e9 rel port 6
Jan 29 12:42:35 hwlxve01 kernel: sd 11:0:0:0: Attached scsi generic sg2 type 0
多路径发挥作用
Jan 29 12:42:36 hwlxve01 multipathd[659]: mpatha: reload [0 176093659136 multipath 3 pg_init_retries 50 queue_if_no_path 1 alua 2 1 service-time 0 1 1 8:16 1 service-time 0 2 1 8:48 1 8:32 1]
好的,我知道 iSCSI 登录可能需要一些时间,但这么长时间似乎很奇怪。另外,为什么我会收到 iSCSI 守护进程连接错误?
我能做些什么?
如果需要进一步的日志,请告诉我。
我建立了一些类似的设置,但没有遇到类似的问题。