[Csync2] cysnc2 vs linking hackery
Johan De Meersman
jdm at operamail.com
Wed Dec 6 10:41:29 CET 2006
Rafiu Fakunle wrote:
> Csync2 for config files I understand. But what about stuff like
> /var/cache/samba/ directory or /var/lib/nfs directory?
>
> Sounds great. I'm hoping we can use csync2. But I just need
> clarification on that one point about deploying for application
> metatdata. I can understand it might not be suitable for a database
> app eg. mysql but I'm talking purely about things like Samba, NFS,
> HTTPD, Proftpd et al.
CSync2, and rsync and whatever for that matter, are time-driven: they
get called at certain times, regardless of the state of the data, and
copy the data as it is at that point. Crontab can't go lower than
1-minute intervals, and if you've got lots of data, that may not even be
enough time to copy everything.
Metadata, for most applications, is runtime data that changes every time
you move the mouse, so to speak, and if you want to failover the service
on-the-fly to another host, you need access to the most recent version
of it. Thus, to replicate this, you need data-driven replication,
something that watches the actual data and copies everything over as
soon as it changes.
DRBD's driver sticks it's feelers into the actual data stream of the
block devices, and thus does exactly that: all data that passes through
to disk gets copied out to the remote system.
So the answer is no, you can't. Not with CSync2. While, theoretically,
it's quite possible to hack a filesystem driver to wake up when certain
files are modified and pump them over to some other host, afaik it
hasn't been done and your best guess is still the DRBD metadata volume
with symlinked files.
Then again... If you're *really* desperate to get rid of that setup, you
could have a look at FAM, the File Alteration Monitor. I've never really
played with it, but it might be possible to hack up something that's
close enough to data-driven replication that it suits the purpose.
--
Q: What is printed on the bottom of beer bottles in Minnesota?
A: Open other end.
--
Public GPG key at blackhole.pca.dfn.de
GCS/IT d- s:+ a- C(+++)$ UL++++$ P+++(++++)$ L++(+++)$ !E- W+(+++)$
N+(++) o K w$ !O !M V PS(++)@ PE-(++)@ Y+ PGP++(+++) t(+) 5 X R tv--
b++(++++) DI++(++++) D++ G e++>+++++ h(+) r y+**
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: OpenPGP digital signature
Url : http://lists.linbit.com/pipermail/csync2/attachments/20061206/8723f48d/signature-0001.pgp
More information about the Csync2
mailing list