FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-21-2010, 05:49 AM
Clint Dilks
 
Default Help with NFSV4 server

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#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@inf1 /]# cat /etc/exports

/nfs4exports***********
*.scms.waikato.ac.nz(rw,insecure,sync,wdelay,no_su btree_check,no_root_squash,fsid=0,nohide)

/nfs4exports/share*****
*.scms.waikato.ac.nz(rw,insecure,sync,wdelay,no_su btree_check,no_root_squash,nohide)



[root@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@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@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@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,rsiz e=32768,wsize=32768,hard,intr
0
0













_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-21-2010, 07:38 AM
JohnS
 
Default Help with NFSV4 server

On Wed, 2010-04-21 at 17:49 +1200, Clint Dilks wrote:

> CentOS 5.4 64 Bit
>
> [root@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

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-21-2010, 11:47 AM
Kahlil Hodgson
 
Default Help with NFSV4 server

Hi Clint

I've got NFS4 running on F11 and your configuration looks fine to me.

> {The Client}
>
> [root@silver ~]# cat /etc/idmapd.conf
> [General]
> ...
> [Mapping]
>
> Nobody-User = nfsnobody
> Nobody-Group = nfsnobody

You 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,rsiz e=32768,wsize=32768,hard,intr
> 0 0

I'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

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-21-2010, 12:44 PM
Tom H
 
Default Help with NFSV4 server

On Wed, Apr 21, 2010 at 1:49 AM, Clint Dilks <clintd@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@inf1 /]# cat /etc/exports
> /nfs4exports
> *.scms.waikato.ac.nz(rw,insecure,sync,wdelay,no_su btree_check,no_root_squash,fsid=0,nohide)
> /nfs4exports/share
> *.scms.waikato.ac.nz(rw,insecure,sync,wdelay,no_su btree_check,no_root_squash,nohide)
>
> [root@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@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@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@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,rsiz e=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.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-27-2010, 03:40 AM
Clint Dilks
 
Default Help with NFSV4 server

On 21/04/10 23:47, Kahlil Hodgson wrote:
> Hi Clint
>
> I've got NFS4 running on F11 and your configuration looks fine to me.
>
>
>> {The Client}
>>
>> [root@silver ~]# cat /etc/idmapd.conf
>> [General]
>> ...
>> [Mapping]
>>
>> Nobody-User = nfsnobody
>> Nobody-Group = nfsnobody
>>
> You 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,rsiz e=32768,wsize=32768,hard,intr
>> 0 0
>>
> I'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
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>
Hi People,

Thanks for all the responses related to this.

To keep things simple I started from scratch. Just working on the
server and testing my mounting using the server itself and this is what
I have found


/etc/fstab

*** other unrelevant entries *****

/home /nfs4exports/home none bind,rw 0 0
/tmp /nfs4exports/tmp none bind,rw 0 0
inf1:/ /media/nfs4 nfs4 auto,rw 0 0
inf1:/nfs4exports/home /media/nfs nfs auto,rw 0 0


When I mount /media/nfs everything works as I would expect and I am
seeing the files I expect

When I mount /media/nfs4 the mount completes and I can see files but
they are not the ones I expect



ls -lsa /media/nfs4/home/
total 20
8 drwxr-xr-x 2 root root 4096 Apr 27 13:36 .
8 drwxr-xr-x 5 root root 4096 Apr 27 13:22 ..
4 -rw-r--r-- 1 root root 0 Apr 27 13:36 home-test

ls -lsa /media/nfs/
total 24
8 drwxr-xr-x 3 root root 4096 Apr 21 14:21 .
8 drwxr-xr-x 4 root root 4096 Apr 27 12:40 ..
8 drwx------ 2 clintd clintd 4096 Apr 27 15:23 clintd

The home-test file is a test file I created inside /nfs4exports/home
so it appears that NFS v3 sees and uses a bind mounted area as you would
expect whereas NFS v4 is ignoring the bind and using the filesystem
underneath which is very strange as all the reading I have done suggests
that you now must now have bind configured for NFS v4 to work correctly.


Thank you for any insight you can offer.



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 06:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org