我在我的 Raspberry PI 上创建了一个 NFS 共享(运行基于 debian buster 的 raspbian)。我尝试使用 VLC(android tv 和 android 6)连接到它,但当我连接到它时,我只看到一个名为“/home/pi/桌面/Samba“但没有内容(继续加载)。该文件夹也使用 smbd 共享,运行良好。
服务状态:
pi@raspberrypi:~/Desktop/Samba $ sudo systemctl status nfs-kernel-server
● nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
Active: active (exited) since Thu 2020-04-02 18:43:37 CEST; 5s ago
Process: 26587 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Process: 26588 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
Main PID: 26588 (code=exited, status=0/SUCCESS)
Apr 02 18:43:37 raspberrypi systemd[1]: Starting NFS server and services...
Apr 02 18:43:37 raspberrypi systemd[1]: Started NFS server and services.
配置:
pi@raspberrypi:~/Desktop/Samba $ cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/home/pi/Desktop/Samba 192.168.0.0/16(rw,sync,no_subtree_check)
正在加载配置文件:
pi@raspberrypi:~/Desktop/Samba $ sudo exportfs -rav
exporting 192.168.0.0/16:/home/pi/Desktop/Samba
分享状态:
pi@raspberrypi:~/Desktop/Samba $ sudo exportfs -s
/home/pi/Desktop/Samba 192.168.0.0/16(rw,wdelay,root_squash,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)
答案1
如果您已经解决了这个问题并发现该问题已于 4 月发布,请分享解决方案以便其他人受益。
如果不尝试 nohide 选项,那么 /etc/exports 将如下所示:
/home/pi/Desktop/Samba 192.168.0.0/16(rw,sync,nohide,no_subtree_check)
检查:sudo exportfs -v