我正在尝试安装一个 NFS 服务器,其中服务器端是运行 MacOS Mojave 的笔记本电脑,客户端是运行使用 Yocto 构建的 Ubuntu Linux 的 SAMA5D27 板。
我已为 SAMA5D27 开发板分配了 IP 地址,并且能够从我的笔记本电脑 ping SAMA5D27 开发板,反之亦然。因此它们彼此可见。
在我的笔记本电脑上,我编辑了 /etc/exports 文件,内容如下:
/Users/mntpnt -network 192.168.1.8 -mask 255.255.255.0
然后我通过运行以下命令在笔记本电脑上启动了 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.8
然后我尝试在客户端 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
这似乎一直循环进行,直到连接超时。
知道可能出了什么问题吗?