Changeset 745 for trunk/server/docs/htmldocs/Samba3-HOWTO/locking.html
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/docs/htmldocs/Samba3-HOWTO/locking.html
r599 r745 1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 17. File and Record Locking</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The Official Samba 3.5.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="AccessControls.html" title="Chapter 16. File, Directory, and Share Access Controls"><link rel="next" href="securing-samba.html" title="Chapter 18. Securing Samba"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 17. File and Record Locking</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="AccessControls.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="securing-samba.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 17. File and Record Locking"><div class="titlepage"><div><div><h2 class="title"><a name="locking"></a>Chapter 17. File and Record Locking</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jeremy</span> <span class="surname">Allison</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jra@samba.org">jra@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Eric</span> <span class="surname">Roseme</span></h3><div class="affiliation"><span class="orgname">HP Oplocks Usage Recommendations Whitepaper<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:eric.roseme@hp.com">eric.roseme@hp.com</a>></code></p></div></div></div></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="locking.html#id38308 7">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="locking.html#id383174">Discussion</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id383412">Opportunistic Locking Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id384264">Samba Oplocks Control</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id384333">Example Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id384716">MS Windows Oplocks and Caching Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id384868">Workstation Service Entries</a></span></dt><dt><span class="sect2"><a href="locking.html#id384887">Server Service Entries</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id384944">Persistent Data Corruption</a></span></dt><dt><span class="sect1"><a href="locking.html#id384963">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id385014">locking.tdb Error Messages</a></span></dt><dt><span class="sect2"><a href="locking.html#id385042">Problems Saving Files in MS Office on Windows XP</a></span></dt><dt><span class="sect2"><a href="locking.html#id385065">Long Delays Deleting Files over Network with XP SP1</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id385094">Additional Reading</a></span></dt></dl></div><p>1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 17. File and Record Locking</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The Official Samba 3.5.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="AccessControls.html" title="Chapter 16. File, Directory, and Share Access Controls"><link rel="next" href="securing-samba.html" title="Chapter 18. Securing Samba"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 17. File and Record Locking</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="AccessControls.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="securing-samba.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 17. File and Record Locking"><div class="titlepage"><div><div><h2 class="title"><a name="locking"></a>Chapter 17. File and Record Locking</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jeremy</span> <span class="surname">Allison</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jra@samba.org">jra@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Eric</span> <span class="surname">Roseme</span></h3><div class="affiliation"><span class="orgname">HP Oplocks Usage Recommendations Whitepaper<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:eric.roseme@hp.com">eric.roseme@hp.com</a>></code></p></div></div></div></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="locking.html#id383088">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="locking.html#id383174">Discussion</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id383412">Opportunistic Locking Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id384264">Samba Oplocks Control</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id384333">Example Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id384716">MS Windows Oplocks and Caching Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id384868">Workstation Service Entries</a></span></dt><dt><span class="sect2"><a href="locking.html#id384888">Server Service Entries</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id384944">Persistent Data Corruption</a></span></dt><dt><span class="sect1"><a href="locking.html#id384963">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id385014">locking.tdb Error Messages</a></span></dt><dt><span class="sect2"><a href="locking.html#id385042">Problems Saving Files in MS Office on Windows XP</a></span></dt><dt><span class="sect2"><a href="locking.html#id385065">Long Delays Deleting Files over Network with XP SP1</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id385094">Additional Reading</a></span></dt></dl></div><p> 2 2 <a class="indexterm" name="id383078"></a> 3 3 One area that causes trouble for many network administrators is locking. 4 4 The extent of the problem is readily evident from searches over the Internet. 5 </p><div class="sect1" title="Features and Benefits"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id38308 7"></a>Features and Benefits</h2></div></div></div><p>5 </p><div class="sect1" title="Features and Benefits"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id383088"></a>Features and Benefits</h2></div></div></div><p> 6 6 <a class="indexterm" name="id383095"></a> 7 7 Samba provides all the same locking semantics that MS Windows clients expect … … 43 43 <a class="indexterm" name="id383214"></a> 44 44 <a class="indexterm" name="id383221"></a> 45 <a class="indexterm" name="id38322 7"></a>45 <a class="indexterm" name="id383228"></a> 46 46 <a class="indexterm" name="id383234"></a> 47 47 Record locking semantics under UNIX are very different from record locking under … … 62 62 </p><p> 63 63 <a class="indexterm" name="id383269"></a> 64 <a class="indexterm" name="id38327 5"></a>64 <a class="indexterm" name="id383276"></a> 65 65 Strictly speaking, an SMB server should check for locks before every read and write call on 66 66 a file. Unfortunately, with the way fcntl() works, this can be slow and may overstress … … 93 93 </p><div class="sect2" title="Opportunistic Locking Overview"><div class="titlepage"><div><div><h3 class="title"><a name="id383412"></a>Opportunistic Locking Overview</h3></div></div></div><p> 94 94 <a class="indexterm" name="id383420"></a> 95 <a class="indexterm" name="id38342 6"></a>95 <a class="indexterm" name="id383427"></a> 96 96 <a class="indexterm" name="id383433"></a> 97 97 Opportunistic locking (oplocks) is invoked by the Windows file system … … 121 121 <a class="indexterm" name="id383550"></a> 122 122 <a class="indexterm" name="id383557"></a> 123 <a class="indexterm" name="id38356 3"></a>123 <a class="indexterm" name="id383564"></a> 124 124 The redirector sees that the file was opened with deny 125 125 none (allowing concurrent access), verifies that no … … 148 148 <a class="indexterm" name="id383619"></a> 149 149 <a class="indexterm" name="id383626"></a> 150 <a class="indexterm" name="id38363 2"></a>150 <a class="indexterm" name="id383633"></a> 151 151 Performs like a Level1 oplock, except caching is only 152 152 operative for reads. All other operations are performed … … 167 167 preparation for the subsequent open by the second process. 168 168 </p><p> 169 <a class="indexterm" name="id38369 4"></a>169 <a class="indexterm" name="id383695"></a> 170 170 <a class="indexterm" name="id383701"></a> 171 171 <a class="indexterm" name="id383708"></a> … … 223 223 continuous data availability. 224 224 </p><p> 225 <a class="indexterm" name="id38380 7"></a>225 <a class="indexterm" name="id383808"></a> 226 226 <a class="indexterm" name="id383814"></a> 227 227 Windows client failover behavior is more at risk of application … … 260 260 Home directories are the most obvious examples of where the performance 261 261 benefit of oplocks can be safely realized. 262 </p></div><div class="sect3" title="Multiple-Accessed Shares or Files"><div class="titlepage"><div><div><h4 class="title"><a name="id38388 4"></a>Multiple-Accessed Shares or Files</h4></div></div></div><p>262 </p></div><div class="sect3" title="Multiple-Accessed Shares or Files"><div class="titlepage"><div><div><h4 class="title"><a name="id383885"></a>Multiple-Accessed Shares or Files</h4></div></div></div><p> 263 263 As each additional user accesses a file in a share with oplocks 264 264 enabled, the potential for delays and resulting perceived poor … … 311 311 developed in-house or a commercially available product, ensure that the share has oplocks disabled. 312 312 </p></div><div class="sect3" title="PDM Data Shares"><div class="titlepage"><div><div><h4 class="title"><a name="id384012"></a>PDM Data Shares</h4></div></div></div><p> 313 <a class="indexterm" name="id3840 19"></a>314 <a class="indexterm" name="id38402 5"></a>313 <a class="indexterm" name="id384020"></a> 314 <a class="indexterm" name="id384026"></a> 315 315 <a class="indexterm" name="id384032"></a> 316 316 <a class="indexterm" name="id384039"></a> … … 323 323 application and PDM server to negotiate and maintain. It is appropriate to eliminate the client OS from any 324 324 caching tasks, and the server from any oplocks management, by disabling oplocks on the share. 325 </p></div><div class="sect3" title="Beware of Force User"><div class="titlepage"><div><div><h4 class="title"><a name="id38406 7"></a>Beware of Force User</h4></div></div></div><p>325 </p></div><div class="sect3" title="Beware of Force User"><div class="titlepage"><div><div><h4 class="title"><a name="id384068"></a>Beware of Force User</h4></div></div></div><p> 326 326 <a class="indexterm" name="id384075"></a> 327 327 Samba includes an <code class="filename">smb.conf</code> parameter called <a class="link" href="smb.conf.5.html#FORCEUSER" target="_top">force user</a> that changes the user … … 340 340 Oplocks enabled. 341 341 </p></li></ul></div></div><div class="sect3" title="Advanced Samba Oplocks Parameters"><div class="titlepage"><div><div><h4 class="title"><a name="id384149"></a>Advanced Samba Oplocks Parameters</h4></div></div></div><p> 342 <a class="indexterm" name="id38415 6"></a>342 <a class="indexterm" name="id384157"></a> 343 343 <a class="indexterm" name="id384163"></a> 344 344 <a class="indexterm" name="id384170"></a> … … 600 600 This indicates whether the redirector should use oplocks performance 601 601 enhancement. This parameter should be disabled only to isolate problems. 602 </p></div><div class="sect2" title="Server Service Entries"><div class="titlepage"><div><div><h3 class="title"><a name="id38488 7"></a>Server Service Entries</h3></div></div></div><pre class="programlisting">602 </p></div><div class="sect2" title="Server Service Entries"><div class="titlepage"><div><div><h3 class="title"><a name="id384888"></a>Server Service Entries</h3></div></div></div><pre class="programlisting"> 603 603 \HKEY_LOCAL_MACHINE\System\ 604 604 CurrentControlSet\Services\LanmanServer\Parameters … … 701 701 KB Article 224992</a>. 702 702 </p><p> 703 <a class="indexterm" name="id38515 0"></a>703 <a class="indexterm" name="id385151"></a> 704 704 Microsoft Knowledge Base, <span class="quote">“<span class="quote">Configuring Opportunistic Locking in Windows 2000</span>”</span>, 705 705 Microsoft Corporation, April 2001 <a class="ulink" href="http://support.microsoft.com/?id=296264" target="_top">Microsoft KB Article 296264</a>.
Note:
See TracChangeset
for help on using the changeset viewer.