From prashant at bluebarracuda.com  Thu Jul  5 18:16:09 2007
From: prashant at bluebarracuda.com (prashant)
Date: Thu Jul  5 18:25:13 2007
Subject: [Csync2] Csync database up to date
Message-ID: <468D1949.90306@bluebarracuda.com>

Hi All,

I am using csync2-1.33. And was running smoothly on a web cluster until 
I added 3rd node.
Please view the result of the following

root@db1:/var# csync2 -Tv
Running in-sync check for db1 <-> web2.
Connecting to host web2 (SSL) ...
X       db1     web2    /var/dir
L       db1     web2    /var/dir/scripts
L       db1     web2    /var/dir/scripts/1
L       db1     web2    /var/dir/scripts/csync2_monitor.sh
L       db1     web2    /var/dir/scripts/db_traffic_routing.sh
L       db1     web2    /var/dir/scripts/dumpsession
L       db1     web2    /var/dir/scripts/log_err
L       db1     web2    /var/dir/scripts/test
Finished with 0 errors.
root@db1:/var#

db1 is pushing data to web2, that is csync -xv is done onto db1.
How do i get rid of these.

Basically what i want to do it to have db1 which has the latest 
csync-database
over riding all csync-node database, and all nodes is sync with db1.

Please help!!!

Many Thanks
Prashant

From clifford at clifford.at  Thu Jul  5 23:54:58 2007
From: clifford at clifford.at (Clifford Wolf)
Date: Fri Jul  6 00:23:39 2007
Subject: [Csync2] Csync database up to date
In-Reply-To: <468D1949.90306@bluebarracuda.com>
References: <468D1949.90306@bluebarracuda.com>
Message-ID: <20070705215458.GB5311@clifford.at>

Hi,

On Thu, Jul 05, 2007 at 05:16:09PM +0100, prashant wrote:
> db1 is pushing data to web2, that is csync -xv is done onto db1.
> How do i get rid of these.
> 
> Basically what i want to do it to have db1 which has the latest 
> csync-database
> over riding all csync-node database, and all nodes is sync with db1.

I am not sure if I understood you correctly.. But if I did so you simply
want to run 'csync2 -TIv' on db1 to mark the files as dirty so 'csync2 -xv'
actually synchronizes them to the other node.

