[Samba] Shared Samba locking system
Jeremy Allison
jra at samba.org
Thu Apr 20 00:54:56 GMT 2006
On Thu, Apr 20, 2006 at 10:43:15AM +0000, Sh4d03 wrote:
> Hi all,
>
> I'm wondering whether it would be feasible to share the Samba lock file
> between two Samba servers. My implementation will be similar to this:
>
> I have two sites each with its own OpenBSD 3.8 Samba Server connected
> via OpenVPN over a "not-so-good" link. Ultimately, the link isn't too
> bad however the users are often calling on large file and crashing
> Mircrosoft Programs as they're not designed to wait that long. My plan
> is to run rsync between the two servers (in both directions) to
> synchronise the data. This will probably be done on a 5 minute basis, or
> maybe 15. My issue from here is that when file "foo" is opened on Server
> A, there will be no lock in place on Server B to prevent simultaneous
> editing. Obviously, the effect of this is that I have two versions of
> the same file and rsync will simply blow one away with the "newer" one,
> despite the "older" one possibly having new data.
>
> My intention was to share the Samba lock file "live" across the VPN
> using maybe NFS or some other means. I've been reading up on the locking
> system of Samba in an attempt to ascertain the ability to do this but
> would like to open it to you guys for advice.
>
> Alternatively, if there is another option that people can suggest for
> doing what I need I'm open for suggestions.
This is never going to work. The locking databases need full POSIX
mmap and fcntl semantics and don't work so well even on distributed
filesystems using gigabit. Using a "not-so-good" link isn't possible :-).
I'd look into replicating the actual data files via rsync if you must share stuff
between the two sites.
Jeremy.
More information about the samba
mailing list