[Samba] kernel oplocks in ctdb environment

2011-04-01 Thread Bob Cregan

Hi
Can anyone advise me on kernel oplocks in a ctdb cluster.

I have a ctdb (GPFS is the parallel file system) setup that uses samba 
(3.5.8) for cifs and IBM CNFS for NFS. Reading the documentation on 
kernel oplocks it seems to me that I can export the same area via samba 
and NFS with kernel oplocks = Yes .


My logic is that IBM CNFS has shared NFS locking information held on the 
shared filesystem, and therefore the kernel on each member of the ctdb 
cluster will be aware of any NFS locks. Samba with kernel oplocks = 
Yes should then not provide opportunistic locking to a CIFS client that 
want to access a file that has an NFS lock (giving an I/O error to that 
client??).


Is this in fact what will happen? The ability to dual export area of the 
filesystem would be very useful, but I don't want to risk data corruption.


Thanks for any advice.

Bob

--
Bob Cregan
Senior Storage Systems Administrator
ACRC
Bristol University
Tel: +44 (0) 117 331 4421
Mobile: +44 (0) 7712388129

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] kernel oplocks in ctdb environment

2011-04-01 Thread Volker Lendecke
On Fri, Apr 01, 2011 at 08:58:57AM +0100, Bob Cregan wrote:
 Hi
 Can anyone advise me on kernel oplocks in a ctdb cluster.
 
 I have a ctdb (GPFS is the parallel file system) setup that uses
 samba (3.5.8) for cifs and IBM CNFS for NFS. Reading the
 documentation on kernel oplocks it seems to me that I can export the
 same area via samba and NFS with kernel oplocks = Yes .
 
 My logic is that IBM CNFS has shared NFS locking information held on
 the shared filesystem, and therefore the kernel on each member of
 the ctdb cluster will be aware of any NFS locks. Samba with kernel
 oplocks = Yes should then not provide opportunistic locking to a
 CIFS client that want to access a file that has an NFS lock (giving
 an I/O error to that client??).

The only point of kernel oplocks is to be informed if
someone else wants to open a file. We can then inform the
client to flush its cache and not cache future requests.
Intra-Samba this works in cooperation with GPFS. GPFS has a
special leases API that Samba can make use of with the gpfs
VFS module, so the theory is that oplocks should work
cross-protocol. I haven't run concrete tests in that area
for a while though, I'd need to do that again to be 100%
certain nothing broke.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba