![無法使用 fstab 自動掛載 NFS 共享](https://rvso.com/image/1083737/%E7%84%A1%E6%B3%95%E4%BD%BF%E7%94%A8%20fstab%20%E8%87%AA%E5%8B%95%E6%8E%9B%E8%BC%89%20NFS%20%E5%85%B1%E4%BA%AB.png)
在 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.