bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: intro


From: xystrus
Subject: Re: intro
Date: Fri, 15 Mar 2002 15:46:53 -0500
User-agent: Mutt/1.3.27i

On Wed, Mar 13, 2002 at 08:38:54PM -0500, Sam Roberts wrote:
> A few things:
> 
> - I very much want to know if there are any problems with locking
>   over NFS other than that you have to do it right, using link().
> 
> I keep hearing about the notorious NFS locking problems... and it
> seems to me its really a problem in a bunch of mail utilitis
> that predate NFS and were never fixed. (Or maybe NFS should have
> been fixed, but I don't have an opinion on that.)

I was discussing this with a buddy of mine, and we came up with one.
This really falls under the header of poor system administration,
but the case is such that I don't think you can ignore it.

On Linux systems, despite what the mount(8) man page says, NFS uses
the async option BY DEFAULT.  If the system administrator is not
experienced enough, or wise enough to use the sync option explicitly
for NFS mounts, the client will consider actions to be successful
before they've been committed on the NFS server.

Note that this only applies for the kernel-based NFS stuff.  The
old user space NFS daemons don't do this, IIRC (though I may in
fact be mistaken about that).

However, most distros are now using the kernel-based NFS.  And
most sysadmins probably aren't aware of this problem.  So many,
many Linux NFS servers and clients are using NFS asynchronously.
This has obvious negative implications for the integrity of NFS
data in general, but also means that locking via the link() system
call on such systems is unreliable.  Clients will think they have a
lock before the server has committed the I/O. According to my
buddy, locking via the POSIX fcntl locking functions are reliable,
but to be perfectly honest, I don't know why they would be any
more reliable than any other method if the sync option is not
specified. I'll have to probe more deeply on this one and get back
to you.

This problem isn't Linux-specific; any installation using
asynchronous NFS will be subject to this kind of race condition.
However AFAIK, most vendors  don't do that by default (because
it's really really dumb).

Xy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]