Greyhole VFS module(s)

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


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:
"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

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:
Nov 21 06:58:42 hda smbd_greyhole:
rename*Videos*Movies/Wedding*Movies/Wedding Raw Material*

The C code now:

3.4 module:
3.5 module:

Good day.

Guillaume Boudreau

More information about the samba-technical mailing list