46

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.

Gregg Leventhal
  • 7,480
  • 19
  • 65
  • 100

7 Answers7

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
32

Use nfsstat -m it will display all the nfs mounted filesystem and theirs properties.

BitsOfNix
  • 5,057
  • 2
  • 25
  • 34
8

Don't forget the ultimate authority!

cat /proc/mounts
gregmark
  • 81
  • 1
  • 1
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.

  • 1
    Does 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