I have a SLES 11 SP2 server, kernel 3.0.58-0.6.6-default, that is having problems mounting an NFS share from a different SLES 11 SP2 server, kernel 3.0.38-0.5-default. The option to use nfs4 in /etc/sysconfig/nfs is set to ‘yes’.
I have a script the mounts the share, at boot, as the client server has to start and initialize prior to the boot of the server that is hosting the share. The script does a ping test for the other server and issues “mount test:/xs2files_maint/DataExtracts /db2extract” once the ping is successful. I noticed that the filesystem is not being mounted at boot time so I began debugging as follows.
I get the following messages when I enter command: mount -vvv -o rw,port=2049,mountproto=tcp test:/xs2files_maint/DataExtracts /db2extract/XSR010_DATA_EXTRACT
mount: fstab path: “/etc/fstab”
mount: mtab path: “/etc/mtab”
mount: lock path: “/etc/mtab~”
mount: temp path: “/etc/mtab.tmp”
mount: UID: 0
mount: eUID: 0
mount: no type was given - I’ll assume nfs because of the colon
mount: spec: “test:/xs2files_maint/DataExtracts”
mount: node: “/db2extract/XSR010_DATA_EXTRACT”
mount: types: “nfs”
mount: opts: “(null)”
mount: external mount: argv[0] = “/sbin/mount.nfs”
mount: external mount: argv[1] = “test:/xs2files_maint/DataExtracts”
mount: external mount: argv[2] = “/db2extract/XSR010_DATA_EXTRACT”
mount: external mount: argv[3] = “-v”
mount: external mount: argv[4] = “-o”
mount: external mount: argv[5] = “rw”
mount.nfs: timeout set for Mon May 20 10:58:25 2013
mount.nfs: trying text-based options ‘addr=10.17.1.131’
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.17.1.131 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 10.17.1.131 prog 100005 vers 3 prot UDP port 32767
mount.nfs: mount(2): Address already in use
mount.nfs: Address already in use
I get the following messages when I enter command: mount -vvv -o rw,port=2049,mountproto=tcp,vers=4 test:/xs2files_maint/DataExtracts /db2extract/XSR010_DATA_EXTRACT
mount: fstab path: “/etc/fstab”
mount: mtab path: “/etc/mtab”
mount: lock path: “/etc/mtab~”
mount: temp path: “/etc/mtab.tmp”
mount: UID: 0
mount: eUID: 0
mount: no type was given - I’ll assume nfs because of the colon
mount: spec: “test:/xs2files_maint/DataExtracts”
mount: node: “/db2extract/XSR010_DATA_EXTRACT”
mount: types: “nfs”
mount: opts: “port=2049,mountproto=tcp,vers=4”
mount: external mount: argv[0] = “/sbin/mount.nfs”
mount: external mount: argv[1] = “test:/xs2files_maint/DataExtracts”
mount: external mount: argv[2] = “/db2extract/XSR010_DATA_EXTRACT”
mount: external mount: argv[3] = “-v”
mount: external mount: argv[4] = “-o”
mount: external mount: argv[5] = “rw,port=2049,mountproto=tcp,vers=4”
mount.nfs: timeout set for Mon May 20 11:36:42 2013
mount.nfs: trying text-based options ‘port=2049,mountproto=tcp,vers=4,addr=10.17.1.131,clientaddr=10.17.1.155’
test:/xs2files_maint/DataExtracts on /db2extract/XSR010_DATA_EXTRACT type nfs (rw,port=2049,mountproto=tcp,vers=4)
All I added to the command was ‘,vers=4’ to the -o parameter and the mount was successful.
It appears that the nfs client is attempting to use version 3 of the nfs protocol based on the messages and forcing it to use version 4 causes the share to mount successfully:
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.17.1.131 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 10.17.1.131 prog 100005 vers 3 prot UDP port 32767
I’ve searched Google to see where the option to use nfs protocol 3 is but can’t find it. Where is this option located?
Harley