如何延迟系统服务的启动或远程文件系统的挂载,直到网络完全可用
Issue
-
配置为绑定到特定 IP 地址的服务失败,并显示 Cannot assign requested address 或类似的错误消息
-
配置为绑定到特定 IPv6 地址的服务无法启动,即使它被配置为在
network-online.target
后启动 -
配置为连接到特定 IPv6 地址的远程文件系统(如 NFS、CIFS)无法在引导时自动挂载
[...] systemd[1]: remote.mount: Mounting timed out. Terminating. [...] remote.mount: Mount process exited, code=killed status=15 [...] remote.mount: Failed with result 'timeout'. [...] systemd[1]: Failed to mount /remote.
-
配置为连接到主机名的远程文件系统(如 NFS 和 CIFS)无法在引导时自动挂载
-
作为 NFS 服务器服务的系统无法将其目录导出到 NFS 客户端
[...] exportfs[XXX]: exportfs: Failed to resolve <some nfs client name>
Environment
- Red Hat Enterprise Linux 7 及更新版本
- systemd
- dovecot, httpd, sshd, ...
- NFS, CIFS
- 使用名称解析时的 IPv6 和 IPv4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.