What is the difference between mount -t nfs3 and mount -t nfs -o nfsvers=3?
While mounting a share I had issues with idmapping
. Mounting with
sudo mount -t nfs 192.168.0.23:/myshare ./myshare -o nolock
and listing its contents yielded this (note the nobody
and 4294967294
):
-rwx------ 1 nobody 4294967294 48 Sep 27 1998 somefile
When I actually expected this:
-rwx------ 1 1023 1023 48 Sep 27 1998 somefile
I tried using NFSv3 by specifying -t nfs3
without luck:
sudo mount -t nfs3 192.168.0.23:/myshare ./myshare -o nolock,nfsvers=3
After a bit of research, the nfsvers=3
option did the trick
sudo mount -t nfs 192.168.0.23:/myshare ./myshare -o nolock,nfsvers=3
ls -la myshare
...
-rwx------ 1 1023 1023 48 Sep 27 1998 somefile
My question is: what's the difference between the nfsvers=3
option and -t nfs3
? Shouldn't they be the same thing?
@håkan-lindqvist is onto the answer. I don't have a mount.nfs3
but I have a mount.nfs4
and it is just a symlink to mount.nfs
. I looked at the source for mount.nfs
and it doesn't do anything special based on the basename of argv[0]
(except for unmounting). Thus mount -t nfs4
would not specify the version at all. I suspect the same for -t nfs3
.
So, to answer your questions: they are not the same thing and -t nfs3
doesn't specify the nfs version.