Csync2 + lsyncd

Discussion in 'Installation/Configuration' started by diablo666, Jun 9, 2014.

  1. diablo666

    diablo666 Active Member HowtoForge Supporter

    Hi there,
    i'm trying to do some improvments to my cluster configuration.

    To do that i'm testing csync2 + lsyncd.

    I've succesfully configured it for the directory /var/vmail it works very very great.

    The problem i'll encounter is with the directory /var/www.

    the problem is that it works correctly for the files, but with the directory i'll get the following error

    Code:
    [root@test04 www]# csync2 -p 25 -xv
    Connecting to host cc00983 (PLAIN) ...
    Updating /var/www/clients/client0/web1 on cc00983 ...
    File is already up to date on peer.
    While syncing file /var/www/clients/client0/web1:
    ERROR from peer cc00983: Operation not permitted
    File stays in dirty state. Try again later...
    Finished with 1 errors.
    This will cause e failure, anche exit from lsyncd, stopping the sincronization.

    The strange is that if i'll modify a file inside /var/www/clients/client0/web1 it will be correclty replicate both ways. Semme a problem related to directories.

    Anyone tried that?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The probem is most likely caused by the immutable bits. You will have to turn off the website protection in ispconfig to get it to work and then remove the immutable bits from all folders with the command:

    Code:
    chattr -i /var/www/clients/client*/web*
     
  3. diablo666

    diablo666 Active Member HowtoForge Supporter

    Sorry... where is website protection in ispconfig?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    System > server config > web
     
  5. diablo666

    diablo666 Active Member HowtoForge Supporter

    Ok worked perfectly.

    I've build the cluster with ispconfig+percona xtradb+ lsync + csync2

    Works perfectly!
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Interesting setup, I've planned to test this doe the next generation of multiserver tutorials as well. Did you convert the dbispconfig database to innodb, or did you exclude it from replication? Or is myisam replication working now reliably in percona?
     
  7. diablo666

    diablo666 Active Member HowtoForge Supporter

    At the beginning i was using myisam but got some problem in replication.

    I've read that now myisam can be anabled, but is experimental so it is discouraged to use in production environment.

    After that i've converted ispconfig do innodb, after that all worked fine.

    I've migrated on that systems lot of website with drupal, and converted al db to innodb (i've converted before import).

    The problem with Percona xtradb is that you need 3 nodes to run HA, or 2 nodes and 1 garbd (that act like a 3rd node). In my case i've no problem with resources, so i've configure 2 Percona and 1 garbd node.

    If you only use 2 nodes, and 1 goes down, Percona will stop to avoid splitbrain.
     

Share This Page