I am attempting to mount an NFS4 export from an Ubuntu server onto a Mac client connected to the local network. The Mac client can mount the nfs export using nfs3, however it appears unable to do so using nfs4.
Server (Ubuntu)
The directory to be shared has been fstab
bound to /export/share
, and that directory exported via /etc/exports
.
user@<server>:~$ tail -n 2 /etc/exports
/export *(insecure,no_subtree_check,rw,sync,fsid=0)
/export/share *(insecure,no_subtree_check,rw,nohide,sync)
Client (Mac OS 10.11)
The client is able to see both exports from the server
Macintosh:~ user$ showmount -e <server-ip>
Exports list on <server-ip>:
/export/share *
/export *
The client is able to mount the drive using nfs3 (onto a local mount-point ~/NFS/Server_Media/
)
Macintosh:~ user$ sudo mount -t nfs <server-ip>:/export/share NFS/Server_Media/
or (both yield identical results)
Macintosh:~ user$ sudo mount -t nfs -o vers=3 <server-ip>:/export/share NFS/Server_Media/
Proof of nfs3 (under the NFS Parameters: vers=3)
Macintosh:~ user$ nfsstat -m
/Users/user/NFS/Server_Media from <server-ip>:/export/share
-- Original mount options:
General mount flags: 0x0
NFS parameters:
File system locations:
/export/share @ <server-ip> (<server-ip>)
-- Current mount parameters:
General mount flags: 0x4000000 multilabel
NFS parameters: vers=3,tcp,port=2049,nomntudp,hard,nointr,noresvport,negnamecache,callumnt,locks,quota,rsize=32768,wsize=32768,readahead=16,dsize=4096,nordirplus,nodumbtimr,timeo=10,maxgroups=16,acregmin=5,acregmax=60,acdirmin=5,acdirmax=60,nomutejukebox,nonfc,sec=sys
File system locations:
/export/share @ <server-ip> (<server-ip>)
Status flags: 0x0
Export is unmounted to test nfs4
Macintosh:~ user$ sudo umount NFS/Server_Media/
Client attempts to mount nfs4
Macintosh:~ user$ sudo mount -t nfs -o vers=4 <server-ip>:/export/share NFS/Server_Media/
mount_nfs: can't mount /export/share from <server-ip> onto /Users/user/NFS/Server_Media: No such file or directory
Curiously, Finder's Connect to Server...
operation (Cmd
+ k
) is able to connect using nfs4 by entering into the Server Address
:
nfs://vers=4,<server-ip>:/export/share
However, this cannot be automated without knowing the Terminal commands, and it only mounts to /Volumes/share/
, instead of the intended client mount-point.
The literature is surprisingly bare when it comes to Mac and NFS4, at least as far as I could tell. Any help with this would greatly appreciated!
sudo mount -t nfs -o vers=4 <server-ip>:/export/share NFS/Server_Media/
work?<server-ip>:/export
by itself, I'm only trying to mount<server-ip>:/export/share
. I have edited the question to reflect that. The error says that no such directory exists (and the local directory definitely does, so it must be the server's). Could there be a different path convention between nfs3 and nfs4?