IBM Support

How to verify that the NFS server and NFS client are at version 4

Question & Answer


Question

A common mistake when configuring and using MQ multi-instance queue managers is to assume that the NFS server and NFS client are at version 4, which is the required version, but in reality at least one of these components is using version 3. You want to know how to verify that these NFS component are actually running with version 4 capabilities instead of version 3. NFS V3 is NOT supported with MQ multi-instance queue managers.

Answer


Both NFS client and NFS server need to be working at version 4. If at least one component is at version 3, then the other component will downgrade capabilities and behave like version 3.

Here are instructions on how to verify the version of each component:

You can use the nfsstat command.
If there are no NFS file systems mounted, this command will generate no output, otherwise it will show information about each NFS mount:
nfsstat -m

Example output there are are NFS file systems mounted:

+ begin excerpt

/scratch from host1.ibm.com:/scratch
Flags: rw,vers=3,rsize=8192,wsize=8192,namlen=255,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.2,addr=192.168.1.3

/mqha from host2.ibm.com:/mqha
Flags: rw,vers=4,rsize=1048576,wsize=1048576,namlen=255,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=sys,clinntaddr=192.168.1.4,addr=192.168.1.5

+ end excerpt

Notice that there are 2 entries.
1) The first one uses NFS V3, because it has the following:
vers=3
2) The second one uses NFS V4:
vers=4

+ How to deal with a warning, if you issue nfsstat from a user that is not 'root'

If you issue this command from a userid that is not 'root', you may get the following warning:
mqm@SUSE-host3: /home/mqm
$ nfsstat -m
Absolute path to 'nfsstat' is '/usr/sbin/nfsstat', so it might be intended to be run only by user with superuser privileges (eg. root).
-bash: nfsstat: command not found

The workarounds are:
- Using the non-root userid, you can specify the full path name, such as:
/usr/sbin/nfsstat -m
- You can login as root and issue the command "nfsstat -m".


+++ Additional information

+ NFS Server

Login to the host that has the file system that is being exported.

The rpcinfo command applies ONLY to the NFS server, not the NFS client.

In Linux, this command is intended for root, but a non-root can issue it, but needs to specify the full path.

The NFS version will be listed in the second column titled "vers". Look for the number: 4
The NFS service will be listed in the fourth column titled "service". Look for the string: nfs

$ /usr/sbin/rpcinfo -p | grep nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs ==> Note: this indicates NFS V4 is available
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs

+ For the NFS client:

Login to the host that is mounting the exported file system.

For the NFS Client, the "mount" command can be used to find out how the root userid has mounted the file system.

For example, one of the lines from the output of "mount" is:
cb.x.ibm.com:/ on /mqexport type nfs4 (rw,hard,intr,clientaddr=9.27.46.123,addr=9.27.47.1)
.
Notice the following, which indicates version 4: type nfs4

If you see just "type nfs" then it is NOT version 4 ! But version 3.


++ Verify how the NFS file system was exported and mounted.

Even though the following web page from the MQ 7.0.1 Knowledge Center specifies Linux, the same idea is applicable for other Unix platforms: AIX, HP-UX, Solaris.


WebSphere MQ 7.0.1 > WebSphere MQ > System Administration Guide > Configuration and management > Availability, recovery and restart > High availability configurations > Multi-instance queue managers > Creating a multi-instance queue manager >
Create a multi-instance queue manager on Linux

1) Exporting the file system

See: Table 1. Illustrative multi-instance queue manager configuration on Linux
Add /MQHA *(rw,sync,no_wdelay,fsid=0) to /etc/exports
Start the NFS daemon: /etc/init.d/nfs start

2) Mounting the file system
Mount the exported file system /MQHA:
mount -t nfs4 -o hard,intr 192.168.1.1:/ /MQHA

You can use the command "mount" to see the mounted file systems and what options were used. The file system in question must have "nfs4" or some other token that indicates that is V4.
Otherwise, the lack of "nfs4" or another such token that tells that is version 4, indicates that the NFS client is actually using version 3.

[{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Capability","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.0;8.0;7.5;7.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21681903