Options for synchronising filesystems

Oliver Fromme olli at lurza.secnetix.de
Tue Sep 27 04:25:29 PDT 2005


Isaac Levy <ike at lesmuug.org> wrote:
 > In effect, a terse example of how someone could use the Geom tools I  
 > mentioned, to meet this requirement:
 > 
 > + Setup mirrored disks across machines as discussed before
 > 
 > + Mount a slice of that disk Read/Write on one machine (acting as  
 > master)
 > + Mount that same slice Readonly on both machines, using Geom Gate,  
 > and serve data from there.

That doesn't work.  You would need a cache coherency proto-
coll for that setup to work correctly.  Or mount it read-
only _everywhere_ (including the master).  If you have to
perform updates, you would have to perform this sequence:

   1. remount the master read-write,
   2. do the updates,
   3. remount the master read-only,
   4. flush the caches on the slaves (umount; mount).

But that means you'll have a short downtime each time you
update things -- probably not what you want, especially if
a redundant setup is the goal.

Currently, the _only_ way to mount the same filesystem on
multiple FreeBSD systems is NFS (or third-party software
like CODA).  Another alternative, as others have mentioned,
is to duplicate or synchronize the filesystems on each
server regularly (rsync, unison, whatever).

 > Eric, you are definately correct, that there's not really a disk- 
 > level mechanism to maintain concurrent writes between volumes mounted  
 > across servers using FreeBSD

Not even concurrent reads and write (i.e. one host writes
and the others read).  See above.

 > (excepting NFS, which in this context, makes me say *yuck*).

NFS certainly has its disadvantages, but works pretty well
when set up in a reasonable way.

 > I guess I'm saying this is a big-picture computing problem IMHO, and  
 > I don't know of a good solution here (though I'm curious about what  
 > kind of work has been done in Dragonfly which is relevant?)

So far, DragonFly BSD hasn't done anything regarding cache-
coherency for clusters, though it is planned for the future,
I think.  So, as of today, DF doesn't provide a solution for
the above problem either.

However, Matt Dillon has worked on a journalling feature
for UFS which might be helpful for the situation given by
the OP.  Not everything is implemented yet, but it _is_
already usable to maintain remote mirrors.  On July 5th,
Matt wrote:  "I can now run a buildworld loop, and the
mirror generated by the journal stays in synch (diff -r
reports no differences if I idle the buildworld, wait a
second or two for the journal to catch up, and run it)."

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

It's trivial to make fun of Microsoft products,
but it takes a real man to make them work,
and a God to make them do anything useful.


More information about the freebsd-cluster mailing list