linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Writing / Locking problem with NFSv4
@ 2011-09-16 10:48 Tim
  2011-09-20 13:50 ` J. Bruce Fields
  0 siblings, 1 reply; 6+ messages in thread
From: Tim @ 2011-09-16 10:48 UTC (permalink / raw)
  To: linux-nfs

Hi there

I'm  facing a rather strange problem. 

>From one client I can mount and access my NFSServer without any problems.
Writing and locking works with a non root user accout. 
>From another client (in another subnet), with root everything works fine. If
I use another user, locking doesnt work and also when I create a file with
vim, the *.swp file is not deleted afterwards. But reading works without
problems. 
Strange thing is user mapping seems to work correct - at least what ls -la
and the logfiles for idmapd shows. 

I appreciate your input! Thanks!

Tim


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing / Locking problem with NFSv4
  2011-09-16 10:48 Writing / Locking problem with NFSv4 Tim
@ 2011-09-20 13:50 ` J. Bruce Fields
  2011-09-21 10:46   ` AW: " Tim
  0 siblings, 1 reply; 6+ messages in thread
From: J. Bruce Fields @ 2011-09-20 13:50 UTC (permalink / raw)
  To: Tim; +Cc: linux-nfs

On Fri, Sep 16, 2011 at 12:48:45PM +0200, Tim wrote:
> I’m  facing a rather strange problem. 
> 
> From one client I can mount and access my NFSServer without any problems.
> Writing and locking works with a non root user accout. 
> From another client (in another subnet), with root everything works fine. If
> I use another user, locking doesnt work and also when I create a file with
> vim, the *.swp file is not deleted afterwards. But reading works without
> problems. 
> Strange thing is user mapping seems to work correct – at least what ls -la
> and the logfiles for idmapd shows. 

Which client and server?  (Linux on both?  Which versions?)  Are you
using kerberos?  If not, are your uid's the same between client and
server?  What does your export file look like?

--b.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* AW: Writing / Locking problem with NFSv4
  2011-09-20 13:50 ` J. Bruce Fields
@ 2011-09-21 10:46   ` Tim
  2011-09-21 15:45     ` 'J. Bruce Fields'
  0 siblings, 1 reply; 6+ messages in thread
From: Tim @ 2011-09-21 10:46 UTC (permalink / raw)
  To: 'J. Bruce Fields'; +Cc: linux-nfs

On Fri, Sep 16, 2011 at 12:48:45PM +0200, Tim wrote:
>> I’m  facing a rather strange problem. 
>> 
>> From one client I can mount and access my NFSServer without any problems.
>> Writing and locking works with a non root user accout. 
>> From another client (in another subnet), with root everything works 
>> fine. If I use another user, locking doesnt work and also when I 
>> create a file with vim, the *.swp file is not deleted afterwards. But 
>> reading works without problems.
>> Strange thing is user mapping seems to work correct – at least what ls 
>> -la and the logfiles for idmapd shows.

>Which client and server?  (Linux on both?  Which versions?)  Are you using kerberos?  If not, are your uid's the same between client and server?  What does your export file look like?

Client and Server are both RHEL 6.1. I am not using kerberos. And yes, the uid's are the same, also the gid is the same: 3000 for both.
This is my export file:

/srv/nfs/			10.1.4.32/255.255.255.224(rw,fsid=0,sync,no_subtree_check,no_root_squash) 10.1.0.9(rw,fsid=0,sync,no_subtree_check,no_root_squash)
/srv/nfs/mail/users		10.1.4.32/255.255.255.224(rw,fsid=1,sync,no_subtree_check,no_root_squash)
/srv/nfs/mail/tmp		10.1.4.32/255.255.255.224(rw,fsid=2,sync,no_subtree_check,no_root_squash)
/srv/nfs/testdata		10.1.0.9(rw,fsid=10,sync,no_subtree_check,no_root_squash)

I tried to take tcpdumps as root and non root user: They look the same to me. However, I'm not so sure what I'm looking for...

Thanks!

