【发布时间】:2021-07-04 14:34:08
【问题描述】:
我正在尝试在使用 Yocto 构建的 Linux 映像上启用 NFS。该图像在开发板上运行 - Qualcomm RB5。开机后,mount.nfs 好像没有用,报错
mount.nfs: No such device
当我使用 dmesg | 检查时grep nfs,我得到了以下信息,但无法弄清楚失败的原因是什么
[ 7.323526] systemd[597]: proc-fs-nfsd.mount: Failed to connect stdout to the journal socket, ignoring: No such file or directory
[ 7.326328] request_module fs-nfsd succeeded, but still no fs?
[ 7.337908] systemd[1]: proc-fs-nfsd.mount: Mount process exited, code=exited, status=32/n/a
[ 7.338655] systemd[1]: proc-fs-nfsd.mount: Failed with result 'exit-code'.
[ 7.346027] systemd[1]: nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'.
[ 7.346754] systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
[ 7.454332] systemd[649]: proc-fs-nfsd.mount: Failed to connect stdout to the journal socket, ignoring: No such file or directory
[ 7.459122] systemd[1]: proc-fs-nfsd.mount: Mount process exited, code=exited, status=32/n/a
[ 7.460157] systemd[1]: proc-fs-nfsd.mount: Failed with result 'exit-code'.
[ 8.235626] systemd[726]: proc-fs-nfsd.mount: Failed to connect stdout to the journal socket, ignoring: No such file or directory
[ 8.241962] systemd[1]: proc-fs-nfsd.mount: Mount process exited, code=exited, status=32/n/a
[ 8.243164] systemd[1]: proc-fs-nfsd.mount: Failed with result 'exit-code'.
当我使用“systemctl status proc-fs-nfsd.mount”检查时,它显示如下:
Jan 01 06:55:40 qrb5165-rb5 mount[1377]: mount: /proc/fs/nfsd: unknown filesystem type 'nfsd'.
这很令人困惑,因为我以为我启用了 nfs。
我确定我在 local.conf 中启用了 NFS 支持。以下是我用来启用 NFS 的行:
DISTRO_FEATURES_append = " nfs"
EXTRA_IMAGE_FEATURES += "nfs-server"
EXTRA_IMAGE_FEATURES += "nfs-client"
我错过了什么?
【问题讨论】:
-
mount: /proc/fs/nfsd: unknown filesystem type 'nfsd' - 在我的情况下,这个错误是由于无法使用 OpenVz 虚拟化在 VPS 中运行 nfs 引起的。您需要具有 KVM 或 VMWARE 虚拟化的 VPS 才能使 Docker 中的 NFS 服务器正常工作。 Docker Swarm 也是如此,在 OpenVz 中也不起作用(嗯,取决于您的提供商,但我的内核模块已锁定)