Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My SAMBA cluster is unreliable, I noticed that from Windows desktop (on some occasion works fine but it is not reliable), on Ubuntu I'm getting this error (same is keep repeating in the log):

[root@smb1 ~]# smbpasswd -a root
lib/dbwrap_ctdb.c:951 Error sending local control SCHEDULE_FOR_DELETION: NT_STATUS_OK, cstatus = -1
g_lock_force_unlock: Could not store record: NT_STATUS_UNSUCCESSFUL
g_lock_unlock failed: NT_STATUS_UNSUCCESSFUL
New SMB password:

It feels like that Samba cannot write to TDB tables in cluster configuration, they are kept separately from DRBD block on each node local file system:

[root@smb2 ~]# ls /usr/local/var/ctdb/ -la
total 492
drwxr-xr-x 4 root root  4096 2014-01-13 22:24 .
drwxr-xr-x 3 root root  4096 2014-01-13 22:22 ..
-rw-r--r-- 1 root root 53248 2014-01-17 21:41 brlock.tdb.1
-rw-r--r-- 1 root root 81920 2014-01-17 21:45 connections.tdb.1
-rwx------ 1 root root 53248 2014-01-17 22:17 g_lock.tdb.1
-rw-r--r-- 1 root root 53248 2014-01-17 21:41 locking.tdb.1
-rw-r--r-- 1 root root 53248 2014-01-17 21:37 notify_onelevel.tdb.1
-rw-r--r-- 1 root root 40172 2014-01-17 21:04 notify.tdb.1
drwx------ 2 root root  4096 2014-01-13 22:22 persistent
-rw-r--r-- 1 root root 53248 2014-01-17 22:17 printer_list.tdb.1
-rw-r--r-- 1 root root 53248 2014-01-17 22:16 serverid.tdb.1
-rw-r--r-- 1 root root 40172 2014-01-17 20:46 sessionid.tdb.1
drwx------ 2 root root  4096 2014-01-17 20:46 state
-rw------- 1 root root   696 2014-01-13 22:22 vactune.tdb.1

I've spent whole week searching for solution on the web but nothing. That makes me believe my issue is either extremely easy solved or it's a brand new.

I deployed this setup on my VirtualBox lab, I tried changing many parameters of virtual machines (cpu number, network adapter card, chipset...) but it didn't help...

share|improve this question
What specific behaviors are you seeing that make the system unreliable? – Katherine Villyard Jan 17 '14 at 22:08
@KatherineVillyard Refresh does not work, copy of large files (cca 500mb or more) is getting broken when run from windows, ubuntu always report syntax error at the end of file copy (but file is copied)... Example from right now: I deleted all folders/files on share from windows client, on this client all looks deleted but not from this client on other node and from other windows client whole structure exist on bith nodes. I checked ls /clusterdata/public/ on both linux boxes and whole folder/file structure is still present on both nodes... – radenkovich Jan 18 '14 at 19:03
I'm getting pretty sure DRBD + GFS2 is working fine (all files management on /clusterdata/public done in linux) is smooth and reflected to other node. Therefore issue must be with SAMBA and CTDB... – radenkovich Jan 18 '14 at 20:10
I can confirm changing from clustering = yes to clustering = no in samba configuration file resolved the network issue and these tdb error related errors are showing no more in logs, but this is no solution I believe... – radenkovich Jan 19 '14 at 10:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.