LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 02-27-2008, 03:03 PM   #1
Dox Systems - Brian
Member
 
Registered: Nov 2006
Posts: 344

Rep: Reputation: 31
Samba vs. native Solaris file locking/contention.


I support a Solaris server that has SunRay users that access the filesystem "locally" and PC users that access it over SMB/CIFS (through Samba). Unfortunately, some of their data is still shared by way of spreadsheets that multiple people update (there's so many things much higher on the priority list that getting a real network application to handle the data could be years out).

If a SunRay user opens it first, all is well, the PC user is not allowed to open as read-write. However, if the Samba user has it open first, SunRay users are able to open the file and write to it. Then, when the Samba user eventually saves it, the SunRay user data is lost...

I've reviewed Samba locking options and am not sure if I'm even approaching this problem from the right angle. It appears that the server is configured appropriately, but I'm just not sure. Obviously something isn't right as we have this problem. Any Samba experts here?
 
Old 02-27-2008, 03:49 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
In order for a locking scheme to work the locks must all be set in the same kernel. If both the PC users accessing the spreadsheet through Samba and the SunRay users accessing the spreadsheet are issuing their locks through the same kernel then your locking scheme could work. If the Samba users are making lock requests to their local PC kernel and the SunRay users are making lock requests to their local SunRay kernel then you will still have the problem of unregulated simultaneous spreadsheet updates. In practice all lock requests would have to be issued to the SunRay kernel on the thin-client.

Another problem is that all of the lock requests must use the same name. If Samba users are locking on XXX and the SunRay users are locking on ABC then you will still have the problem of unregulated simultaneous spreadsheet updates. Does the SunRay software and Samba allow you to configure what lock names are used?

Your spreadsheet software is allowing multi-threaded access to the spreadsheet files. If it was designed to allow multi-threading then it was also designed to provide locks in the appropriate places. Check to see if the spreadsheet software has an optional lock feature. If it does then the spreadsheet software is the logical place to handle the lock logic.

-----------------------
Steve Stites
 
Old 02-28-2008, 08:35 AM   #3
Dox Systems - Brian
Member
 
Registered: Nov 2006
Posts: 344

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by jailbait View Post
In order for a locking scheme to work the locks must all be set in the same kernel. If both the PC users accessing the spreadsheet through Samba and the SunRay users accessing the spreadsheet are issuing their locks through the same kernel then your locking scheme could work. If the Samba users are making lock requests to their local PC kernel and the SunRay users are making lock requests to their local SunRay kernel then you will still have the problem of unregulated simultaneous spreadsheet updates. In practice all lock requests would have to be issued to the SunRay kernel on the thin-client.

Another problem is that all of the lock requests must use the same name. If Samba users are locking on XXX and the SunRay users are locking on ABC then you will still have the problem of unregulated simultaneous spreadsheet updates. Does the SunRay software and Samba allow you to configure what lock names are used?

Your spreadsheet software is allowing multi-threaded access to the spreadsheet files. If it was designed to allow multi-threading then it was also designed to provide locks in the appropriate places. Check to see if the spreadsheet software has an optional lock feature. If it does then the spreadsheet software is the logical place to handle the lock logic.
Thanks for the reply.

All locks should be issued through the same kernel as Solaris itself provides the files for the SunRays (think of them as ethernet consoles, not like Windows "thin-clients" (or even the Linux "thin-clients" that I've seen) that really aren't thin at all since they run a full-blown OS) and Samba is running directly on the same Solaris box.

I suppose there could be an issue if Samba does it's locking in a manner different from the native Solaris file locking. However, I don't know enough about Samba locking to even know where to start. Reading documentation on Samba's locking mechanism left me with the distinct impression that it's broken/not implemented yet (but that can't be the case since there's so many people successfully using it).

The spreadsheet software is StarOffice/OpenOffice. I doubt it has any built-in multi-user support. It doesn't even work right if the same user is logged in on more than one terminal (windows will pop up on the wrong screen, etc.). I posted this up on an OpenOffice support forum awhile back just in case someone there ran across the issue, but I think I'm the only one using SO/OO on something other than single-user MS Windows! I will check into locking through it though.

All in all, this is a very interesting problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba on NFS File Locking Cottsay Linux - Software 5 07-28-2015 02:23 AM
Samba + File locking HeReigns Linux - Server 0 06-20-2007 05:00 PM
Samba and file locking Phaethar Linux - General 1 12-23-2006 07:03 PM
LXer: Open Solaris a source of contention LXer Syndicated Linux News 0 04-17-2006 12:21 PM
File locking over Samba rtaft Linux - Software 0 12-30-2003 11:02 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 03:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration