Greyhole VFS module(s)

Guillaume Boudreau samba at pommepause.com
Thu Nov 25 12:53:08 MST 2010


Hi,

Jeremy contacted me today about a possible inclusion of the Greyhole
VFS module in mainline Samba.
I'm thrilled by the idea, so here's the VFS module in question.

For those who don't know Greyhole (that would be most if not all of
you), you can read about it here: http://code.google.com/p/greyhole/
"Greyhole is an application that uses Samba to create a storage pool
of all your available hard drives (whatever their size, however
they're connected), and allows you to create redundant copies of the
files you store, in order to prevent data loss when part of your
hardware fails."

I have two versions (one for 3.4, one for 3.5) because my 3.4 version
wouldn't compile on 3.5. Maybe there's a way to unify both into one
file, but I don't know how.
Suggestions are welcome. (Code reviews too!)

The module is quite simple; it simply logs to syslogd
(/var/log/messages) all file operations that Greyhole cares about.
Those logs are formated in *-seperated fields: yuck! I'm sure someone
can suggest a better approach than this to keep those logs
machine-readable!

Here's an example of what is getting logged by the VFS module:

Nov 21 10:02:01 hda smbd_greyhole: open*Backups*greyhole.yml*31*for writing
Nov 21 10:02:01 hda smbd_greyhole: close*Backups*31*
Nov 21 06:58:38 hda smbd_greyhole:
unlink*Videos*Movies/Wedding/wedding-raw-1.ts*
Nov 21 06:58:42 hda smbd_greyhole:
rename*Videos*Movies/Wedding*Movies/Wedding Raw Material*

The C code now:

3.4 module: http://greyhole.googlecode.com/svn/trunk/samba-module/vfs_greyhole.c
3.5 module: http://greyhole.googlecode.com/svn/trunk/samba-module/vfs_greyhole-samba-3.5.c

Good day.

--
Guillaume Boudreau
http://about.me/guillaume.boudreau/bio


More information about the samba-technical mailing list