Tim



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing / Locking problem with NFSv4
  2011-09-21 10:46   ` AW: " Tim
@ 2011-09-21 15:45     ` 'J. Bruce Fields'
  2011-09-29 14:13       ` AW: " Tim
  0 siblings, 1 reply; 6+ messages in thread
From: 'J. Bruce Fields' @ 2011-09-21 15:45 UTC (permalink / raw)
  To: Tim; +Cc: linux-nfs

On Wed, Sep 21, 2011 at 12:46:34PM +0200, Tim wrote:
> On Fri, Sep 16, 2011 at 12:48:45PM +0200, Tim wrote:
> >> I’m  facing a rather strange problem. 
> >> 
> >> From one client I can mount and access my NFSServer without any problems.
> >> Writing and locking works with a non root user accout. 
> >> From another client (in another subnet), with root everything works 
> >> fine. If I use another user, locking doesnt work and also when I 
> >> create a file with vim, the *.swp file is not deleted afterwards. But 
> >> reading works without problems.
> >> Strange thing is user mapping seems to work correct – at least what ls 
> >> -la and the logfiles for idmapd shows.
> 
> >Which client and server?  (Linux on both?  Which versions?)  Are you using kerberos?  If not, are your uid's the same between client and server?  What does your export file look like?
> 
> Client and Server are both RHEL 6.1. I am not using kerberos. And yes, the uid's are the same, also the gid is the same: 3000 for both.
> This is my export file:
> 
> /srv/nfs/			10.1.4.32/255.255.255.224(rw,fsid=0,sync,no_subtree_check,no_root_squash) 10.1.0.9(rw,fsid=0,sync,no_subtree_check,no_root_squash)
> /srv/nfs/mail/users		10.1.4.32/255.255.255.224(rw,fsid=1,sync,no_subtree_check,no_root_squash)
> /srv/nfs/mail/tmp		10.1.4.32/255.255.255.224(rw,fsid=2,sync,no_subtree_check,no_root_squash)
> /srv/nfs/testdata		10.1.0.9(rw,fsid=10,sync,no_subtree_check,no_root_squash)
> 
> I tried to take tcpdumps as root and non root user: They look the same to me. However, I'm not so sure what I'm looking for...

Hm.  Sounds possibly like

	http://marc.info/?t=129183437900003&r=1&w=2

--b.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* AW: Writing / Locking problem with NFSv4
  2011-09-21 15:45     ` 'J. Bruce Fields'
@ 2011-09-29 14:13       ` Tim
  2011-09-30 19:42         ` 'J. Bruce Fields'
  0 siblings, 1 reply; 6+ messages in thread
From: Tim @ 2011-09-29 14:13 UTC (permalink / raw)
  To: 'J. Bruce Fields'; +Cc: linux-nfs

>On Wed, Sep 21, 2011 at 12:46:34PM +0200, Tim wrote:
>> On Fri, Sep 16, 2011 at 12:48:45PM +0200, Tim wrote:
>> >> I’m  facing a rather strange problem. 
>> >> 
>> >> From one client I can mount and access my NFSServer without any problems.
>> >> Writing and locking works with a non root user accout. 
>> >> From another client (in another subnet), with root everything works 
>> >> fine. If I use another user, locking doesnt work and also when I 
>> >> create a file with vim, the *.swp file is not deleted afterwards. 
>> >> But reading works without problems.
>> >> Strange thing is user mapping seems to work correct – at least what 
>> >> ls -la and the logfiles for idmapd shows.
>> 
>> >Which client and server?  (Linux on both?  Which versions?)  Are you using kerberos?  If not, are your uid's the same between client and server?  What does your export file look like?
> 
>> Client and Server are both RHEL 6.1. I am not using kerberos. And yes, the uid's are the same, also the gid is the same: 3000 for both.
>> This is my export file:
> 
>> /srv/nfs/			10.1.4.32/255.255.255.224(rw,fsid=0,sync,no_subtree_check,no_root_squash) 10.1.0.9(rw,fsid=0,sync,no_subtree_check,no_root_squash)
>> /srv/nfs/mail/users		10.1.4.32/255.255.255.224(rw,fsid=1,sync,no_subtree_check,no_root_squash)
>> /srv/nfs/mail/tmp		10.1.4.32/255.255.255.224(rw,fsid=2,sync,no_subtree_check,no_root_squash)
>> /srv/nfs/testdata		10.1.0.9(rw,fsid=10,sync,no_subtree_check,no_root_squash)
>> 
>> I tried to take tcpdumps as root and non root user: They look the same to me. However, I'm not so sure what I'm looking for...

