CTDB on cluster filesystem without file locking

ronnie sahlberg ronniesahlberg at gmail.com
Wed Aug 6 03:28:52 GMT 2008


Please update and try the latest git version of samba 3.2.
There has been recent changes that changes how samba writes to a
persistent database.

Your entry :  tdb(/var/ctdb/persistent/secrets.tdb.0):
tdb_transaction_start: cannot start
indicates that it is the samba client dbwrapper code that tries to
perform a tdb transaction,
something which is does not do in the most recent code since there
were conflict with transactions
and tdb locking.


Please test carefully and report any issues.
If your filesystem does not provide coherent byte range locking I do
not think you will get
correct lock interaction between the CIFS and the NFS world, unless
you also provide your own NLM replacement daemon.

CTDB/Samba has never been tested with and havent been designed for use
with with
"lockless" cluster filesystems,   so there are probably a lot of
things that can (and probably will) break in subtle and
hard-to-diagnose ways.

Good luck, and keep us informed.


regards
ronnie sahlberg


On Wed, Aug 6, 2008 at 12:36 PM, lazycy <yi.chen1982 at gmail.com> wrote:
>
> Hi, Volker tdb(/var/ctdb/persistent/secrets.tdb.0): tdb_transaction_start: cannot start
>   Thanks for your guide first. I found that if I put the recoverylock file
> under my cluster filesystem, CTDB will report a error "recovery lock file
> not locked when recovering" in RECOVERY which caused by fcntl failure. So I
> put this file under an nfs share directory as a work-around, and this time
> CTDB seems start correctly.  But when I try to start samba(with CTDB patch),
> it dumps. I've post the content in log file and my configurations as well on
> http://www.nabble.com/Samba-with-CTDB-td18827915.html
>
> Also if I try to add an user, I will get a error as below:
> [root at COS1-001 ~]# /usr/local/samba/bin/smbpasswd -a cy
> tdb(/var/ctdb/persistent/secrets.tdb.0): tdb_transaction_start: cannot start
> a t
> tdb(/var/ctdb/persistent/secrets.tdb.0): tdb_transaction_start: cannot start
> a t
> pdb_generate_sam_sid: Failed to store generated machine SID.
> PANIC (pid 11201): Could not generate a machine SID
>
> BACKTRACE: 7 stack frames:
>  #0 /usr/local/samba/bin/smbpasswd(log_stack_trace+0x1a) [0x4f3482]
>  #1 /usr/local/samba/bin/smbpasswd(smb_panic+0x69) [0x4f331c]
>  #2 /usr/local/samba/bin/smbpasswd(get_global_sam_sid+0x34) [0x46f5f3]
>  #3 /usr/local/samba/bin/smbpasswd [0x45edab]
>  #4 /usr/local/samba/bin/smbpasswd(main+0xcc) [0x45f517]
>  #5 /lib64/tls/libc.so.6(__libc_start_main+0xda) [0x2ab960b65a7a]
>  #6 /usr/local/samba/bin/smbpasswd [0x45e4ba]
> Aborted
>
> Seems the same problem which caused by CTDB transaction not samba itself,
> Can you give me more suggestions if anything that I probably missed in my
> CTDB configuration?
>
> Thanks,
> Ethan
>
>
> Volker Lendecke wrote:
>>
>> On Tue, Aug 05, 2008 at 06:55:43AM -0700, lazycy wrote:
>>>
>>> Hi, all
>>>    I'm trying to implement cluster samba on my cluster file system. My
>>> solution is CTDB+smaba, I noticed on CTDB homepage, there is one sentence
>>> in
>>> the prerequisites part:
>>>    We have primarily used the GPFS filesystem for our testing but any
>>> cluster filesystem should work as long as it provides correct file
>>> locking.
>>>    My concern is that my own cluster filesystem has not implement the
>>> standard flie locking(fcntl) yet. (However, we use another solution to
>>> get
>>> valid behavior when concurrent write operation happened) So, is it still
>>> possible for me to use CTDB? I'm a newbie of CTDB. Very appreciate if you
>>> can give me any suggestion!
>>
>> ctdb uses fcntl locking in the shared file system to make
>> sure only one ctdb master process is around during recovery
>> and config changes. If more than one process gets this lock,
>> it won't work. For normal operation we don't depend on
>> shared fcntl locks though, many cluster file systems are
>> MUCH too slow with this.
>>
>> Volker
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/CTDB-on-cluster-filesystem-without-file-locking-tp18831651p18843323.html
> Sent from the Samba - samba-technical mailing list archive at Nabble.com.
>
>


More information about the samba-technical mailing list