Linux – Is Samba the right choice for me

distributed-filesystemslinuxnfssambawebdav

we have a distributed application which uses large amounts of content (all kind of files). There are several servers that need to access the content. Right now the content is stored on each server redundantly. But this is getting ugly.

We want to store the content on a single storage instance with large hard discs. We then want to mount the file system of this storage instance from each of our servers.

I thought about using NFS, but the security scheme doesn't seem to fit. Right now I'm looking at Samba but I'm not sure if it is the right choice. All servers are Linux and Samba's main purpose is a Windows/Linux environment. What makes Samba interesting to me is the user level security.

Aside from security another major requirement is performance. Our servers need fast access to the content. That is as fast as possible over a LAN.

Is Samba a good choice? What other options are there? What about WebDAV?

EDIT: What I need to do: We have varying number of servers that need to access a growing number of files. We expect to become several TB. We call these files the 'content'. All servers have to use the same version of the content. The servers need concurrent read-only access to the content. The content is updated relatively seldom. Something between once a week and once a month but it likely become much more often. Right now it would be possible to sync the content on each server but that will become a pain in the near future. The update has to be quite snappy. We think it would be convenient to update/sync the content on only one server (storage server) and let all other servers mount the content as a remote filesystem.

All the best

Jan

Best Answer

Samba will almost certainly do what you want, and with fairly reasonable performance. It should have the necessary security controls to handle whatever use cases you've got in mind (your question is a bit short on details there).

It's hard to provide other recommendations, since you don't give a really good description of what you need to do, and what your constraints are. WebDAV probably isn't useful; it's not anything like a POSIX filesystem, and if you think you need blazingly fast performance, then you're probably wanting something that'll act like a full filesystem (arbitrary seeks, that sort of thing) which is going to be painful on WebDAV.

You also haven't talked about concurrent access to individual files, which has a strong bearing on your possible solution space. If only one client is accessing a given file at once, and especially if only one client will ever be updating a given file, then don't necessarily give up on periodic sync solutions -- they can do a good job, in the right conditions.

Finally, if it's mostly (or all) read-only, then consider making your data access higher-level. Rather than thinking that you have to have files, why not think in terms of useful application-specific abstractions? A common example of this is the humble SQL database -- rather than storing data in flat files and grovelling through it with custom code, some clever clods came up with the idea of a more specialised storage engine and the necessary verbiage to intelligently access it. It's not as flexible as a filesystem, but (in it's narrow niche) it's a damned sight quicker. Perhaps with a bit of imagination, you can come up with a similar abstraction for your data, which could save quite a lot of trouble?