Doloops / mcachefs

mcachefs : Simple filesystem-based file cache based on fuse
64 stars 15 forks source link

MCACHEFS OVERVIEW :

mcachefs is a simple caching filesystem for Linux using FUSE. It works by copying the file that you asked for when the file is opened, and then using that copy for all subsequent requests for the file.

mcachefs needs two filesystems to operate. The target filesystem is the slow filesystem you want to cache accesses to, and the backing filesystem is where mcachefs can stash stuff which it has copied. The backing filesystem should therefore be on local disc, or the whole point of the exercise is gone.

mcachefs caches metadata in a dedicated file, the 'metafile', which speeds up filesystem navigation. Cached metadata is persistent, but one can still flush away a part or all of the cached structure.

mcachefs handles filesystem modifications asynchronously using a dedicated 'journal' file, and all modifications to the files are made first in the backing filesystem.

The target goal is to provide an asynchronous access to a filesystem, for example network drives on a travelling laptop.

INSTALLING :

(No autotools, so no ./configure... Just make and make install for now).

USING :

mcachefs used to look for a config file to determine where the target and backing filesystems were located, but these days are over.

Now all settings must be provided using command-line arguments. mcachefs requires at least two arguments : the source and the mountpoint.

Let's say you want to mirror dir /media/input to /media/output. Just call :

mcachefs /media/input /media/output

Extra fuse-like arguments are :

This program wont terminate... If you kill it, the filesystem will unmount in a bad way. Don't do that. Use umount instead, or fusermount -u /your/moinpoint

RUN-TIME INTERFACE (VOPS) :

mcachefs exposes various run-time configuration settings in the '.mcachefs' of the mounted structure :

mcachefs states are :

mcachefs write states are :

TODO :

A load of things remains to be done :