[Csync2] What makes the difference on which host I run?
Clifford Wolf
clifford at clifford.at
Mon Nov 21 16:22:53 CET 2005
Hi,
On Fri, Nov 18, 2005 at 06:42:16PM +0100, Andreas J. Koenig wrote:
> I think, I need a coaching lesson on the mechanics involved in this:
> is there supposed to be a difference depending on which host I run my
> commands on? For all commands? Only for certain commands?
yes. it is very much a difference on which host your execute a csync2
command.
csync2 basically can do two things: checking the local host (-c) and promoting
local changes to other hosts (-u).
Usually people are simply using the combined mode (-x) which is like first
running "csync2 -cr /" and then running "csync2 -u".
Let's say you have a csync2 cluster with the two hosts A and B and you
changed a file on host A.
First of all, csync2 must see that you have changed this file. So you need
to run "csync -cr /" on host A. Since no file on host B changed, running
"csync -cr /" on host B is just a complex no-op.
After that you need to tell csync2 to promote the changed file to the other
hosts. Csync2 can only push changes, not poll them. So running "csync2 -u"
on host A promotes all changes performed on host A to the other hosts.
Again, running "csync2 -u" on host B is just a complex no-op. Since there
haven't been any changes on host B there also is nothing to promote.
There are some cases where a csync2 daemon automatically detects local
changes (this is important for conflict detection), but csync2 never
automatically updates any peers.
> Today I made the plan to update single hosts with this command:
> csync2 -xv -G groupX -P hostX
This detects all changes in groupX on the local machine and promotes all
changes in this group from the local host to hostX.
But this does not promote changes from other hosts than the local host to
hostX. You need to run this command on all hosts in your cluster if you
want that. For bigger clusters one is usually using a script such as this
one for tasks like that:
http://oss.linbit.com/multissh/
but that's just a small example. there are many so called 'cluster-shell'
or 'parallel-shell' implementations out there and this on is pretty sure
one of the less featurefull ones.
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!
More information about the Csync2
mailing list