安装 NFS 服务器的问题:服务器端 MacOS、客户端 SAMA5D27 板

安装 NFS 服务器的问题:服务器端 MacOS、客户端 SAMA5D27 板

我正在尝试安装 NFS 服务器,服务器端是运行 MacOS Mojave 的笔记本电脑,客户端是运行使用 Yocto 构建的 Ubuntu Linux 的 SAMA5D27 板。

我已为 SAMA5D27 板分配了一个 IP 地址,并且能够从我的笔记本电脑 ping SAMA5D27 板,反之亦然。所以他们彼此可见。

在我的笔记本电脑上,我编辑了 /etc/exports 文件以说明以下内容:

/Users/mntpnt    192.168.1.100(rw, no_root_squash)

然后,我通过运行以下命令在笔记本电脑上启动 nfsd:

$ sudo nfsd enable
$ sudo nfsd start

$ sudo nfsd status 
nfsd service is enabled
nfsd is running (pid 24885, 8 threads)

在SAMA5D27上,我运行以下命令(服务器IP:192.168.1.8)

$ showmount -e 192.168.1.8

表明:

Export list for 192.168.1.8:
/Users/mntpnt 192.168.1.100

然后,我尝试在客户端 SAMA5D27 上使用以下命令进行安装:

$ sudo mount -v -t nfs 192.168.1.8:/Users/mntpnt /mntpnt
mount.nfs: timeout set for Thu ApNF 9 00:37:14 2020S: bad mount option value specified: minorversion=1

mount.nfs: trying text-based options 'vers=4.2,addr=192.168.1.8,clientaddr=192.168.1.100'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4,minorversion=1,addr=192.168.1.8,clientaddr=192.168.1.100'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.8,clientaddr=192.168.1.100'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.8'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.8 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: portmap query retrying: RPC: Timed out
mount.nfs: prog 100005, trying vers=3, prot=6
mount.nfs: trying 192.168.1.8 prog 100005 vers 3 prot TCP port 872
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.8:/Users/mntpnt 

我还尝试编辑 /etc/exports 中的权限,使其现在显示为:

/Users/mntpnt    -network 192.168.1.8 (rw, no_root_squash)    -mask 255.255.255.0

$ sudo nfsd restart之后我也在我的 MacOS 上做了一个。

现在,SAMA5D27 上的访问被拒绝错误消失了,但我现在根本没有收到响应:

$ sudo mount -v -t nfs 192.168.1.8:/Users/mntpnt /mntpnt
mount.nfs: timeout set for Thu Apr  9 00:45:43 2020NFS: bad mount option value specified: minorversion=1

mount.nfs: trying text-based options 'vers=4.2,addr=192.168.1.8,clientaddr=192.168.1.100'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4,minorversion=1,addr=192.168.1.8,clientaddr=192.168.1.100'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.8,clientaddr=192.168.1.100'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.8'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: prog 100003, trying vers=3, prot=17

这似乎会一直循环下去,直到连接超时。

有什么想法可能会出问题吗?

编辑:

@NasirRiley - 是的,我在重试之前确实做了 sudo nfsd restart 。

这是您建议的命令的输出:

$ sudo mount -v -t nfs 192.168.1.8:/Users/mntpnt /mntpnt
mount.nfs: timeout set for Thu NFr  9 00:04:29 2020S: bad mount option value specified: minorversion=1

mount.nfs: trying text-based options 'vers=4.2,addr=192.168.1.8,clientaddr=192.168.1.100'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4,minorversion=1,addr=192.168.1.8,clientaddr=192.168.1.100'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.8,clientaddr=192.168.1.100'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.8'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.8 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: portmap query retrying: RPC: Timed out
mount.nfs: prog 100005, trying vers=3, prot=6
mount.nfs: trying 192.168.1.8 prog 100005 vers 3 prot TCP port 718
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.8:/Users/mntpnt

这是输出

$ sudo mount -v -t nfs -o nfsvers=3 192.168.1.8:/Users/mntpnt /mntpnt 

mount.nfs: timeout set for Thu Apr  9 00:06:33 2020
mount.nfs: trying text-based options 'nfsvers=3,addr=192.168.1.8'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.8 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: portmap query retrying: RPC: Timed out
mount.nfs: prog 100005, trying vers=3, prot=6
mount.nfs: trying 192.168.1.8 prog 100005 vers 3 prot TCP port 718
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.8:/Users/mntpnt

相关内容