[Csync2] Using a private network
Lars Ellenberg
lars.ellenberg at linbit.com
Mon Sep 8 11:09:55 CEST 2008
On Mon, Sep 08, 2008 at 01:02:24AM -0600, Sam Howard wrote:
> Hi.
> The PDF docs talks about being able to use an alternate/private network, but
> the example doesn't make sense to me ...
>
> I have host "foo" in the /etc/hosts with its external IP, and 'foo-priv" in
> the /etc/hosts with it's private IP.
>
> I've tried config entries like:
>
> foo at foo-priv
> foo-priv at foo (getting desperate)
> foo at foo-eth0 (not in hosts file, but who knows)
> foo at 1.2.3.4 (private ip)
>
> I can't seem to get any combination of entries to work. What does the
> actual configuration need to look like?
node bar.
node foo.
bar connects to foo, saying "hello, I'm bar".
foo does a forward lookup of "bar",
gets back an ip address,
tries to match that ip address with the one the connection comes from.
if they don't match (the connection comes from a different IP than
the result of a forward lookup of "bar" on foo), connection is refused.
the hostname in csync2.cfg has two aspects:
first, the hostname is compared to the local hostname,
to identify whether or not this host is part of a certain group.
second, the hostname is resolved to an ip address to connect to.
usually both aspects can be matched in the same name.
sometimes you need to say
<baz>@<baz address>
where <baz> is the hostname for the node baz to identify itself,
and <baz address> is the address baz can be reached at from other nodes.
so if your node is named foo, there has to be foo at .
if bar can reach foo under foo-addr, then it has to be @foo-addr.
still, on foo, it needs to be able to forward lookup (resolve)
"bar" to the remote end of the incoming tcp connection.
if all else fails, you can still add a "bar's.incoming.ip.addr bar" to
/etc/hosts.
don't forget to "csync2 -R" to clean up left-overs from previous
trial runs.
did that help, or did it confuse you further?
> Also, is there a way to use a different database name for each group?
you can have different databases for different _configs_.
(-C switch)
> My
> test server has over 12M files (many are hard links -- it's a dirvish
> archive) ... this ends me up with a 12GB database file ... needless to say,
> it takes over 2 hours just to do a sync check, and I haven't even added the
> other filesystems yet!
--
: Lars Ellenberg
: LINBIT HA-Solutions GmbH
: DRBD®/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks
of LINBIT Information Technologies GmbH
More information about the Csync2
mailing list