在 Ubuntu 14.04 Server 中我使用以下命令正确安装了共享:
sudo mount -a 192.168.10.5:/mnt/sf_nas/movies /mnt/movies
但是,当我添加以下行/etc/fstab
并重新启动时,共享未安装:
192.168.10.5:/mnt/sf_nas/movies /mnt/moviesnfs auto,noatime,nolock,bg,nfsvers=4,intr,tcp,actimeo=1800 0 0
有人能告诉我这里缺少什么吗?提前谢谢!
答案1
如果您的 NFS 服务是版本 3,则设置nfsvers=4
会导致挂载失败。您需要设置nfsvers=3
,或者根本不设置它(来自man nfs
):
nfsvers=n The NFS protocol version number used to contact the
server's NFS service. If the server does not support
the requested version, the mount request fails. If this
option is not specified, the client negotiates a
suitable version with the server, trying version 4
first, version 3 second, and version 2 last.