[Csync2] -T shows files with "L", but -u doesn't transfer tehm

Lars Ellenberg lars.ellenberg at linbit.com
Fri May 25 09:40:02 CEST 2012


On Thu, May 24, 2012 at 07:10:58PM -0700, Dustin Mitchell wrote:
> ----- Original Message -----
> > Howto integrate a new host into an existing csync2 setup.
> > 
> >  * edit the config files, everywhere, so they know each other.
> >  * make sure your old hosts are "in good order":
> >    A# csync2 -x
> >    B# csync2 -x
> >  * if you have already files on the new node to be synced,
> >    now would be a good time
> >    C# csync2 -x
> > 
> >    If you'd rather chose one of the existing hosts to be "master",
> >    and have the new host become a clone of that, *instead* do
> >    just initialize the database on the new host with the current
> >    state
> >    C# csync2 -cIr /
> > 
> >  * on the old hosts, compare the database with the other node's
> >  databases
> >    A# csync2 -TUXI; csync2 -u
> >    B# csync2 -TUXI; csync2 -u
> >    assuming A and B are properly in sync already,
> >    doing so on one is sufficient.
> > 
> >    Careful, this may schedule stuff for deletion if it is missing
> >    from
> >    the local database, but present on the remote side.
> >    (That's the -X modifier).
> > 
> > That should be it.
> 
> I can confirm that this works, but it has the disadvantage you
> describe, and also isn't particularly automatable (since the -TUXI run
> must occur on a different host than the one being set up).
> 
> However, your reply didn't really help me understand the problem or
> the solution.  Can you tell me a bit about what's going on here, and
> I'll try to come up with some text to add to the documentation?  As I
> mentioned in my original email, the docs give the distinct impression
> that -I is only an optimization, and don't talk about -TI as a pair,
> much less -U and -X.

It is mentioned both in my man page and in
http://oss.linbit.com/csync2/paper.pdf

Though it could probably me more verbose, of give example use cases.
 -I is a modifier. It modifies -c and -T in different ways.

As you know, csync2 is push only.

There is the state of the file system,
the recorded state in the data base,
and the dirty table.

csync2 -u tries to push all changes marked in the dirty table.

 -c compares file system state with recorded state,
    and marks detected differences in the dirty table.
 -cI
    initializes the recorded state with what is found in the file
    system, and does not (should not?) touch the other tables.
 
 -T compares local recorded state with remote recorded state
 -TI
    compares local recorded state with remote recorded state,
    and marks detected differences in the dirty table,
    with -U for just the peer that is different,
    without -U for all peers (just in case),
    with -X also marks for deletion those that are in the remote db,
    but not in the local db.


Because the recorded state and the file system state
on A and B are not different, -c does not mark as dirty,
so -u does not think there is anything to push.


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com


More information about the Csync2 mailing list