Hi Everyone, I have been trying to setup an NFS v4 File Server but have come across an odd issue. Mounting the /nfs4exports/share appears to be successful and the information displayed about partition size and free space seem correct but if I try to do anything inside the mounted directory the client will just hang. Does anyone have any idea what I am missing?? I have try disabling all firewalls and selinux but it doesn't seem to make any difference I have taken a look at http://www.brennan.id.au/19-Network_File_System.html#nfs <http://www.brennan.id.au/19-Network_File_System.html#nfs4>4 <http://www.brennan.id.au/19-Network_File_System.html#nfs4> and http://blog.laimbock.com/2009/05/21/nfsv4-on-centos-53-and-fedora-11/ and still can't see what i'm doing wrong {The Server} CentOS 5.4 64 Bit [root at inf1 /]# cat /etc/exports /nfs4exports *.scms.waikato.ac.nz(rw,insecure,sync,wdelay,no_subtree_check,no_root_squash,fsid=0,nohide) /nfs4exports/share *.scms.waikato.ac.nz(rw,insecure,sync,wdelay,no_subtree_check,no_root_squash,nohide) [root at inf1 /]# cat /etc/sysconfig/nfs # # Define which protocol versions mountd # will advertise. The values are "no" or "yes" # with yes being the default #MOUNTD_NFS_V1="no" 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" # # # 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="-vvv" # Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8) #RPCSVCGSSDARGS="-vvv" # Don't load security modules in to the kernel #SECURE_NFS_MODS="noload" # # Don't load sunrpc module. #RPCMTAB="noload" # [root at inf1 /]# cat /etc/idmapd.conf [General] Verbosity = 9 Pipefs-Directory = /var/lib/nfs/rpc_pipefs Domain = scms.waikato.ac.nz [Mapping] Nobody-User = nfsnobody Nobody-Group = nfsnobody [Translation] Method = nsswitch [root at inf1 /]# mount -l | grep bind /export on /nfs4exports/share type none (rw,bind) And an ls of /nfs4exports/share on NFS Server works from /etc/fstab /export /nfs4exports/share none bind 0 0 {The Client} [root at silver ~]# cat /etc/idmapd.conf [General] Verbosity = 0 Pipefs-Directory = /var/lib/nfs/rpc_pipefs Domain = scms.waikato.ac.nz [Mapping] Nobody-User = nfsnobody Nobody-Group = nfsnobody [Translation] Method = nsswitch From /etc/fstab inf1:/ /test nfs4 auto,rw,nodev,sync,_netdev,proto=tcp,retry=10,rsize=32768,wsize=32768,hard,intr 0 0 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20100421/595556c5/attachment-0002.html>
On Wed, 2010-04-21 at 17:49 +1200, Clint Dilks wrote:> CentOS 5.4 64 Bit > > [root at inf1 /]# cat /etc/exports--- Don't use root to test with. If nsswitch is not working you will need the same UID and GID across all machines to work in the directory. Which means user1 on server is UID & GID 600 it has to be the same on the client also. "id" will show the user and group id numbers and usermod and groupmod can change them. Other than that I see really nothing in the config you have. Maybe check ls -l on the nfs share for ACLs, file permissions for the user. Maybe someone else may spot something in your config. Also you can run Wire Shark to check out things for the network side and authentication. John
Hi Clint I've got NFS4 running on F11 and your configuration looks fine to me.> {The Client} > > [root at silver ~]# cat /etc/idmapd.conf > [General] > ... > [Mapping] > > Nobody-User = nfsnobody > Nobody-Group = nfsnobodyYou may want to check that nfsnobody is defined on your system and rpc.idmapd is actually running. Also the output from rpcinfo might help.>>From /etc/fstab > inf1:/ /test nfs4 > auto,rw,nodev,sync,_netdev,proto=tcp,retry=10,rsize=32768,wsize=32768,hard,intr > 0 0I'd probably want to keep things simple while you are testing. Perhaps cut this back to: inf1:/ /test rw,noatime,sync,hard,intr 0 0 Running tcpdump at both ends while you try to do a directory listing may provide some insight (which process is waiting for a response from whom) Err grasping at straws ... you may also want to check for any old stuff you may have in /etc/hosts.{allow,deny}. Hope this helps, Kal
On Wed, Apr 21, 2010 at 1:49 AM, Clint Dilks <clintd at scms.waikato.ac.nz> wrote:> > I have been trying to setup an NFS v4 File Server but have come across an > odd issue.? Mounting the /nfs4exports/share appears to be successful and the > information displayed about partition size and free space seem correct but > if I try to do anything inside the mounted directory the client will just > hang.? Does anyone have any idea what I am missing??? I have try disabling > all firewalls and selinux? but it doesn't seem to make any difference > > {The Server} > > CentOS 5.4? 64 Bit > > [root at inf1 /]# cat /etc/exports > /nfs4exports > *.scms.waikato.ac.nz(rw,insecure,sync,wdelay,no_subtree_check,no_root_squash,fsid=0,nohide) > /nfs4exports/share > *.scms.waikato.ac.nz(rw,insecure,sync,wdelay,no_subtree_check,no_root_squash,nohide) > > [root at inf1 /]# cat /etc/sysconfig/nfs > #MOUNTD_NFS_V1="no" > MOUNTD_NFS_V2="no" > MOUNTD_NFS_V3="no" > #RPCNFSDARGS="-N 2 -N 3" > #RPCNFSDARGS="-N 4" > > [root at inf1 /]# cat /etc/idmapd.conf > Verbosity = 9 > Pipefs-Directory = /var/lib/nfs/rpc_pipefs > Domain = scms.waikato.ac.nz > Nobody-User = nfsnobody > Nobody-Group = nfsnobody > Method = nsswitch > > [root at inf1 /]# mount -l | grep bind > /export on /nfs4exports/share type none (rw,bind) > > And an ls of /nfs4exports/share on NFS Server works > > from /etc/fstab > /export? /nfs4exports/share??? none??? bind??? 0 0 > > {The Client} > > [root at silver ~]# cat /etc/idmapd.conf > Verbosity = 0 > Pipefs-Directory = /var/lib/nfs/rpc_pipefs > Domain = scms.waikato.ac.nz > Nobody-User = nfsnobody > Nobody-Group = nfsnobody > Method = nsswitch > > From /etc/fstab > inf1:/ /test nfs4 > auto,rw,nodev,sync,_netdev,proto=tcp,retry=10,rsize=32768,wsize=32768,hard,intr > 0 0Check showmount and rpcinfo. Check that the uid and gid of the user accessing the mount are the same on client and server, that idmapd is running, that there is a sunrpc mount. Reduce the number of options for both the export and the mount while you are troubleshooting. Unless my brain is not working today, your bind mount looks completely wrong. You are setting up a bind mount of /nfs4exports/share onto /export and not making any use of it. AFAIK, the point of the nfsv4 bind mount procedure is to export a directory (in your case, /nfs4exports) with fsid=0 and, if you want to export another directory, /tobeexported, which is not under /nfs4exports, you bind mount /tobeexported onto /nfs4exports/tobeexported and can then access is from a client as server:/tobeexported. OT: I have not yet had to set up an nfsv4-only export, so I am curious why you are restricting mountd to v4 but not nfsd.