Author: ["Calin"]

Language: [http://www.perl.org Perl]

Platform: Linux


Local Mirror File System

A filesystem driver for linux, which allows any number of locally mounted filesystems to be mirrored in real time.


LMFS requires Fuse version 2.6 or higher, and the Fuse perl module version 0.09 with the included patch applied.

The patch updates the module's fuse syntax from version 2.5 to 2.6, as well as adding support for the 'access' and 'lock' callbacks. If future versions of the module provide those, the patch will no longer be needed.

To apply the patch, cd to Fuse-0.09 and run

patch -p0 < /path/to/lmfs/Fuse-0.09-patch-jh

You should see something like:

patching file Fuse.pm
patching file Fuse.xs
patching file Makefile.PL

Then install by running 'perl Makefile.PL && make && make install'

Before running lmfs, you must also load the fuse kernel module. 'modprobe fuse'

Valid lmfs sources must have a .lmfs directory in the root, which must contain a 'signature' file.

The contents of .lmfs/signature is arbitrary, but must match on all source members. The first one checked will be treated as authoritative, and any that do no match will not participate in the mirror.

Check syslog for events.

Then cd to your lmfs directory, and run:

./lmfs.pl /first/source:/second/source /mountpoint

Any files from either /first/source or /second/source will now appear under /mountpoint, and when data is written it will be written to both sources. Sources may be any locally mounted directories, including nfs or samba mounts or subdirectories.

Downloads

attachment:lmfs-02262008.tar.bz2

LMFS (last edited 2008-06-08 04:34:12 by calin)