我刚刚在 Raspberry Pi 4 的 SD 卡上安装了最新版本的 Manjaro ARM。现在我尝试使用 fstab 永久挂载 Synology NAS 上的两个目录(当然通过网络)。在我的所有其他系统(包括较旧的 Manjaro 版本)上,这适用于我的 fstab 中完全相同的两行(这里仅是一个示例):
//192.168.1.61/inventory /mnt/DS_216/inventory cifs users,vers=3.0,credentials=/mnt/DS_216/216credentials,uid=1000,gid=1000,workgroup=WORKGROUP,noauto,nofail,x-systemd.automount,x-systemd.device-timeout=0,_netdev 0 0
但是,这一次,它似乎一开始就不起作用,直到我发现它确实有效,但有一个主要问题:尽管其他所有内容都已加载,但它在实际安装之前延迟了 1 分 40 秒。当我在启动后打开终端时,我只看到黑屏,并且需要花费上述时间才能username@hostname$
出现该行。如果我在这段时间内按 Ctrl+C,它会立即出现。
查看journalctl输出,你可以看到发生了什么,尽管它没有多大意义:它说,网络无法配置,但如果我在启动后ping任何东西,它工作正常。另外,根据journalctl,这里发生的所有事情,所有这些不都应该在fstab完全执行之后吗?正如我所说,这在旧版 manjaro 版本上从未发生过。我在这里错过了什么?我是否误解了journalctl的输出?或者是否存在一些我不知道的延迟硬编码到 systemd 中?
预先感谢任何可以帮助我的人。
这是journalctl输出的相关部分:
Jun 03 19:49:54 Raspi4 systemd[1]: mnt-DS_216-FamilyTransfer.automount: Got automount request for /mnt/DS_216/FamilyTransfer, triggered by 880 (silver)
Jun 03 19:49:55 Raspi4 guake.desktop[733]: Guake initialized
Jun 03 19:49:57 Raspi4 org.moson.matray.desktop[682]: matray started.
Jun 03 19:49:57 Raspi4 matray[682]: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Jun 03 19:49:59 Raspi4 kernel: cam-dummy-reg: disabling
Jun 03 19:50:16 Raspi4 systemd[413]: Started Application launched by gsd-media-keys.
Jun 03 19:50:16 Raspi4 gsd-media-keys[909]: Sending 'toggle' message to Guake3
Jun 03 19:50:16 Raspi4 gnome-shell[478]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x60000c
Jun 03 19:50:16 Raspi4 gnome-shell[478]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x60000c
Jun 03 19:50:18 Raspi4 gnome-shell[478]: updates_checker.vala:71: check updates
Jun 03 19:50:18 Raspi4 kernel: logitech-hidpp-device 0003:046D:1028.0006: HID++ 1.0 device connected.
Jun 03 19:50:18 Raspi4 upowerd[562]: treated changed event as add on /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3.2/1-1.3.2:1.2/0003:046D:C52B.0003/0003:046D:1028.0006/power_supply/hid>
Jun 03 19:50:19 Raspi4 guake.desktop[733]: Spawning new terminal at /home/benedikt
Jun 03 19:50:19 Raspi4 systemd[413]: Started VTE child process 950 launched by guake process 733.
Jun 03 19:50:20 Raspi4 gnome-shell[478]: updates_checker.vala:101: 0 updates found
Jun 03 19:50:20 Raspi4 systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Jun 03 19:50:21 Raspi4 systemd[1]: systemd-localed.service: Deactivated successfully.
Jun 03 19:50:46 Raspi4 geoclue[579]: Service not used for 60 seconds. Shutting down..
Jun 03 19:50:46 Raspi4 systemd[1]: geoclue.service: Deactivated successfully.
Jun 03 19:50:48 Raspi4 dbus-daemon[430]: [session uid=1000 pid=430] Activating via systemd: service name='org.gtk.vfs.Metadata' unit='gvfs-metadata.service' requested by ':1.11' (uid=1000 pid=478 comm="/usr/bin/gnome-shell")
Jun 03 19:50:48 Raspi4 systemd[413]: Starting Virtual filesystem metadata service...
Jun 03 19:50:48 Raspi4 dbus-daemon[430]: [session uid=1000 pid=430] Successfully activated service 'org.gtk.vfs.Metadata'
Jun 03 19:50:48 Raspi4 systemd[413]: Started Virtual filesystem metadata service.
Jun 03 19:51:34 Raspi4 systemd-networkd-wait-online[289]: Timeout occurred while waiting for network connectivity.
Jun 03 19:51:34 Raspi4 systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Jun 03 19:51:34 Raspi4 systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Jun 03 19:51:34 Raspi4 systemd[1]: Failed to start Wait for Network to be Configured.
Jun 03 19:51:34 Raspi4 systemd[1]: Reached target Network is Online.
Jun 03 19:51:34 Raspi4 systemd[1]: Mounting /mnt/DS_216/FamilyTransfer...
Jun 03 19:51:34 Raspi4 systemd[1]: Starting Samba NMB Daemon...
Jun 03 19:51:34 Raspi4 kernel: FS-Cache: Netfs 'cifs' registered for caching
Jun 03 19:51:34 Raspi4 kernel: Key type cifs.spnego registered
Jun 03 19:51:34 Raspi4 kernel: Key type cifs.idmap registered
Jun 03 19:51:34 Raspi4 kernel: CIFS: Attempting to mount \\192.168.1.61\FamilyTransfer
Jun 03 19:51:34 Raspi4 systemd[1]: Mounted /mnt/DS_216/FamilyTransfer.```
答案1
不知何故,NetworkManager 和 systemd-networkd 都在运行,因此它们以某种方式互相阻塞,因此 systemd-networkd 的两分钟超时必须在 fstab 执行之前结束。这也解释了为什么网络连接一直存在。关闭网络服务并坚持使用 NetworkManager ( systemctl disable systemd-networkd-wait-online
) 解决了我的所有问题。