[Csync2] Query on Initializing the file table for csync2 database

Ganesh Jayaraman ganesh.jayaraman at gigamon.com
Wed Feb 3 09:00:59 CET 2021


Hi Team,

This is Ganesh Jayaraman from Gigamon. We use csync2 for synchronising files across group of hosts in a cluster.

Members to the group will be added sequentially and we need to do the sync whenever we add a member to the cluster.

Note :

  1.  Cluster will have one master and rest of them will act as standby hosts
  2.  CSync2 configurations are done as per the guidance given in the doc<https://github.com/LINBIT/csync2/blob/master/doc/csync2.adoc>
       Before starting the first sync (ie. To the first host/peer that is getting added to the cluster) we would initialize the database on the master node (from where we want to sync to peers) using the command csync2 -cIr -N <Master-Hostname> which is in-turn creating the DB and tables

Whenever a new member is added to the group we tried to sync the files using the command csync2 -N <Master-Hostname> -rx -P <peer-that-was-added-to-the-group>

While doing so we observed that the sync is happening for the first peer that we try to add to the cluster but the same is not happening for the subsequent members that were added into the cluster

When we dug the reason behind it, we found that if there is no change in local file system and file table (of the current host) or there are no entries in dirty table then we would not sync anything to the peer

The reason for the first time it sync’d is that file table is empty and local file system has few files (under the directories which we want to sync)

Hence, in-order to achieve the goal of whenever a new member is added to the cluster we need to fully sync the files, we are thinking of something like below :


  1.  Whenever we create database and tables in master, fill the file table with list of files that need to be sync’d with the remote peers when they are added
  2.  Whenever any member is added to the cluster, populate the dirty table from the list of files that we have in file table and do a force sync for the peer
  3.  Repeat the same for any number of host being added to the group


However, we couldn’t find any direct command which will just populate the file table alone when we went through the doc<https://github.com/LINBIT/csync2/blob/master/doc/csync2.adoc>

Recently we observed one behaviour where after creating database and tables on master using the command csync2 -cIr, if we run csync2 -N <master-hostname> -rx -P <same-master-hostname> fills up the file table (basically tells csync2 to sync to itself and it populates the file table and doesn’t sync because it is local)

Now, the question is, can we use the above command as a way/mechanism for populating the file table or is it not the recommended way to do that

If it is not the recommended way to achieve that, then can you guide us on what we need to do to fill up the file table alone ?

Many thanks for your help and looking forward for suggestions from you

Thanks & Regards,
Ganesh Jayaraman

This message may contain confidential and privileged information. If it has been sent to you in error, please reply to advise the sender of the error and then immediately delete it. If you are not the intended recipient, do not read, copy, disclose or otherwise use this message. The sender disclaims any liability for such unauthorized use. NOTE that all incoming emails sent to Gigamon email accounts will be archived and may be scanned by us and/or by external service providers to detect and prevent threats to our systems, investigate illegal or inappropriate behavior, and/or eliminate unsolicited promotional emails (“spam”).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/csync2/attachments/20210203/6c59a5f3/attachment.htm>


More information about the Csync2 mailing list