[Csync2] 3-node masters and root-owned files

Mark Hodge mark at mphinity.com
Sun Jul 16 16:01:03 CEST 2017


Hi,

I've recently setup a csync cluster between 3 nodes and although the 
ring model works ok, it obviously fails when the middle server (node 2) 
is offline. Therefore I've been trying to get a working config that is 
something like this:

node1 => node2 + node3
node2 => node1 + node3
node3 => node1 + node2

So at least if node2 is offline, node1+node3 are still syncing.

Is this the best way to achieve this? using "master (slave)" pairs?

I ended up putting csync on all nodes in a cron every minute (lsync 
would crash occasionally) when csync returned errors.

I got lots of "Database is busy, sleeping a sec" errors, which I 
presumed was because csync was running at the same time on each node and 
causing db locks. So I staggered them, at 0, 20 and 40 sec in the minute 
which got rid of the "busy" errors.

However, occasionally I will get random files appear one one or more 
nodes owned by "root" with perms "rw" only for owner. This means 
standard users cannot access these files.  I suspect that csync is 
somehow failing to set uid/gid/perms after the copy.

How can this happen?

Mark.



More information about the Csync2 mailing list