Csync2 is only reacting to local changes by synchronizing them to the other
nodes. So when you have added the new node to an existing configuration you
created a setup which is out sync from the beginning. (this is not a
problem in an entirely new setup because in this case csync2 detects a lot
of 'added' files.

You could force an update by eigther changing all the files and so forcing
csync2 into reacting to the loacal changes or using -TI for comparing the
nodes and marking all different files as dirty.

All this is explained ich chapter 5.5 in the documentation.

yours,
 - clifford

-- 
Never underestimate the bandwidth of a pickup full of magnetic tapes.
From prashant at bluebarracuda.com  Tue Jul 10 11:31:25 2007
From: prashant at bluebarracuda.com (prashant)
Date: Tue Jul 10 11:31:06 2007
Subject: [Csync2] auto younger not working
Message-ID: <469351ED.4010203@bluebarracuda.com>

Hi there,

I have been using csync2 for 1 week now and did not encounter any issue.
It very stable and robust and allows you to have much control over 
synchronization.

However, i am doing some test with "auto younger" for conflict 
resolution, and having the following issues

1. What i did is modified a file on db2 and ran csync2 -xv on db1 -  and 
my expected result would be that
     the file should be copied to db1 - is that right or i am wrong, 
csync2 does not do that?
     Or is there something i am missing to get this working??

2. I modified a file on db1 and after a few seconds modified the same 
file on db2 and ran csync -xv on db1.
    My expected result would be the file from db2 should be copied to 
db1 with file on db2 winning as its younger...
    but i get the result below

root@db1:/var/dir# csync2 -xv
Marking file as dirty: /var/dir/z1
Connecting to host db2 (SSL) ...
Updating /var/dir/z1 on db2 ...
While syncing file /var/dir/z1:
ERROR from peer db2: File is also marked dirty here!
Do not auto-resolve conflict: Lost 'younger/older' test.
File stays in dirty state. Try again later...
Finished with 1 errors.
root@db1:/var/dir#

my csync2.cfg

root@db1:/var/dir# more /etc/csync2.cfg

# Csync2 Example Configuration File
# ---------------------------------
#
# Please read the documentation:
# http://oss.linbit.com/csync2/paper.pdf

 group webservers
 {
        host db1;
        host db2;
#       host web2;

        key /etc/cy.key;

        include /var/dir;
#       include %homedir%/bob;
#       exclude %homedir%/bob/temp;
#       exclude *~ .*;

#       action
#       {
#               pattern /etc/apache/httpd.conf;
#               pattern /etc/apache/sites-available/*;
#               exec "/usr/sbin/apache2ctl graceful";
#               logfile "/var/log/csync2_action.log";
#               do-local;
#       }

#       backup-directory /var/backups/csync2;
#       backup-generations 3;

        auto younger;
 }

# prefix homedir
# {
#       on host[12]: /export/users;
#       on *:        /home;
# }


Is there something i am missing, or completely not understanding csync2.

Many thanks
Prashant

From clifford at clifford.at  Wed Jul 11 20:18:03 2007
From: clifford at clifford.at (Clifford Wolf)
Date: Wed Jul 11 20:14:11 2007
Subject: [Csync2] auto younger not working
In-Reply-To: <469351ED.4010203@bluebarracuda.com>
References: <469351ED.4010203@bluebarracuda.com>
Message-ID: <20070711181803.GJ32740@clifford.at>

Hi,

On Tue, Jul 10, 2007 at 10:31:25AM +0100, prashant wrote:
> 1. What i did is modified a file on db2 and ran csync2 -xv on db1 -  and my 
> expected result would be that
>     the file should be copied to db1 - is that right or i am wrong, csync2 
> does not do that?
>     Or is there something i am missing to get this working??
>
> 2. I modified a file on db1 and after a few seconds modified the same file 
> on db2 and ran csync -xv on db1.
>    My expected result would be the file from db2 should be copied to db1 
> with file on db2 winning as its younger...
>    but i get the result below

csync2 is always pushing files - never pulling them.

> ERROR from peer db2: File is also marked dirty here!
> Do not auto-resolve conflict: Lost 'younger/older' test.
> File stays in dirty state. Try again later...
> Finished with 1 errors.
> root@db1:/var/dir#

you tried to push a file from db1 to db2 but since the file on db2 is
younger your file lost the test and so nothing happend.

try pushing the file from db2 to db1 and it will work.

yours,
 - clifford

-- 
Prof: So the American government went to IBM to come up with
a data encryption standard and they came up with ...
Student: EBCDIC!
From prashant at bluebarracuda.com  Thu Jul 12 17:25:23 2007
From: prashant at bluebarracuda.com (prashant)
Date: Thu Jul 12 17:25:28 2007
Subject: [Csync2] Sync Groups
Message-ID: <469647E3.7080307@bluebarracuda.com>

Hi All,

I am using csync2 with no problem now.. but i have a small issue still...

In my config file i have 2 groups and as explained by the tutorial -G 
show sync a specified group

Therefore I am doing

root@web1:/# csync2 -xv -G webdir -d
root@web1:/#
root@web1:/#

But still nothing happens.. not even a message appears


My Config File:

root@web1:/# more /etc/csync2.cfg

# sync all webdir only
group webdir
 {
        host web1;
        host web2;

        key /etc/cy.key;

        include /usr/local/apache2/htdocs;


        auto none;
 }


# sync data folder only
group data
 {
        host web1;
        host web2;

        key /etc/datacy.key;

        include /usr/local/apache2/www/data;

        auto none;
 }

May be i am missing somehthing or doing it completely wrong.. help please

Thanks
Prashant





From clifford at clifford.at  Thu Jul 12 17:39:05 2007
From: clifford at clifford.at (Clifford Wolf)
Date: Thu Jul 12 17:35:18 2007
Subject: [Csync2] Sync Groups
In-Reply-To: <469647E3.7080307@bluebarracuda.com>
References: <469647E3.7080307@bluebarracuda.com>
Message-ID: <20070712153905.GO32740@clifford.at>

On Thu, Jul 12, 2007 at 04:25:23PM +0100, prashant wrote:
> root@web1:/# csync2 -xv -G webdir -d
>
> But still nothing happens.. not even a message appears

looks like nothing changed so nothing needs to be synced.
add more -v to get more information..

-- 
"... one of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of
their C programs." - Robert Firth. 
From prashant at bluebarracuda.com  Fri Jul 13 12:10:41 2007
From: prashant at bluebarracuda.com (prashant)
Date: Fri Jul 13 12:10:43 2007
Subject: [Csync2] Re: Csync2 Digest, Vol 22, Issue 4
In-Reply-To: <20070713100005.1BA842DF655B@mail.linbit.com>
References: <20070713100005.1BA842DF655B@mail.linbit.com>
Message-ID: <46974FA1.3070605@bluebarracuda.com>

Hi All,

I changed the data group to datadir and its working fine now..
May be its a reserved word in csync2.

I found that when i used config as a groupname i got a different issue

# updating config
 group config
 {
        host web1;
        host web2;
        key /etc/cy.key;

        include /usr/local/apache2/conf/virtualhost.conf;

        action
        {
               pattern /usr/local/apache2/conf/virtualhost.conf;
               exec "/usr/local/apache2/bin/apachectl graceful";
               logfile "/var/log/csync2_action.log";
        }


#        auto none;

 }

root@web2:/usr/local/apache2/logs# csync2 -R

Can't open included config file '{'.
root@web2:/usr/local/apache2/logs#

Any way.. csync2 is a very good tool and i am using it to sync my clusters..
Its very stable and easy to install.

Many thanks to Clifford Wolf.
My advice.. is to read the documentation, where all is very clearly 
explained.

until then have a good Csyyyynnc2..

Prashant

csync2-request@linbit.com wrote:
> Send Csync2 mailing list submissions to
> 	csync2@lists.linbit.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.linbit.com/mailman/listinfo/csync2
> or, via email, send a message with subject or body 'help' to
> 	csync2-request@lists.linbit.com
>
> You can reach the person managing the list at
> 	csync2-owner@lists.linbit.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Csync2 digest..."
>
>
> Today's Topics:
>
>    1. Sync Groups (prashant)
>    2. Re: Sync Groups (Clifford Wolf)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 12 Jul 2007 16:25:23 +0100
> From: prashant <prashant@bluebarracuda.com>
> Subject: [Csync2] Sync Groups
> To: csync2@lists.linbit.com
> Message-ID: <469647E3.7080307@bluebarracuda.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi All,
>
> I am using csync2 with no problem now.. but i have a small issue still...
>
> In my config file i have 2 groups and as explained by the tutorial -G 
> show sync a specified group
>
> Therefore I am doing
>
> root@web1:/# csync2 -xv -G webdir -d
> root@web1:/#
> root@web1:/#
>
> But still nothing happens.. not even a message appears
>
>
> My Config File:
>
> root@web1:/# more /etc/csync2.cfg
>
> # sync all webdir only
> group webdir
>  {
>         host web1;
>         host web2;
>
>         key /etc/cy.key;
>
>         include /usr/local/apache2/htdocs;
>
>
>         auto none;
>  }
>
>
> # sync data folder only
> group data
>  {
>         host web1;
>         host web2;
>
>         key /etc/datacy.key;
>
>         include /usr/local/apache2/www/data;
>
>         auto none;
>  }
>
> May be i am missing somehthing or doing it completely wrong.. help please
>
> Thanks
> Prashant
>
>
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 12 Jul 2007 17:39:05 +0200
> From: Clifford Wolf <clifford@clifford.at>
> Subject: Re: [Csync2] Sync Groups
> To: prashant <prashant@bluebarracuda.com>
> Cc: csync2@lists.linbit.com
> Message-ID: <20070712153905.GO32740@clifford.at>
> Content-Type: text/plain; charset=us-ascii
>
> On Thu, Jul 12, 2007 at 04:25:23PM +0100, prashant wrote:
>   
>> root@web1:/# csync2 -xv -G webdir -d
>>
>> But still nothing happens.. not even a message appears
>>     
>
> looks like nothing changed so nothing needs to be synced.
> add more -v to get more information..
>
>   



From prashant at bluebarracuda.com  Thu Jul 19 14:45:23 2007
From: prashant at bluebarracuda.com (prashant)
Date: Thu Jul 19 14:44:32 2007
Subject: [Csync2] Csync2 feature request
Message-ID: <469F5CE3.20005@bluebarracuda.com>

Hi All,

I am using csync2, for 2 weeks now and its has made my life very easy.

but would like to add some feature request to csync2 if it is possible 
to have it on the next releases.

1. More logs

2. To have csync2 pull in auto younger conflict resolution

For example:
web1 and web2 have both csync2 installed and web1 has csync2 -xv always 
running every minute.
Both have auto younger in their configuration files
Normally if the file is younger on web1 it get copied to web2

But I would like to have csync2 pulling a file from web2 if the file is 
younger on web2.

That would mean that i can have many entry points on a cluster with 
multiple node.

Well, tell me is this is feasible and matches csync2 philosophy.

Many Thanks

Prashant
From danb at zu.com  Thu Jul 19 18:24:39 2007
From: danb at zu.com (Dan Brown)
Date: Thu Jul 19 18:29:40 2007
Subject: [Csync2] Csync2 feature request
In-Reply-To: <469F5CE3.20005@bluebarracuda.com>
References: <469F5CE3.20005@bluebarracuda.com>
Message-ID: <4247501c7ca21$4e5a49e0$3200a8c0@DAN>

csync2 is a push technology.  If you want a younger file on web2 to be
transferred to web1, you'll need to be running csync2 -xv to be running on
web2.  Since you cannot (so as I've encountered) have both hosts running
csync2 -xv at the exact same time (one will drop out), running it every
other minute alternately on each host will work (although syncing will be a
max of 2 minutes lag rather than 1).  Depending on whehter or not your synch
will take longer than a minute, you may want to create a script which
creates lock files which are checked for via methods such as rsync so that
the other host does not interrupt a sync in progress.

Your other option (if you cannot or choose not to afford DA-SCSI, file
servers, etc) would be to abandon csync2 and use DRBD 8 + GFS(2)/OCFS in a
primary/primary role.

My feature request for this would be to allow csync2 to be run exactly at
the same time on two different hosts.


_____________________
Dan Brown
danb@zu.com

> -----Original Message-----
> From: csync2-bounces@lists.linbit.com 
> [mailto:csync2-bounces@lists.linbit.com] On Behalf Of prashant
> Sent: Thursday, July 19, 2007 06:45
> To: csync2@lists.linbit.com
> Subject: [Csync2] Csync2 feature request
> 
> Hi All,
> 
> I am using csync2, for 2 weeks now and its has made my life very easy.
> 
> but would like to add some feature request to csync2 if it is 
> possible to have it on the next releases.
> 
> 1. More logs
> 
> 2. To have csync2 pull in auto younger conflict resolution
> 
> For example:
> web1 and web2 have both csync2 installed and web1 has csync2 
> -xv always running every minute.
> Both have auto younger in their configuration files Normally 
> if the file is younger on web1 it get copied to web2
> 
> But I would like to have csync2 pulling a file from web2 if 
> the file is younger on web2.
> 
> That would mean that i can have many entry points on a 
> cluster with multiple node.
> 
> Well, tell me is this is feasible and matches csync2 philosophy.
> 
> Many Thanks
> 
> Prashant
> _______________________________________________
> Csync2 mailing list
> Csync2@lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/csync2
> 

From clifford at clifford.at  Tue Jul 24 23:26:26 2007
From: clifford at clifford.at (Clifford Wolf)
Date: Tue Jul 24 23:23:49 2007
Subject: [Csync2] Released csync2-1.34
Message-ID: <20070724212626.GV5322@clifford.at>

Hi,

I've released csync2-1.34. It contains some fixes for *BSD systems,
the SIGALARM related fix from Ulrich Weber, and some small fixes
from Lars Ellenberg regarding the -TT mode and handling of
'Identification failed!' errors. It can be downloaded as usual from:

	http://oss.linbit.com/csync2/

Happy hacking,
 - clifford

-- 
The only thing more dangerous than a hardware guy with a code patch is a
programmer with a soldering iron.
