[Gluster-users] Antw: Re: MS Office/Samba/Glusterfs/Centos

Ira Cooper ira at redhat.com
Thu Jan 23 23:08:16 UTC 2014


Understood on CTDB.

Locking:

Volker has been doing research on robust mutexes based on initial research that we did, a while ago.  (I believe you can find my initial work: http://git.samba.org/?p=ira/tdb.git;a=shortlog;h=refs/heads/locking , but that code is ancient.)

fcntl locks are chosen in Samba due to their semantics when processes die.  If a process dies without releasing its locks, the fcntl locks automatically release.

Robust mutexes have the same type of properties, but when I did the initial research I hit the same type of thing Volker did.  (You can see it in my commit messages,  I hit issues, but pushed the code for others to see.)

Samba in any current configuration I'd expect to see deployed, does not use spinlocks directly.  It may use them indirectly via the implementation of fcntl in the kernel.

I want to make sure that users have the correct impression of how the database works, if they review this thread.

Thanks,

-Ira / ira@(redhat.com|samba.org)

----- Original Message -----
> Ira
> 
> In clustered mode stores locking information in a TDB so thats why you
> need to configure CTDB and tell samba its clustered in the configed so
> it will keep the sync databases in sync.
> 
> By the way samba does still do spinlocks or at least it did last year
> here an intresting thread where they were talking about spinlocks,
> fcntl locks and TDB based locks
> https://groups.google.com/forum/#!topic/mailing.unix.samba-technical/hM-t2pBf_Hs
> 
> That said spinlocks are just the first thing that came to mind
> (because that was part of many discussions back in the 2.x days) and
> was not best choice of words on my part.
> 
> 
> 
> 
> On Thu, Jan 23, 2014 at 4:48 PM, Paul Robert Marino <prmarino1 at gmail.com>
> wrote:
> > check this article its fairly strait forward
> > http://ctdb.samba.org/samba.html
> > if you don't get this configured properly then your locking wouldn't work.
> >
> > by the way oplocks need to be enabled based on an other post it looks
> > like you turned off all locking support.
> >
> >
> > On Thu, Jan 23, 2014 at 3:05 PM, Paul Robert Marino <prmarino1 at gmail.com>
> > wrote:
> >> Are you using CTDB on a shared gluster volume instead of TDB on a local
> >> volume which is samba default.
> >>
> >> If not this may explain your issue because Samba stores  or at least did
> >> ate
> >> one time store spinlocks in the TDB for speed.
> >>
> >>
> >>
> >> -- Sent from my HP Pre3
> >>
> >> ________________________________
> >> On Jan 23, 2014 10:31, Adrian Valeanu <Adrian.Valeanu at idiada.com> wrote:
> >>
> >> Hi,
> >> I try to replicate some data that resides on two CentOS servers. The
> >> replicated data should be shared using Samba to the users. It should be
> >> avoided that two users
> >> try to work on the same file using MS Office. If the users access the same
> >> file on one server, one of them is not able to modify the file. This is
> >> possible (and the normal operation)
> >> if one uses one server with Samba. I assumed that this kind of lock would
> >> be
> >> replicated too.
> >>
> >> I did not knew about  libgfapi and have not used it yesterday. I used the
> >> fuse mounted directory as data source for Samba.
> >>
> >> Yesterday night I updated both CentOS servers. They are CentOS 6.5 now.
> >> Now
> >> locking does not happen at all any more. After you mentioned libgfapi I
> >> found this:
> >> https://www.mail-archive.com/gluster-users@gluster.org/msg13033.html
> >>
> >> I managed to compile the module and switched to samba-glusterfs-vfs. But I
> >> still have no locking
> >> My Samba configuration looks like this:
> >> [glusterdata-vfs]
> >>    vfs object = glusterfs
> >>    glusterfs:volume = gv0
> >>    path = /
> >>    glusterfs:loglevel = 2
> >>    glusterfs:logfile = /var/log/samba/glusterdata-vfs.log
> >>
> >>    read only = no
> >>    browseable = yes
> >>    guest ok = no
> >>    printable = no
> >>    nt acl support = yes
> >>    acl map full control = yes
> >>
> >> Thank you for your attention.
> >>
> >>
> >>>>> Lalatendu Mohanty <lmohanty at redhat.com> 22.01.2014 16:10 >>>
> >>>
> >> On 01/22/2014 08:30 PM, Adrian Valeanu wrote:
> >>
> >> Hi,
> >> I have set up glusterfs 3.4.2 over an 10Gig xfs filesystem on two CentOS 6
> >> servers. The gluster filesystem is shared through Samba on both servers.
> >> Replication is working like a charm but file locking is not. Is it
> >> possible
> >> to have file locking working in this configuration in an way that
> >> Microsoft
> >> Office 2010
> >> behaves like as if the files were on the same server? Does somebody have
> >> such an configuration?
> >> I tried a lot of the Samba configurations found on the mailing list but
> >> none
> >> showed the expected results.
> >>
> >>
> >> Are you using Samba with libgfapi? I am not sure if I understand your
> >> expectation on locking through Samba. Some more context would be nice.
> >>
> >> -Lala
> >>
> >> Thank you
> >>
> >>
> >> _______________________________________________
> >> Gluster-users mailing list
> >> Gluster-users at gluster.org
> >> http://supercolony.gluster.org/mailman/listinfo/gluster-users
> >>
> >>
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://supercolony.gluster.org/mailman/listinfo/gluster-users
> 



More information about the Gluster-users mailing list