Red Hat 5/6 when I do mount it says type nfs, I would like to know how to determine version if it isn't listed in mount options or fstab. Please don't say remount it with the version option, I want to know how to determine the currently mounted NFS version. I am guessing it will default based on NFS server/client settings, but how to I determine what it is currently? I am pretty sure it's NFS v3 because nfs4_setfacl is not supported it seems.
7 Answers
Here are 2 ways to do it:
mount
Using mount's -v
switch:
$ mount -v | grep /home/sam
mulder:/export/raid1/home/sam on /home/sam type nfs (rw,intr,tcp,nfsvers=3,rsize=16384,wsize=16384,addr=192.168.1.1)
nfsstat
Using nfsstat -m
:
$ nfsstat -m | grep -A 1 /home/sam
/home/sam from mulder:/export/raid1/home/sam
Flags: rw,vers=3,rsize=16384,wsize=16384,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=mulder
-
2Worth noting, sometimes
nfsstat -m
shows version and more details whenmount -v
does not. Commented Mar 10, 2017 at 8:54 -
Use nfsstat -m
it will display all the nfs mounted filesystem and theirs properties.
-
2I liked your answer but gave it to slm because he provided more information. Commented Feb 19, 2014 at 16:31
-
I upvoted this answer because it contained less information, and answered the question perfectly. Commented Nov 26, 2018 at 21:45
In Ubuntu 12.04, mount -v
has the same information than without -v
(no NFS version).
nfsstat -m
shows the information about version.
Just plain
nfsstat
On the master server worked for me --
Server nfs v3:
Using -m only worked on the slaves
On Ubuntu 22.04.1 Jammy at least the most sure shot way is
sudo cat /proc/fs/nfsd/versions
which yields something like
-2 +3 +4 +4.1 +4.2
df -T
This will show filesystem.
-
1Does it show NFS version information, as required by the OP? Please edit and update your answer with an example of the command's output. Commented Oct 27, 2021 at 5:46
-