[Csync2] Using a private network
Sam Howard
sam.howard at officepcsupport.com
Tue Sep 9 05:18:55 CEST 2008
Hi.
I put in:
host foo at foo-priv;
host (bar at bar-priv);
All 4 hostnames are in /etc/hosts on both hosts and the "-priv" are
obviously the private network IPs. Made sure all config files were in sync,
deleted the csync2 database (it was just test junk anyway), and it finally
sort of worked.
My test worked, but real data still fails after a while.
Directory "1001" has 4,794,446 files and directories (many of them are
hardlinks to the same data ... dirvish archive). This leaves me with a
database size of 6,033,509,376 bytes (wow!).
The slave host has some data that was copied over the public network, before
csync2 blew up. Now that I have it running over the private network, here's
what I get:
[22:31:04] Updating
/mnt/dirvish02-data/1001/1002/2006-12-31/tree/Documents-and-Settings/Body
contouring BP March 31st.ppt.bwt on bar-priv ...
[22:31:09] File is already up to date on peer.
[22:31:09] Updating
/mnt/dirvish02-data/1001/1002/2006-12-31/tree/Documents-and-Settings/Dr.
Doctors Photo Galleries on bar-priv ...
[22:31:09] File is already up to date on peer.
[22:31:09] Updating
/mnt/dirvish02-data/1001/1002/2006-12-31/tree/Documents-and-Settings/Dr.
Doctors Photo Galleries/2005 NPR Weight Loss Support Group.ppt.bwt on
bar-priv ...
[22:31:12] File is already up to date on peer.
[22:31:14] Updating
/mnt/dirvish02-data/1001/1002/2006-12-31/tree/Documents-and-Settings/Dr.
Doctors Photo Galleries/Body contouring 2 - oct 19-2004.ppt.bwt on bar-priv
...
[22:33:33] While syncing file
/mnt/dirvish02-data/1001/1002/2006-12-31/tree/Documents-and-Settings/Dr.
Doctors Photo Galleries/Body contouring 2 - oct 19-2004.ppt.bwt:
[22:33:33] ERROR from peer bar-priv: Connection closed.
[22:33:33] File stays in dirty state. Try again later...
[22:33:35] ERROR from peer bar-priv: Connection closed.
[22:33:35] Finished with 2 errors.
TIMESTAMP: 2008-09-08 22:33:35 EDT (GMT-0400)
TOTALTIME: 2:21:32
real 141m31.822s
user 15m47.471s
sys 4m3.219s
root at foo:/etc/csync2# ls -l
'/mnt/dirvish02-data/1001/1002/2006-12-31/tree/Documents-and-Settings/Dr.
Doctors Photo Galleries/Body contouring 2 - oct 19-2004.ppt.bwt'
-rw-r--r-- 1 1002 1001 388650873 2006-12-13 23:05
/mnt/dirvish02-data/1001/1002/2006-12-31/tree/Documents-and-Settings/Dr.
Doctors Photo Galleries/Body contouring 2 - oct 19-2004.ppt.bwt
If I re-run this, it fails again, but takes even longer.
Is anyone using csync2 to keep larger files (388M really isn't that big) in
sync? Also, is there an option to as csync2 to retry a connection a few
times before giving up? The startup cost is huge, so that would really help
a lot. (to put in perspective, of the 141 minute run time, less than 3
minutes elapsed after the source-side scan completed and the transfer
actually started, and it failed on this first non-sync'd file).
RAM is not an issue, I don't think ... both hosts have >2GB free, dual core
AMD64, Ubuntu Hardy.
Thanks,
Sam
On Mon, Sep 8, 2008 at 3:09 AM, Lars Ellenberg <lars.ellenberg at linbit.com>wrote:
> 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(R)/HA support and consulting http://www.linbit.com
>
> DRBD(R) and LINBIT(R) are registered trademarks
> of LINBIT Information Technologies GmbH
> _______________________________________________
> Csync2 mailing list
> Csync2 at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/csync2
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linbit.com/pipermail/csync2/attachments/20080908/83b55bbb/attachment.htm
More information about the Csync2
mailing list