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.

7 Answers 7

54

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
2
  • 2
    Worth noting, sometimes nfsstat -m shows version and more details when mount -v does not. Mar 10, 2017 at 8:54
  • how would you check the version on server side ? Jan 26, 2021 at 10:10
33

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

2
  • 2
    I liked your answer but gave it to slm because he provided more information. Feb 19, 2014 at 16:31
  • I upvoted this answer because it contained less information, and answered the question perfectly. Nov 26, 2018 at 21:45
8

Don't forget the ultimate authority!

cat /proc/mounts
5

In Ubuntu 12.04, mount -v has the same information than without -v (no NFS version).

nfsstat -m shows the information about version.

2

Just plain

nfsstat

On the master server worked for me --

Server nfs v3:

Using -m only worked on the slaves

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

-2

df -T

This will show filesystem.

1
  • 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. Oct 27, 2021 at 5:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .