Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Apr 2011 20:24:53 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Chuck Swiger <cswiger@mac.com>
Cc:        "Marc G. Fournier" <scrappy@hub.org>, freebsd-net@freebsd.org
Subject:   Re: 7-STABLE NFS: fatal: "select lock: Permission denied"
Message-ID:  <1359778820.2757108.1301963093210.JavaMail.root@erie.cs.uoguelph.ca>
In-Reply-To: <0F56F33B-C492-4723-B7EC-713AD64E856C@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Apr 4, 2011, at 11:09 AM, Marc G. Fournier wrote:
> > 'k, based on someone else's recommendation, I add 'nolockd' to the
> > mount entry,a nd postfix now appears to work ... since I can safely
> > guarantee that only the one host will have access to these files,
> > that doesn't pose a porblem for me, but still find it a weird issue
> > all things considered :(
> 
> Be careful; multiple access from different processes even on a single
> host can still run into locking issues against NFS filesystems, or
> data corruption if locking isn't available.

>From what I know of the implementation, I would have to disagree with
this statement. When mounted with the "nolockd" option, file locking is
still done within the client, using the same kernel function that is used
for file locking for local file systems like UFS.

However, these locks will not be seen by other clients or the NFS server.

> You're most at risk with
> local delivery to an mbox-style INBOX; delivery to maildir-style INBOX
> is much safer even on NFS without locking.
> 
Yes, but I think you are assuming that whatever is putting the email in
the mbox (sendmail daemon or ???) is running on a different machine than
the one that the imapd daemon (or whatever is reading the email) is
running on?

In general, NFS mounting a mail spool can be problematic, since it will
normally result in file(s) being accessed from more than one machine. As
such, I believe your warning w.r.t. the "nolockd" option is approriate,
I'm just not convinced that this is broken for the case where
all processes (including all daemons) that access the file are running on
the same NFS client (unlikely, but possible).

Also, I believe your other advise is very appropriate, such as configuring
a mail system to avoid using file locking primitives.

rick



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1359778820.2757108.1301963093210.JavaMail.root>