Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Apr 2011 12:26:44 -0700
From:      Chuck Swiger <cswiger@mac.com>
To:        "Marc G. Fournier" <scrappy@hub.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: 7-STABLE NFS: fatal: "select lock: Permission denied"
Message-ID:  <DC83D7F3-260E-4718-8AF4-72F77C2980C4@mac.com>
In-Reply-To: <alpine.BSF.2.00.1104041605490.55888@hub.org>
References:  <alpine.BSF.2.00.1104030135160.55888@hub.org> <alpine.BSF.2.00.1104041508000.55888@hub.org> <0F56F33B-C492-4723-B7EC-713AD64E856C@mac.com> <alpine.BSF.2.00.1104041554100.55888@hub.org> <E9441056-3EFE-4668-A815-271B857FD230@mac.com> <alpine.BSF.2.00.1104041605490.55888@hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 4, 2011, at 12:14 PM, Marc G. Fournier wrote:
>> OK-- Cyrus IMAP uses a variant of maildir, so you're relatively safe even if locking is not available.
> 
> So, just to get this clear ...
> 
> If I were to boot a diskless station using an NFS backend, then that instance would be prone to corruption since lockd wouldn't work, even though the only processes handling the files on that mount?

If you're running a diskless system using NFS filesystem for storage, and you run stuff that wants to do fcntl/lockf/flock locking, and rpc.lockd isn't available, then yes, there is risk of data corruption.  However, Postfix can use .dotfile locking, even if fcntl (etc) locking is broken, and maildir is designed to avoid needing locking the way mbox does:

   http://www.postfix.org/NFS_README.html

> And this may be where I'm mis-understanding things:
> 
> Does rpc.lockd work at the process level or file system?  For instance, in my test case, I'm trying to operate within a jail ... does the rpc.lockd runnig at the primary OS level handle communications between client<->server, irrelevent of whether the process is running in a jail or not?

rpc.lockd provides locking at the filesystem level.  Locks are performed against file descriptors either for entire files or record-level locking; they are not specific to a single process (indeed, locking would be mostly useless if it was only visible within a single process).

Regards,
-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DC83D7F3-260E-4718-8AF4-72F77C2980C4>