Ignore:
Timestamp:
Sep 24, 2009, 9:15:13 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 to 3.2.14 (final)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/docs/htmldocs/Samba3-HOWTO/locking.html

    r272 r335  
    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.74.0"><link rel="home" href="index.html" title="The Official Samba 3.2.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" lang="en"><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="orgname">Samba Team</span> <span class="surname">Allison</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jra@samba.org">jra@samba.org</a>&gt;</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="orgname">The Samba Team</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">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</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="orgname">Samba Team</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Eric</span> <span class="orgname">HP Oplocks Usage Recommendations Whitepaper</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">&lt;<a class="email" href="mailto:eric.roseme@hp.com">eric.roseme@hp.com</a>&gt;</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#id2615585">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="locking.html#id2615682">Discussion</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id2615940">Opportunistic Locking Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id2616938">Samba Oplocks Control</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id2617033">Example Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id2617446">MS Windows Oplocks and Caching Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id2617633">Workstation Service Entries</a></span></dt><dt><span class="sect2"><a href="locking.html#id2617655">Server Service Entries</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id2617721">Persistent Data Corruption</a></span></dt><dt><span class="sect1"><a href="locking.html#id2617747">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id2617814">locking.tdb Error Messages</a></span></dt><dt><span class="sect2"><a href="locking.html#id2617844">Problems Saving Files in MS Office on Windows XP</a></span></dt><dt><span class="sect2"><a href="locking.html#id2617869">Long Delays Deleting Files over Network with XP SP1</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id2617901">Additional Reading</a></span></dt></dl></div><p>
    2 <a class="indexterm" name="id2615574"></a>
     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.74.0"><link rel="home" href="index.html" title="The Official Samba 3.2.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" lang="en"><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="orgname">Samba Team</span> <span class="surname">Allison</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jra@samba.org">jra@samba.org</a>&gt;</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="orgname">The Samba Team</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">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</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="orgname">Samba Team</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Eric</span> <span class="orgname">HP Oplocks Usage Recommendations Whitepaper</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">&lt;<a class="email" href="mailto:eric.roseme@hp.com">eric.roseme@hp.com</a>&gt;</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#id2615585">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="locking.html#id2615682">Discussion</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id2615940">Opportunistic Locking Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id2616938">Samba Oplocks Control</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id2617033">Example Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id2617446">MS Windows Oplocks and Caching Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id2617633">Workstation Service Entries</a></span></dt><dt><span class="sect2"><a href="locking.html#id2617655">Server Service Entries</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id2617721">Persistent Data Corruption</a></span></dt><dt><span class="sect1"><a href="locking.html#id2617747">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="locking.html#id2617814">locking.tdb Error Messages</a></span></dt><dt><span class="sect2"><a href="locking.html#id2617845">Problems Saving Files in MS Office on Windows XP</a></span></dt><dt><span class="sect2"><a href="locking.html#id2617869">Long Delays Deleting Files over Network with XP SP1</a></span></dt></dl></dd><dt><span class="sect1"><a href="locking.html#id2617901">Additional Reading</a></span></dt></dl></div><p>
     2<a class="indexterm" name="id2615575"></a>
    33One area that causes trouble for many network administrators is locking.
    44The extent of the problem is readily evident from searches over the Internet.
     
    88and that MS Windows NT4/200x servers also provide.
    99</p><p>
    10 <a class="indexterm" name="id2615605"></a>
     10<a class="indexterm" name="id2615606"></a>
    1111The term <span class="emphasis"><em>locking</em></span> has exceptionally broad meaning and covers
    1212a range of functions that are all categorized under this one term.
     
    3434</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2615682"></a>Discussion</h2></div></div></div><p>
    3535<a class="indexterm" name="id2615690"></a>
    36 <a class="indexterm" name="id2615696"></a>
     36<a class="indexterm" name="id2615697"></a>
    3737There are two types of locking that need to be performed by an SMB server.
    3838The first is <span class="emphasis"><em>record locking</em></span> that allows a client to lock
     
    4040that are specified when a file is open.
    4141</p><p>
    42 <a class="indexterm" name="id2615717"></a>
     42<a class="indexterm" name="id2615718"></a>
    4343<a class="indexterm" name="id2615724"></a>
    4444<a class="indexterm" name="id2615731"></a>
     
    8383<a class="indexterm" name="id2615883"></a>
    8484<a class="indexterm" name="id2615890"></a>
    85 <a class="indexterm" name="id2615896"></a>
     85<a class="indexterm" name="id2615897"></a>
    8686<a class="indexterm" name="id2615903"></a>
    8787The second class of locking is the <span class="emphasis"><em>deny modes</em></span>. These
     
    9393</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2615940"></a>Opportunistic Locking Overview</h3></div></div></div><p>
    9494<a class="indexterm" name="id2615948"></a>
    95 <a class="indexterm" name="id2615955"></a>
     95<a class="indexterm" name="id2615956"></a>
    9696<a class="indexterm" name="id2615962"></a>
    9797Opportunistic locking (oplocks) is invoked by the Windows file system
     
    118118other processes.
    119119</p><div class="variablelist"><p class="title"><b>Windows Defines Four Kinds of Oplocks:</b></p><dl><dt><span class="term">Level1 Oplock</span></dt><dd><p>
    120 <a class="indexterm" name="id2616081"></a>
     120<a class="indexterm" name="id2616082"></a>
    121121<a class="indexterm" name="id2616088"></a>
    122 <a class="indexterm" name="id2616094"></a>
    123 <a class="indexterm" name="id2616101"></a>
     122<a class="indexterm" name="id2616095"></a>
     123<a class="indexterm" name="id2616102"></a>
    124124                        The redirector sees that the file was opened with deny
    125125                        none (allowing concurrent access), verifies that no
     
    148148<a class="indexterm" name="id2616177"></a>
    149149<a class="indexterm" name="id2616184"></a>
    150 <a class="indexterm" name="id2616190"></a>
     150<a class="indexterm" name="id2616191"></a>
    151151                                Performs like a Level1 oplock, except caching is only
    152152                operative for reads. All other operations are performed
     
    198198</p><p>
    199199<a class="indexterm" name="id2616346"></a>
    200 <a class="indexterm" name="id2616352"></a>
     200<a class="indexterm" name="id2616353"></a>
    201201Windows oplocks is a lightweight performance-enhancing
    202202feature. It is not a robust and reliable protocol. Every
     
    272272the potential performance improvement is negated and eventually results
    273273in a performance bottleneck.
    274 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2616510"></a>UNIX or NFS Client-Accessed Files</h4></div></div></div><p>
     274</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2616511"></a>UNIX or NFS Client-Accessed Files</h4></div></div></div><p>
    275275<a class="indexterm" name="id2616519"></a>
    276 <a class="indexterm" name="id2616525"></a>
     276<a class="indexterm" name="id2616526"></a>
    277277Local UNIX and NFS clients access files without a mandatory
    278278file-locking mechanism. Thus, these client platforms are incapable of
     
    303303regularly opening the same file.
    304304</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2616594"></a>Multiuser Databases</h4></div></div></div><p>
    305 <a class="indexterm" name="id2616601"></a>
     305<a class="indexterm" name="id2616602"></a>
    306306<a class="indexterm" name="id2616608"></a>
    307 <a class="indexterm" name="id2616615"></a>
     307<a class="indexterm" name="id2616616"></a>
    308308Multiuser databases clearly pose a risk due to their very nature  they are typically heavily
    309309accessed by numerous users at random intervals. Placing a multiuser database on a share with oplocks enabled
     
    481481<code class="filename">smb.conf</code> file as shown in <a class="link" href="locking.html#far1" title="Example 17.1. Share with Some Files Oplocked">&#8220;Share with Some Files Oplocked&#8221;</a>.
    482482</p><p>
    483 </p><div class="example"><a name="far1"></a><p class="title"><b>Example 17.1. Share with Some Files Oplocked</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2617254"></a><em class="parameter"><code>veto oplock files = /filename.htm/*.txt/</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[share_name]</code></em></td></tr><tr><td><a class="indexterm" name="id2617276"></a><em class="parameter"><code>veto oplock files = /*.exe/filename.ext/</code></em></td></tr></table></div></div><p><br class="example-break">
     483</p><div class="example"><a name="far1"></a><p class="title"><b>Example 17.1. Share with Some Files Oplocked</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2617255"></a><em class="parameter"><code>veto oplock files = /filename.htm/*.txt/</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[share_name]</code></em></td></tr><tr><td><a class="indexterm" name="id2617276"></a><em class="parameter"><code>veto oplock files = /*.exe/filename.ext/</code></em></td></tr></table></div></div><p><br class="example-break">
    484484</p><p>
    485485<a class="link" href="smb.conf.5.html#OPLOCKBREAKWAITTIME" target="_top">oplock break wait time</a> is an <code class="filename">smb.conf</code> parameter
     
    684684        </p><p>
    685685        This error indicates a corrupted tdb. Stop all instances of smbd, delete locking.tdb, and restart smbd.
    686         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2617844"></a>Problems Saving Files in MS Office on Windows XP</h3></div></div></div><a class="indexterm" name="id2617851"></a><p>This is a bug in Windows XP. More information can be
     686        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2617845"></a>Problems Saving Files in MS Office on Windows XP</h3></div></div></div><a class="indexterm" name="id2617851"></a><p>This is a bug in Windows XP. More information can be
    687687                found in <a class="ulink" href="http://support.microsoft.com/?id=812937" target="_top">Microsoft Knowledge Base article 812937</a></p>.
    688688
    689         </div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2617869"></a>Long Delays Deleting Files over Network with XP SP1</h3></div></div></div><p>&#8220;<span class="quote">It sometimes takes approximately 35 seconds to delete files over the network after XP SP1 has been applied.</span>&#8221;</p><a class="indexterm" name="id2617881"></a><p>This is a bug in Windows XP. More information can be found in <a class="ulink" href="http://support.microsoft.com/?id=811492" target="_top">
     689        </div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2617869"></a>Long Delays Deleting Files over Network with XP SP1</h3></div></div></div><p>&#8220;<span class="quote">It sometimes takes approximately 35 seconds to delete files over the network after XP SP1 has been applied.</span>&#8221;</p><a class="indexterm" name="id2617882"></a><p>This is a bug in Windows XP. More information can be found in <a class="ulink" href="http://support.microsoft.com/?id=811492" target="_top">
    690690                                Microsoft Knowledge Base article 811492</a></p>.
    691691        </div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2617901"></a>Additional Reading</h2></div></div></div><p>
Note: See TracChangeset for help on using the changeset viewer.