diff options
Diffstat (limited to 'docs/htmldocs/Samba3-HOWTO/locking.html')
-rw-r--r-- | docs/htmldocs/Samba3-HOWTO/locking.html | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/docs/htmldocs/Samba3-HOWTO/locking.html b/docs/htmldocs/Samba3-HOWTO/locking.html index 24d17fe9f6..1a717b5cad 100644 --- a/docs/htmldocs/Samba3-HOWTO/locking.html +++ b/docs/htmldocs/Samba3-HOWTO/locking.html @@ -1,5 +1,5 @@ -<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.4.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"><<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="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"><<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="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"><<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="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"><<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#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> -<a class="indexterm" name="id2615574"></a> +<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.4.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"><<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="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"><<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="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"><<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="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"><<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#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> +<a class="indexterm" name="id2615575"></a> One area that causes trouble for many network administrators is locking. The extent of the problem is readily evident from searches over the Internet. </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2615585"></a>Features and Benefits</h2></div></div></div><p> @@ -7,7 +7,7 @@ The extent of the problem is readily evident from searches over the Internet. Samba provides all the same locking semantics that MS Windows clients expect and that MS Windows NT4/200x servers also provide. </p><p> -<a class="indexterm" name="id2615605"></a> +<a class="indexterm" name="id2615606"></a> The term <span class="emphasis"><em>locking</em></span> has exceptionally broad meaning and covers a range of functions that are all categorized under this one term. </p><p> @@ -33,13 +33,13 @@ Sometimes it is necessary to disable locking control settings on the Samba server as well as on each MS Windows client! </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> <a class="indexterm" name="id2615690"></a> -<a class="indexterm" name="id2615696"></a> +<a class="indexterm" name="id2615697"></a> There are two types of locking that need to be performed by an SMB server. The first is <span class="emphasis"><em>record locking</em></span> that allows a client to lock a range of bytes in an open file. The second is the <span class="emphasis"><em>deny modes</em></span> that are specified when a file is open. </p><p> -<a class="indexterm" name="id2615717"></a> +<a class="indexterm" name="id2615718"></a> <a class="indexterm" name="id2615724"></a> <a class="indexterm" name="id2615731"></a> <a class="indexterm" name="id2615738"></a> @@ -82,7 +82,7 @@ tell clients that everything is okay. <a class="indexterm" name="id2615876"></a> <a class="indexterm" name="id2615883"></a> <a class="indexterm" name="id2615890"></a> -<a class="indexterm" name="id2615896"></a> +<a class="indexterm" name="id2615897"></a> <a class="indexterm" name="id2615903"></a> The second class of locking is the <span class="emphasis"><em>deny modes</em></span>. These are set by an application when it opens a file to determine what types of @@ -92,7 +92,7 @@ access should be allowed simultaneously with its open. A client may ask for modes called <code class="constant">DENY_FCB</code> and <code class="constant">DENY_DOS</code>. </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> <a class="indexterm" name="id2615948"></a> -<a class="indexterm" name="id2615955"></a> +<a class="indexterm" name="id2615956"></a> <a class="indexterm" name="id2615962"></a> Opportunistic locking (oplocks) is invoked by the Windows file system (as opposed to an API) via registry entries (on the server and the client) @@ -117,10 +117,10 @@ exclusive access to the file even if it is opened with deny-none because Windows monitors the file's status for concurrent access from other processes. </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> -<a class="indexterm" name="id2616081"></a> +<a class="indexterm" name="id2616082"></a> <a class="indexterm" name="id2616088"></a> -<a class="indexterm" name="id2616094"></a> -<a class="indexterm" name="id2616101"></a> +<a class="indexterm" name="id2616095"></a> +<a class="indexterm" name="id2616102"></a> The redirector sees that the file was opened with deny none (allowing concurrent access), verifies that no other process is accessing the file, checks that @@ -147,7 +147,7 @@ other processes. </p></dd><dt><span class="term">Level2 Oplock</span></dt><dd><p> <a class="indexterm" name="id2616177"></a> <a class="indexterm" name="id2616184"></a> -<a class="indexterm" name="id2616190"></a> +<a class="indexterm" name="id2616191"></a> Performs like a Level1 oplock, except caching is only operative for reads. All other operations are performed on the server disk copy of the file. @@ -197,7 +197,7 @@ The following recommendations will help to characterize the environment where oplocks may be effectively configured. </p><p> <a class="indexterm" name="id2616346"></a> -<a class="indexterm" name="id2616352"></a> +<a class="indexterm" name="id2616353"></a> Windows oplocks is a lightweight performance-enhancing feature. It is not a robust and reliable protocol. Every implementation of oplocks should be evaluated as a @@ -271,9 +271,9 @@ of the caching user. As each additional client attempts to access a file with oplocks set, the potential performance improvement is negated and eventually results in a performance bottleneck. -</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> +</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> <a class="indexterm" name="id2616519"></a> -<a class="indexterm" name="id2616525"></a> +<a class="indexterm" name="id2616526"></a> Local UNIX and NFS clients access files without a mandatory file-locking mechanism. Thus, these client platforms are incapable of initiating an oplock break request from the server to a Windows client @@ -302,9 +302,9 @@ If the network is slow, unreliable, or a WAN, then do not configure oplocks if there is any chance of multiple users regularly opening the same file. </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> -<a class="indexterm" name="id2616601"></a> +<a class="indexterm" name="id2616602"></a> <a class="indexterm" name="id2616608"></a> -<a class="indexterm" name="id2616615"></a> +<a class="indexterm" name="id2616616"></a> Multiuser databases clearly pose a risk due to their very nature they are typically heavily accessed by numerous users at random intervals. Placing a multiuser database on a share with oplocks enabled will likely result in a locking management bottleneck on the Samba server. Whether the database application is @@ -480,7 +480,7 @@ caching without the risk of data corruption. Veto oplocks can be enabled on a per-share basis, or globally for the entire server, in the <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">“Share with Some Files Oplocked”</a>. </p><p> -</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"> +</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"> </p><p> <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 that adjusts the time interval for Samba to reply to an oplock break request. Samba recommends: @@ -683,10 +683,10 @@ tdb(/usr/local/samba_2.2.7/var/locks/locking.tdb): rec_read bad magic </span>” </p><p> This error indicates a corrupted tdb. Stop all instances of smbd, delete locking.tdb, and restart smbd. - </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 + </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 found in <a class="ulink" href="http://support.microsoft.com/?id=812937" target="_top">Microsoft Knowledge Base article 812937</a></p>. - </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>“<span class="quote">It sometimes takes approximately 35 seconds to delete files over the network after XP SP1 has been applied.</span>”</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"> + </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>“<span class="quote">It sometimes takes approximately 35 seconds to delete files over the network after XP SP1 has been applied.</span>”</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"> Microsoft Knowledge Base article 811492</a></p>. </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> You may want to check for an updated documentation regarding file and record locking issues on the Microsoft |