./net/syncffsd, FFS file system mirroring using rsync

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: pkgsrc-2020Q4, Version: 0.8, Package name: syncffsd-0.8, Maintainer: manu

syncffsd uses rsync(1) to replicate a directory tree to another host.
This involves detecting changes, something NetBSD is not well prepared to
handle. The kqueue(2) interface can detect changes, but it needs to use a
file descriptor for every node monitored, and this does not scales very
well for huge directories trees.

syncffsd attempts to improve the situation until kqueue(2) gets better,
by using FFS superblock's fs_time field, which is updated on every
file system change. This lets syncffsd detects a change immediately if the
file system is mounted synchronous, or after a few seconds if mounted with
WAPBL(4) enabled.

Once a change is detected, the relevant nodes are found by walking source
looking for files that changed since the previous file system modification.
The resulting nodes are deduped (i.e.: we do not retain a node in
a directory if the directory itself changed), and are fed to rsync(1).


Master sites:

SHA1: 50b11b3da9ba25270397d91d849222f2f4d5c59b
RMD160: adcaf8e0a043344d70d8cabf30241336eae8e99c
Filesize: 10.157 KB

Version history: (Expand)