【问题标题】:Failed to enable NFS on Yocto Lilnux在 Yocto Linux 上启用 NFS 失败
【发布时间】: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 中也不起作用(嗯,取决于您的提供商,但我的内核模块已锁定)

标签: yocto nfs


【解决方案1】:

经过数小时的挖掘,我刚刚让 NFS 在设备上运行。失败是由我没有在内核中启用 NFS 文件系统支持的新手错误引起的,因此没有构建相应的内核驱动程序。我想我以某种方式假设 Yocto 会为你做到这一点,但实际上它不会。我在内核配置中添加了以下更改以在设备上启用 NFS:

CONFIG_NFS_FS=y
CONFIG_NFSD=y

【讨论】:

  • 只是为了让您的答案更清楚,您可能希望包括这是在哪个操作系统上,以及您将这些行添加到哪个文件。你还需要重新启动一些东西吗?
猜你喜欢
  • 2015-06-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-11-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多