Hi all,
I have setup a CentOS6.3 x86_64 host to act as a nfs server. According to RHEL6 docs, portmap is not needed when you use NFSv4, but in my host I need to start rpcbind service to make NFSv4 works.
My /etc/sysconfig/nfs
# # Define which protocol versions mountd # will advertise. The values are "no" or "yes" # with yes being the default MOUNTD_NFS_V2="no" MOUNTD_NFS_V3="no" # # # Path to remote quota server. See rquotad(8) #RQUOTAD="/usr/sbin/rpc.rquotad" # Port rquotad should listen on. #RQUOTAD_PORT=875 # Optinal options passed to rquotad #RPCRQUOTADOPTS="" # # # Optional arguments passed to in-kernel lockd #LOCKDARG= # TCP port rpc.lockd should listen on. #LOCKD_TCPPORT=32803 # UDP port rpc.lockd should listen on. #LOCKD_UDPPORT=32769 # # # Optional arguments passed to rpc.nfsd. See rpc.nfsd(8) # Turn off v2 and v3 protocol support RPCNFSDARGS="-N 2 -N 3" # Turn off v4 protocol support #RPCNFSDARGS="-N 4" # Number of nfs server processes to be started. # The default is 8. #RPCNFSDCOUNT=8 # Stop the nfsd module from being pre-loaded #NFSD_MODULE="noload" # Set V4 grace period in seconds #NFSD_V4_GRACE=90 # # # # Optional arguments passed to rpc.mountd. See rpc.mountd(8) #RPCMOUNTDOPTS="" # Port rpc.mountd should listen on. #MOUNTD_PORT=892 # # # Optional arguments passed to rpc.statd. See rpc.statd(8) #STATDARG="" # Port rpc.statd should listen on. #STATD_PORT=662 # Outgoing port statd should used. The default is port # is random #STATD_OUTGOING_PORT=2020 # Specify callout program #STATD_HA_CALLOUT="/usr/local/bin/foo" # # # Optional arguments passed to rpc.idmapd. See rpc.idmapd(8) #RPCIDMAPDARGS="" # # Set to turn on Secure NFS mounts. #SECURE_NFS="yes" # Optional arguments passed to rpc.gssd. See rpc.gssd(8) #RPCGSSDARGS="" # Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8) #RPCSVCGSSDARGS="" # # To enable RDMA support on the server by setting this to # the port the server should listen on #RDMA_PORT=20049
And rpcinfo -p:
program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100000 4 udp 111 portmapper 100000 3 udp 111 portmapper 100000 2 udp 111 portmapper 100003 4 tcp 2049 nfs 100003 4 udp 2049 nfs 100021 1 udp 55700 nlockmgr 100021 3 udp 55700 nlockmgr 100021 4 udp 55700 nlockmgr 100021 1 tcp 52795 nlockmgr 100021 3 tcp 52795 nlockmgr 100021 4 tcp 52795 nlockmgr
On Wed, Oct 24, 2012 at 10:25 AM, C. L. Martinez carlopmart@gmail.com wrote:
Hi all,
I have setup a CentOS6.3 x86_64 host to act as a nfs server. According to RHEL6 docs, portmap is not needed when you use NFSv4, but in my host I need to start rpcbind service to make NFSv4 works.
My /etc/sysconfig/nfs
# # Define which protocol versions mountd # will advertise. The values are "no" or "yes" # with yes being the default MOUNTD_NFS_V2="no" MOUNTD_NFS_V3="no" # # # Path to remote quota server. See rquotad(8) #RQUOTAD="/usr/sbin/rpc.rquotad" # Port rquotad should listen on. #RQUOTAD_PORT=875 # Optinal options passed to rquotad #RPCRQUOTADOPTS="" # # # Optional arguments passed to in-kernel lockd #LOCKDARG= # TCP port rpc.lockd should listen on. #LOCKD_TCPPORT=32803 # UDP port rpc.lockd should listen on. #LOCKD_UDPPORT=32769 # # # Optional arguments passed to rpc.nfsd. See rpc.nfsd(8) # Turn off v2 and v3 protocol support RPCNFSDARGS="-N 2 -N 3" # Turn off v4 protocol support #RPCNFSDARGS="-N 4" # Number of nfs server processes to be started. # The default is 8. #RPCNFSDCOUNT=8 # Stop the nfsd module from being pre-loaded #NFSD_MODULE="noload" # Set V4 grace period in seconds #NFSD_V4_GRACE=90 # # # # Optional arguments passed to rpc.mountd. See rpc.mountd(8) #RPCMOUNTDOPTS="" # Port rpc.mountd should listen on. #MOUNTD_PORT=892 # # # Optional arguments passed to rpc.statd. See rpc.statd(8) #STATDARG="" # Port rpc.statd should listen on. #STATD_PORT=662 # Outgoing port statd should used. The default is port # is random #STATD_OUTGOING_PORT=2020 # Specify callout program #STATD_HA_CALLOUT="/usr/local/bin/foo" # # # Optional arguments passed to rpc.idmapd. See rpc.idmapd(8) #RPCIDMAPDARGS="" # # Set to turn on Secure NFS mounts. #SECURE_NFS="yes" # Optional arguments passed to rpc.gssd. See rpc.gssd(8) #RPCGSSDARGS="" # Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8) #RPCSVCGSSDARGS="" # # To enable RDMA support on the server by setting this to # the port the server should listen on #RDMA_PORT=20049
And rpcinfo -p:
program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100000 4 udp 111 portmapper 100000 3 udp 111 portmapper 100000 2 udp 111 portmapper 100003 4 tcp 2049 nfs 100003 4 udp 2049 nfs 100021 1 udp 55700 nlockmgr 100021 3 udp 55700 nlockmgr 100021 4 udp 55700 nlockmgr 100021 1 tcp 52795 nlockmgr 100021 3 tcp 52795 nlockmgr 100021 4 tcp 52795 nlockmgr
Please, any idea??
On 10/24/2012 03:25 AM, C. L. Martinez wrote:
I have setup a CentOS6.3 x86_64 host to act as a nfs server. According to RHEL6 docs, portmap is not needed when you use NFSv4, but in my host I need to start rpcbind service to make NFSv4 works.
I wasn't previously aware of that, but I just stopped rpcbind on both my CentOS 6 server and Fedora 17 workstation, and was able to mount /home by NFS.
Is your client mounting NFS4 by default, or configured to do so correctly?
On Sat, Oct 27, 2012 at 6:26 PM, Gordon Messmer yinyang@eburg.com wrote:
On 10/24/2012 03:25 AM, C. L. Martinez wrote:
I have setup a CentOS6.3 x86_64 host to act as a nfs server. According to RHEL6 docs, portmap is not needed when you use NFSv4, but in my host I need to start rpcbind service to make NFSv4 works.
I wasn't previously aware of that, but I just stopped rpcbind on both my CentOS 6 server and Fedora 17 workstation, and was able to mount /home by NFS.
Is your client mounting NFS4 by default, or configured to do so correctly?
Yes, all clients are configured to tuse nfsv4. Strange, if rpcbind process is stopped after nfs services are up, all works, but if rpcbind is stopped, nfs services doesn't go up ... I don't understand why rpcbind service needs to be up to start nfs services with you use nfsv4 only ...
Am 29.10.2012 08:46, schrieb C. L. Martinez:
Yes, all clients are configured to tuse nfsv4. Strange, if rpcbind process is stopped after nfs services are up, all works, but if rpcbind is stopped, nfs services doesn't go up ... I don't understand why rpcbind service needs to be up to start nfs services with you use nfsv4 only ...
I'd guess you configured NFS to provide both v3 and v4 services, so the daemon needs to register with the portmapper when it starts up. Your logfile should contain a message to that effect.
Stopping rpcbind later doesn't directly affect the daemon. It just prevents clients from locating the NFSv3 service via the portmap mechanism.
If I'm right, changing the NFS configuration to provide *only* v4 service should allow you to start the NFS service without the portmapper.