無法使用 fstab 自動掛載 NFS 共享

無法使用 fstab 自動掛載 NFS 共享

在 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=3man 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.

相關內容