<div>Hi everyone!</div><div>We use some wrapper for run csync2 on each of nodes:</div><div> </div><div><blockquote><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">#!/bin/bash</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">list="node01 node02 node03"</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">trid=$(date +%s)</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">LOGS_PATH=/var/log/csync2_master</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">mkdir -p $LOGS_PATH</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">CUR_DATE=`date +%F`</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">find $LOGS_PATH -type f -mtime +30 -exec rm -f {} \; 2&gt;&amp;1          | tee $LOGS_PATH/last.log       | tee -a $LOGS_PATH/$CUR_DATE.log</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">for ip in $list;do</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;"><span style="white-space:pre;"> </span>echo ' ******' 2&gt;&amp;1                                        | tee -a $LOGS_PATH/last.log    | tee -a $LOGS_PATH/$CUR_DATE.log</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">        echo 'Starting '${trid}' sync on '$ip' at '`date` 2&gt;&amp;1     | tee -a $LOGS_PATH/last.log    | tee -a $LOGS_PATH/$CUR_DATE.log</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">        ssh csync2@$ip "timeout 3600 sudo csync2 -Bvx" 2&gt;&amp;1        | tee -a $LOGS_PATH/last.log    | tee -a $LOGS_PATH/$CUR_DATE.log</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">        echo 'Finishing '${trid}' sync on '$ip' at '`date` 2&gt;&amp;1    | tee -a $LOGS_PATH/last.log    | tee -a $LOGS_PATH/$CUR_DATE.log</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">        echo ' ====== ' 2&gt;&amp;1                                       | tee -a $LOGS_PATH/last.log    | tee -a $LOGS_PATH/$CUR_DATE.log</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">done</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">echo -e "*=*=*=*=*=*=\n" 2&gt;&amp;1                                      | tee -a $LOGS_PATH/last.log    | tee -a $LOGS_PATH/$CUR_DATE.log</span></div><div><span style="font-family:&quot;courier new&quot;,courier;font-size:x-small;">sleep 60;</span></div></blockquote></div><div> </div><div>You must place this script to some *nix machine</div><div>This machine must can connect to all nodes using csync2 account, and account csync2 must have sudo permissions for run csync2 binary (you also can run csync2 from csync2 user, but in this case csync2 may have not permissions for synchronize some files)</div><div><div>timeout 3600 - this is time limit for csync2 process, you can change timeout value for your case</div><div>sleep 60 - after all nodes are synchronized, you can sleep 60 seconds before next synchronization</div><div>If you need, you can wrap content of this script in a infinite loop (while true;do .... ;sleep 60;done) and run it in screen</div><div>Alternatively of infinite loop, you can run this script in supervisord , if you have any questions, you can write email for me :)</div></div><div> </div><div> </div><div>-- <br />С уважением,</div><div>Гусев Павел</div><div>Руководитель отдела системного администрирования</div><div> </div><div>QSOFT | Ведущий web-интегратор</div><div> </div><div>офис 7(495) 771-7363 #110 | моб. 7(926) 850-1108</div><div>pgusev@qsoft.ru  </div><div>Москва, Авангардная улица, 3  |  qsoft.ru</div><div>San Francisco, 222 Columbus Ave |  qsoftus.com</div><div> </div><div> </div><div> </div><div>06.01.2015, 10:35, "Weinzierl Stefan" &lt;Stefan@weinzierl-stefan.de&gt;:</div><blockquote type="cite"><p>On 06.01.2015 04:16, Marc Fournier wrote:</p><blockquote> Terrible subject, sorry … basically, if I setup cron to run csync2 every 10 minutes, if it takes longer then 10 minutes, is there anything that prevents another instance of csync2 from starting up?</blockquote><p>Hello,<br /><br />I use this script:<br /><br />#!/bin/sh<br /><br />PIDFILE=/var/run/csync2.sh.pid<br /><br />if [ -e $PIDFILE ]; then<br />   kill -s 0 `cat $PIDFILE` &amp;&amp; exit;<br />fi<br /><br />echo $$ &gt; $PIDFILE<br /><br />/usr/sbin/csync2 -x -B<br /><br />rm $PIDFILE -rf<br /><br /><br />Stefan<br />_______________________________________________<br />Csync2 mailing list<br /><a href="mailto:Csync2@lists.linbit.com">Csync2@lists.linbit.com</a><br /><a href="http://lists.linbit.com/mailman/listinfo/csync2">http://lists.linbit.com/mailman/listinfo/csync2</a></p></blockquote>