Greyhole VFS module(s)

Jeremy Allison jra at samba.org
Thu Nov 25 14:56:04 MST 2010


On Thu, Nov 25, 2010 at 03:18:32PM -0500, Guillaume Boudreau wrote:
> 
> Logging to a flat file allows Samba to work even if the actual
> Greyhole daemon is offline, for whatever reason.
> I didn't want to 'loose' file operations because the daemon was not
> running, or worse, prevent users from modifying files when that
> happened.
> The daemon, when it's running, can then parse those logs at whatever
> speed it can, and act on them accordingly.

Why go through syslogd then ? Why not have Samba
write into a sqllite database, or maybe a transactional tdb
that the daemon can access simultaneously if it's running ?

Right now you're using syslogd as an intermediate daemon
already to linearize the logs. Might be possible to build
this into the vfs module.

> But maybe using both approaches would be beneficial: use a domain
> socket when available, and log to syslogd otherwise. When the daemon
> would start, it would then need to parse what it missed from the
> syslog before starting to accept logs on the socket, in order to keep
> the operations ordering (which Greyhole cares greatly about).

I just think it's going to be more efficient that going
via syslogd -> text file.

> But now that I think about it, maybe it would help end-users if Samba
> could tell them that the Greyhole daemon is offline, when they try to
> modify shared files. They probably don't want the daemon offline.
> Do you think it would make sense for the VFS module to return an error
> when the socket is not available, and prevent the file operation?

Yes, you could do that (return an error). It's part of the VFS
interface.

> Sometimes, the daemon needs to be restarted (for example on
> configuration changes). I didn't want such restarts to prevent users
> writing on their shares...

Can you tell me exactly what semantics you require ?

Jeremy.


More information about the samba-technical mailing list