[Linux-cluster] NFS-ganesha - worthwhile replacement for kernel NFS?

Colin Simpson Colin.Simpson at iongeo.com
Sat Oct 26 15:06:34 UTC 2013


> On Tue, Oct 22, 2013 at 09:25:40AM +0000, Colin Simpson wrote:

>> The only thing I know about (and has bitten me) is that a GFS2
>> filesystem isn't allowed to be exported on NFS and perform local access
>> on it (e.g. Samba). Bad interaction between flocks (NFS) and plocks and
>> the GFS2 glocks. The interaction on other filesystems between plocks and
>> flocks could lead to file corruption. But in GFS2 this can and does lead
>> to whole filesystem corruption. There is a bug open about it, but it's a
>> tricky problem.

> What's the bz #?

> -b.

bz#580863 is the one I know about, I think you are on the CC list for it. I believe it's pretty hard to resolve this.

I had put the original support reply in this bug already, it's good background info:

"Exporting NFS and Samba from the same directory tree is unsupported regardless of the filesystem in question, be it GFS, GFS2, EXT3, EXT4, or NFS. The reason that it is unsupported is because NFS and Samba use different locking systems. NFS uses BSD style locks (flock) and Samba uses POSIX locks (fcntl.) The flock and fcntl locking systems are not compatible. So if NFS takes out an exclusive-write flock on a file (because an NFS client is making a change to that file) Samba could come along read-from or write-to the file though NFS expects the file to be exclusively locked. The obverse could happen as well where Samba could ex-lock a file and NFS could come along and read, write, or even delete that file. The end result will be file corruption.

The situation is even more complex on GFS2 as GFS2 employs its own locking layer called "glocks." The conflict between flocks, plocks, and glocks can result not only in file corruption (as you'd see on other filesystems) but filesystem metadata corruption resulting in withdraws or panics and necessitating a filesystem check and repair. The situation is further complicated as the only correctly way to export NFS from GFS2 requires modifying the behavior of the GFS2 locking layer and thus making the possibility of filesystem corruption or lock contention even more pressing; this is why when exporting NFS from GFS2 one isn't even supposed to access the filesystem via any method other than NFS"

Thanks

Colin

________________________________


This email and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately notify the sender and delete the original.





More information about the Linux-cluster mailing list