Tell automount to use NFSv2 on AIX 6.1

Hello,

I have a CentOS 6.1 server exporting a filesystem with read/write to world. I have an AIX Client mouting this filesystem from an NIS map. One of our applications is giving an error and after a little research, we found that we need the AIX Client to mount this filesystem with NFS V2 for the application to work.

Will you please help me with the below questions?

1- How can I tell which version of NFS is used to mount a specific mount?
I did google this and the forums suggest using rpcinfo -p but the results are not very clear. My output below.

bash-4.2#  rpcinfo -p
   program vers proto   port  service
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100007    2   tcp    904  ypbind
    100007    2   udp    904  ypbind
    100007    1   tcp    904  ypbind
    100007    1   udp    904  ypbind
    100068    2   udp  32847  cmsd
    100068    3   udp  32847  cmsd
    100068    4   udp  32847  cmsd
    100068    5   udp  32847  cmsd
    100083    1   tcp  32839  ttdbserver
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    200006    1   udp   2049
    200006    4   udp   2049
    200006    1   tcp   2049
    200006    4   tcp   2049
    100099    1   udp  32863  autofs
    100005    1   tcp  59502  mountd
    100005    2   tcp  59502  mountd
    100005    3   tcp  59502  mountd
    100005    1   udp  58635  mountd
    100005    2   udp  58635  mountd
    100005    3   udp  58635  mountd
    400005    1   udp  58636

I want to know NFS version used to mount /u/mego/INTERSITE.

2- How can I explictly use NFSv2 to mount on the AIX Client?

Thanks,
Pocodot

Not that familiar, but how to 'set' a specific version, and more can be read in: LINUX Man Pages and LINUX Commands at the UNIX and Linux Forums

Before changing NFS to version 2, please try to do the following from AIX side:

# rpcinfo -p LINUX-SERVER
# showmount -e LINUX-SERVER
# ypcat -k auto.master ## or where is your NFS mount defined?
# mount (OPTIONS FROM ypcat) LINUX-SERVER:/SHARE /mnt

Without seeing your set of maps it is hard to give a precise answer but you probably should consider a direct map for your NFSv2 AIX client.

Hello,

Here is the map.

swissnei:root>ypcat -k mapmego | grep INTERSITE
INTERSITE -rw,soft      wrtcentblt:/u/dpl/INTERSITE

Unfortunately this map is accessed across multiple machines and they dont need to mount it with NFSv2 so changing the NFS Version from the server or NIS end (if that is possible) is ruled out.

Here is what I did to get it working:

swissnei:root>cat /etc/mapmego
INTERSITE -rw,soft,vers=2      wrtcentblt:/u/dpl/INTERSITE
+mapmego
swissnei:root>

And voila! The application ran perfect. I think preeceding the mount on local file did the trick.

I'm still not clear on one thing though. How can I tell if any mount is NFSv2 or NFSv3 on AIX?

Thanks,
Pocodot

I am glad you solved your problem. The command you are looking for is mknfsmnt and the option you need is -K <version> . For more information see the man page of mknfsmnt .

I strongly suggest to use this command to create NFS mounts even if it is a little cumbersome at first. It guarantees that AIX is perfectly aware of all the intricacies needed to have it available across reboots (doing the same "on your own" by patching the necessary files might work but is as well prone to errors the program will not make).

I hope this helps.

bakunin

1 Like

The easiest way to see if AIX is using NFSv2, versus NFSv3 or NFSv4 is to check the output of nfsstat -rc . The -r is for rpc information, the -c is for client information ( -s would be for AIX as a NFS server ).

The NFSv3 and NFSv4 rpc info is Connection oriented based. and NFSv2 - being UDP - is Connectionless oriented

michael@x071:[/home/michael]nfsstat -rc

Client rpc:
Connection oriented
calls      badcalls   badxids    timeouts   newcreds   badverfs   timers     
8132122    1          1          0          0          0          0          
nomem      cantconn   interrupts 
0          0          0          
Connectionless
calls      badcalls   retrans    badxids    timeouts   newcreds   badverfs   
0          0          0          0          0          0          0          
timers     nomem      cantsend   
0          0          0          

Another easy way to see is to start NFS. Depending on your level of AIX you will be able to see NFS stats for NFSv2 and NFSv3 only, or perhaps including NFSv4 - screen excerpt for topas

NFS (calls/sec)
SerV2         0
CliV2         0
SerV3         0
CliV3       201
SerV4         0
CliV4         0

Hope this helps!