>Hm.  Sounds possibly like

>	http://marc.info/?t=129183437900003&r=1&w=2

I just found out the reason for this whole strange behaviour: The folder, where the device is mounted, must have the right owner and / or rights. That means, if I mount it to /srv/data on client side, the folder data must belong to the user 3000.
I just checked: vim *.swp - files are deleted afterwards and even locking is working!

But thank you anyway, Bruce!
Tim


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing / Locking problem with NFSv4
  2011-09-29 14:13       ` AW: " Tim
@ 2011-09-30 19:42         ` 'J. Bruce Fields'
  0 siblings, 0 replies; 6+ messages in thread
From: 'J. Bruce Fields' @ 2011-09-30 19:42 UTC (permalink / raw)
  To: Tim; +Cc: linux-nfs

On Thu, Sep 29, 2011 at 04:13:17PM +0200, Tim wrote:
> >On Wed, Sep 21, 2011 at 12:46:34PM +0200, Tim wrote:
> >> On Fri, Sep 16, 2011 at 12:48:45PM +0200, Tim wrote:
> >> >> I’m  facing a rather strange problem. 
> >> >> 
> >> >> From one client I can mount and access my NFSServer without any problems.
> >> >> Writing and locking works with a non root user accout. 
> >> >> From another client (in another subnet), with root everything works 
> >> >> fine. If I use another user, locking doesnt work and also when I 
> >> >> create a file with vim, the *.swp file is not deleted afterwards. 
> >> >> But reading works without problems.
> >> >> Strange thing is user mapping seems to work correct – at least what 
> >> >> ls -la and the logfiles for idmapd shows.
> >> 
> >> >Which client and server?  (Linux on both?  Which versions?)  Are you using kerberos?  If not, are your uid's the same between client and server?  What does your export file look like?
> > 
> >> Client and Server are both RHEL 6.1. I am not using kerberos. And yes, the uid's are the same, also the gid is the same: 3000 for both.
> >> This is my export file:
> > 
> >> /srv/nfs/			10.1.4.32/255.255.255.224(rw,fsid=0,sync,no_subtree_check,no_root_squash) 10.1.0.9(rw,fsid=0,sync,no_subtree_check,no_root_squash)
> >> /srv/nfs/mail/users		10.1.4.32/255.255.255.224(rw,fsid=1,sync,no_subtree_check,no_root_squash)
> >> /srv/nfs/mail/tmp		10.1.4.32/255.255.255.224(rw,fsid=2,sync,no_subtree_check,no_root_squash)
> >> /srv/nfs/testdata		10.1.0.9(rw,fsid=10,sync,no_subtree_check,no_root_squash)
> >> 
> >> I tried to take tcpdumps as root and non root user: They look the same to me. However, I'm not so sure what I'm looking for...
> 
> >Hm.  Sounds possibly like
> 
> >	http://marc.info/?t=129183437900003&r=1&w=2
> 
> I just found out the reason for this whole strange behaviour: The folder, where the device is mounted, must have the right owner and / or rights. That means, if I mount it to /srv/data on client side, the folder data must belong to the user 3000.
> I just checked: vim *.swp - files are deleted afterwards and even locking is working!

OK, so you just didn't have write permissions to that directory?  Makes
sense.--b.

> 
> But thank you anyway, Bruce!
> Tim
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-30 19:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-16 10:48 Writing / Locking problem with NFSv4 Tim
2011-09-20 13:50 ` J. Bruce Fields
2011-09-21 10:46   ` AW: " Tim
2011-09-21 15:45     ` 'J. Bruce Fields'
2011-09-29 14:13       ` AW: " Tim
2011-09-30 19:42         ` 'J. Bruce Fields'

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).