John_DeBella at notes.teradyne.com
2009-Nov-17 22:35 UTC
[Samba] Question about Posix Locking and Windows XP/SP3 clients
Hi, We have SAMBA 3.0.33 running on RedHat 5. We are sharing home directories to users via Samba using the [homes] share. The home directories reside on a Netapp filer, (actually multiple), and are accessed by the Samba server over NFS. When users try to open a Microsoft Excel file from a Windows XP SP3 client, it is always opening as read-only because it thinks the file is locked. ?We have done some research on this as well as have discussed this with RedHat and found that this is a result of "posix locking" which is set to "yes" by default. We have confirmed that turning it off does make the problem go away, however, would like to know if this is safe to do in this configuration/scenario. I've come across some references on this but nothing definitive to whether this would be ok or if this would be asking for trouble. Given that the Samba server access and other potential access to the files on the Netapp would be over NFS would the filer take care of this sanely? Thanks for any information. -John
John_DeBella at notes.teradyne.com
2009-Nov-17 22:50 UTC
[Samba] Question about Posix Locking and Windows XP/SP3 clients
Hi, We have SAMBA 3.0.33 running on RedHat 5. We are sharing home directories to users via Samba using the [homes] share. The home directories reside on a Netapp filer, (actually multiple), and are accessed by the Samba server over NFS. When users try to open a Microsoft Excel file from a Windows XP SP3 client, it is always opening as read-only because it thinks the file is locked. ?We have done some research on this as well as have discussed this with RedHat and found that this is a result of "posix locking" which is set to "yes" by default. We have confirmed that turning it off does make the problem go away, however, would like to know if this is safe to do in this configuration/scenario. I've come across some references on this but nothing definitive to whether this would be ok or if this would be asking for trouble. Given that the Samba server access and other potential access to the files on the Netapp would be over NFS would the filer take care of this sanely? Thanks for any information. -John
John_DeBella at notes.teradyne.com
2009-Nov-18 18:49 UTC
[Samba] Question about Posix Locking and Windows XP/SP3 clients
Hi, We have SAMBA 3.0.33 running on RedHat 5. We are sharing home directories to users via Samba using the [homes] share. The home directories reside on a Netapp filer, (actually multiple), and are accessed by the Samba server over NFS. When users try to open a Microsoft Excel file from a Windows XP SP3 client, it is always opening as read-only because it thinks the file is locked. ?We have done some research on this as well as have discussed this with RedHat and found that this is a result of "posix locking" which is set to "yes" by default. We have confirmed that turning it off does make the problem go away, however, would like to know if this is safe to do in this configuration/scenario. I've come across some references on this but nothing definitive to whether this would be ok or if this would be asking for trouble. Given that the Samba server access and other potential access to the files on the Netapp would be over NFS would the filer take care of this sanely? Thanks for any information. -John
Volker Lendecke
2009-Nov-19 13:06 UTC
[Samba] Question about Posix Locking and Windows XP/SP3 clients
On Thu, Nov 19, 2009 at 07:48:19AM -0500, John_DeBella at notes.teradyne.com wrote:> > Hi Volker, > > Thanks for the response. To clarify, we are not re-exporting via NFS but > via Samba. We've run in this mode for several years, (samba server mounting > home dirs via automounter over NFS and sharing via Samba), without issues. > However, we had been running with much earlier releases of Samba on > Solaris, 2.2.7a. We just started seeing this behavior since upgrading to a > later version on RedHat about 2 weeks ago. Interestingly, when comparing > the options between the older version of Samba to the current we see that > "posix locking" is enabled on the older version. Was it not working in > older releases? > > We're doing this mainly because we have multiple filers and having one > "server" for the users to access their home directories from is ideal.You might try the latest Samba under Solaris. You did not only change Samba, you also changed the NFS client. This is in my experience the weakest component. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20091119/a8c71d0b/attachment.pgp>
Ray Van Dolson
2009-Nov-19 16:46 UTC
[Samba] Question about Posix Locking and Windows XP/SP3 clients
On Thu, Nov 19, 2009 at 08:37:56AM -0800, John_DeBella at notes.teradyne.com wrote:> Hi Ray, > > Thanks for the reply. > > I'm trying to understand what the risk is of turning off the posix > locking for the [home] shares? I don't fully understand the issue and > further more, why this is now raising its "ugly" head after migrating > from Samba 2.2.7a on Solaris to 3.0.33 on Redhat. > > Thanks, > -JohnI honestly have never tried to really wrap my head around it. My understanding is that your CIFS client is requesting a file lock which is in turn mapped into a POSIX lock request and this is presumably passed on to the NLM (NFS lock manager) on your remote NFS server. In our case, many times those NLM's were buggy or would get hung up which causes everything to come to a grinding halt. Disabling posix locking for these particular NFS servers resolved the issue. In your case, NetApp has a pretty solid NFS implementation so I'm a bit surprised. Are you fully patched (on the NetApp side)? Are their any locking related knobs that can be turned in the NetApp configuration you could take a look at? This could potentially be an issue with your NFS client as well I suppose, though, in my experience I typically do not need to disable posix locking for most NFS servers.. I've run our same configuration on a RHEL5 machine w/ Samba 3.0.33 as well.. all I can tell you is we experinenced issues with certain hosts on both the RHEL and Solaris platforms. I'm not sure how or why the behavior would change from an older version of Samba to the 3.0.x series other than to suggest perhaps Samba 2.2.7a wasn't actually properly acquiring the POSIX locks like it said it was. :) If you really want to track this down, you'll likely need to reproduce the problem and do a packet capture on some of the traffic and see if you can pull out the NLM requests. You could probably post that data here, or open a bug report on RHEL's bugzilla instance. I've had good results in the past working with their developers there. Perhaps someone else can comment. And, of course, re-exporting NFS via CIFS is a hacky and ugly thing to do. Don't do it! (unless you have to :) Ray
Ray Van Dolson
2009-Nov-19 17:53 UTC
[Samba] Question about Posix Locking and Windows XP/SP3 clients
On Thu, Nov 19, 2009 at 09:50:16AM -0800, John_DeBella at notes.teradyne.com wrote:> Thanks again for the reply Ray. > > We are running a current version on the Netapp side and from what I can > tell, there is no tweaking we can do there. I'm looking into this with > RedHat and thus far they have not implicated the NFS client, but rather > how XP/SP3 is handling the locks, (of course they would - right?).. > > We can readily reproduce this so your suggestion of doing a pkt capture > is do-able. > > If you don't mind answering one more question: Have you experienced any > issues with data integrity after disabling posix locking in your site? I > think I understand that you have a similar config and have disabled > this. > > Thanks, > -JohnWe've only disabled it on a per-share basis (we have several hundred NFS servers we connect to, and only have had this issue on a few of them). To my knowledge we haven't had any integrity issues. That said, our workload is likely different than yours.. we have probably only a small number of developers hitting those shares, so I can't predict how the results would change if they were more heavily used. Ray