An idea: rsyncfs, an rsync-based real-time replicated filesystem

Jan-Benedict Glaw jbglaw at
Wed Apr 13 07:55:00 GMT 2005

On Tue, 2005-04-12 23:57:37 -0400, Lester Hightower <hightowe-rsync-list at>
wrote in message <Pine.LNX.4.58.0504122319420.6482 at>:
> I envision the "VFS Change Logger" as a (hopefully very thin) middle-ware
> that sits between the kernel's VFS interfaces and a real filesystem, like
> ext3, reiser, etc.  The "VFS Change Logger" will pass VFS calls to the
> underlying filesystem driver, but it will make note of certain types of
> calls.  I have these in mind so far, but there are likely others:
>   open( ... , "w"), write(fd), unlink( ... ), mkdir( ... ), rmdir( ... )

I implemented such a beast in terms of a LD_PRELOAD library that
intercepts these calls (as well as a whole lot others that may update
time information). Unfortunately, this was proprietary and I don't have
access to the sources. However, I've done that, the idea is there, it
can be done again.

Though, this only works if there's a limited number of applications
accessing the volume. So it won't work well to replicate /home ,  but it
would work quite well for replicating a volume that's only accessed by a
FTP server or some other kind of file server.

The tricky part however is to fight against glibc's internal date
representation in this case. Glibc basically uses the "latest and
greatest" data representation needed at the time of writing, and this
interface changes from time to time. So you either have to closely
follow glibc development, or you need to nail down one version that
actually "works"...

A different approach would be to use ptrace for sniffing at the syscall
layer, but this is troublesome right after fork() IIRC.


Jan-Benedict Glaw       jbglaw at    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the rsync mailing list