我是 Linux Mint 的长期用户。我刚刚在一台新建的台式电脑上安装了 Mint 21.1 Cinnamon 版本。
我已经设置了一个 systemd 挂载单元,以在启动时自动挂载 nfs 共享:
$ cat /etc/systemd/system/net-bungle.mount
[Unit]
Description=bungle fileserver
[Mount]
What=bungle:/srv/nfs4/pool2
Where=/net/bungle
Type=nfs
Options=_netdev,vers=4
TimeoutSec=10
[Install]
WantedBy=multi-user.target
$ cat /etc/systemd/system/net-bungle.automount
[Unit]
Description=automount /net/bungle
[Automount]
Where=/net/bungle
[Install]
WantedBy=multi-user.target
.mount 单元存在但未启用;.automount 单元已启用。
一切似乎运行良好:第一次访问目录时它会自动挂载,并且没有显示任何错误journalctl -u net-bungle.[auto]mount
。
当我在 nfs 挂载(例如 nemo)中为目录添加书签时,就会出现问题/net/bungle/backup
。输入登录密码后,桌面出现之前会有 15-20 秒的延迟(如果没有书签,桌面会立即出现)。
日志表明,nemo 在网络准备就绪之前在登录时尝试反复访问该目录,导致自动挂载失败:
journalctl -u net-bungle.automount
Mar 26 08:18:29 zippy systemd[1]: Set up automount automount /net/bungle.
Mar 26 08:19:02 zippy systemd[1]: net-bungle.automount: Got automount request for /net/bungle, triggered by 3354 (cinnamon)
Mar 26 08:19:05 zippy systemd[1]: net-bungle.automount: Got automount request for /net/bungle, triggered by 3354 (cinnamon)
Mar 26 08:19:05 zippy systemd[1]: net-bungle.automount: Got automount request for /net/bungle, triggered by 3354 (cinnamon)
Mar 26 08:19:05 zippy systemd[1]: net-bungle.automount: Got automount request for /net/bungle, triggered by 3354 (cinnamon)
Mar 26 08:19:05 zippy systemd[1]: net-bungle.automount: Got automount request for /net/bungle, triggered by 3354 (cinnamon)
Mar 26 08:19:05 zippy systemd[1]: net-bungle.automount: Got automount request for /net/bungle, triggered by 3354 (cinnamon)
Mar 26 08:19:05 zippy systemd[1]: net-bungle.automount: Failed with result 'mount-start-limit-hit'.
journalctl -u net-bungle.mount
:
Mar 26 08:19:04 zippy systemd[1]: Mounting bungle fileserver...
Mar 26 08:19:05 zippy mount[4394]: mount.nfs: Network is unreachable
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Mount process exited, code=exited, status=32/n/a
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Failed with result 'exit-code'.
Mar 26 08:19:05 zippy systemd[1]: Failed to mount bungle fileserver.
Mar 26 08:19:05 zippy systemd[1]: Mounting bungle fileserver...
Mar 26 08:19:05 zippy mount[4481]: mount.nfs: Network is unreachable
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Mount process exited, code=exited, status=32/n/a
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Failed with result 'exit-code'.
Mar 26 08:19:05 zippy systemd[1]: Failed to mount bungle fileserver.
Mar 26 08:19:05 zippy systemd[1]: Mounting bungle fileserver...
Mar 26 08:19:05 zippy mount[4483]: mount.nfs: Network is unreachable
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Mount process exited, code=exited, status=32/n/a
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Failed with result 'exit-code'.
Mar 26 08:19:05 zippy systemd[1]: Failed to mount bungle fileserver.
Mar 26 08:19:05 zippy systemd[1]: Mounting bungle fileserver...
Mar 26 08:19:05 zippy mount[4485]: mount.nfs: Network is unreachable
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Mount process exited, code=exited, status=32/n/a
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Failed with result 'exit-code'.
Mar 26 08:19:05 zippy systemd[1]: Failed to mount bungle fileserver.
Mar 26 08:19:05 zippy systemd[1]: Mounting bungle fileserver...
Mar 26 08:19:05 zippy mount[4487]: mount.nfs: Network is unreachable
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Mount process exited, code=exited, status=32/n/a
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Failed with result 'exit-code'.
Mar 26 08:19:05 zippy systemd[1]: Failed to mount bungle fileserver.
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Start request repeated too quickly.
Mar 26 08:19:05 zippy systemd[1]: net-bungle.mount: Failed with result 'exit-code'.
Mar 26 08:19:05 zippy systemd[1]: Failed to mount bungle fileserver.
有人知道如何告诉 nemo 在启动时不要访问已加书签的目录吗?nemo --help
没有显示任何有用的信息。
答案1
为将来遇到此问题的人回答我自己的问题......
问题出在 NetworkManager 与我的桥接以太网设置不兼容。我用 systemd-networkd 替换了 NetworkManager,问题就解决了。