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.
Asked
Active
Viewed 1.9e+01k times
7 Answers
53
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
slm
- 363,520
- 117
- 767
- 871
-
2Worth noting, sometimes `nfsstat -m` shows version and more details when `mount -v` does not. – bbodenmiller Mar 10 '17 at 08:54
-
how would you check the version on server side ? – Pavel Niedoba Jan 26 '21 at 10:10
32
Use nfsstat -m it will display all the nfs mounted filesystem and theirs properties.
BitsOfNix
- 5,057
- 2
- 25
- 34
-
2I liked your answer but gave it to slm because he provided more information. – Gregg Leventhal Feb 19 '14 at 16:31
-
I upvoted this answer because it contained less information, and answered the question perfectly. – Janac Meena Nov 26 '18 at 21:45
5
In Ubuntu 12.04, mount -v has the same information than without -v (no NFS version).
nfsstat -m shows the information about version.
chaos
- 47,463
- 11
- 118
- 144
user115170
- 51
- 1
- 1
2
Just plain
nfsstat
On the master server worked for me --
Server nfs v3:
Using -m only worked on the slaves
storm_m2138
- 183
- 1
- 4
0
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
Gaia
- 272
- 1
- 16
-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. – Greenonline Oct 27 '21 at 05:46