[CentOS] Help with NFSV4 server

Tom H tomh0665 at gmail.com
Wed Apr 21 12:44:11 UTC 2010


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 0

Check 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.



More information about the CentOS mailing list