[Samba] Custom VFS

ivenhov iwan.daniel at gmail.com
Wed Jul 25 00:37:25 MDT 2012


On 24 July 2012 22:35, Andrew Scherpbier <andrew at scherpbier.org> wrote:

> The strategy I've used is to write a simple TCP protocol client (the VFS
> module) and server (a straight forward threaded Java server).
> Works like a charm.

I was considering pretty much the same technique using localhost and
sockets to separate native library from Java service.

> As long as the client side is abstracted enough so that its samba
> connection state is independent from the server connection state, there are
> no issues with restarting either.  (I started out using a statefull
> protocol, but ended up changing to a completely stateless one, where the
> individual messages contain enough information to establish context.  This
> way, if either end of the system goes down, recovery is the simple act of
> building a new TCP connection.)

That means you need to carry enough information to resume and also have
some sort of queue of messages on the client (VFS) that has not been
delivered yet.
Is that correct?

I originally looked into hosting the JVM in the VFS module, but that was
> going to be a problem because each smbd process would have to start its own
> JVM.  The JVM startup time (especially the server JVM) is very high and the
> memory overhead would not make it scalable.

Why do you need several smbd on single host? Is it because of high
availability or some latency issues you wanted to remove?
Or did I misinterpreted that?

> The system I'm working on now manages PB class storage (currently up to
> 10PB) with hundreds of concurrent clients and the VFS module does this
> without issues or much overhead.  We're regularly seeing write speeds in
> the 400-500MB/s range using 10GbE and multiple windows clients.

Do you use hot-standby Samba server for failover, clustered Samba etc? If
yes, how do you achieve that if you don't mind telling?

And quick question about notification. If in your system file appears or
was modified outside Samba, is there a way of notifying Samba clients about
that change?
Notification that goes from VFS layer so Samba and then to Windows clients
to refresh directory, Explorer view etc.
I think that mechanism exists in Samba via inotify but I may be wrong, I'm
Samba newbie.



View this message in context: http://samba.2283325.n4.nabble.com/Custom-VFS-tp4634738p4634973.html
Sent from the Samba - General mailing list archive at Nabble.com.

More information about the samba mailing list