![fstab を使用して NFS 共有を自動マウントできない](https://rvso.com/image/1083737/fstab%20%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%20NFS%20%E5%85%B1%E6%9C%89%E3%82%92%E8%87%AA%E5%8B%95%E3%83%9E%E3%82%A6%E3%83%B3%E3%83%88%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84.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
を設定するnfsvers=4
と、NFSサービスがバージョン3の場合、マウントが失敗します。 を設定する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.