No description
Find a file
Casey Bodley 8e310c5711 recovery: handle delegation.recalled on reclaim
while the server is required to grant us delegations we reclaim through CLAIM_PREVIOUS, it may set the flag recalled=TRUE if it's not ready to grant the delegation.  the client is then responsible for flushing modified state to the server and returning the delegation

new function nfs41_client_delegation_recovery() cleans up after delegation recovery by a) returning any delegations flagged as recalled, and b) 'forgetting' any delegations that we failed to reclaim.  this function is called under the client's state recovery lock, directly after open and delegation state is recovered

added 'try_recovery' argument to delegation_return(), allowing it to be called during client state recovery.  split out the code that removes the delegation from the client and its opens into delegation_remove(), which is what nfs41_client_delegation_recovery() uses to 'forget' a delegation

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-08-05 14:32:20 -04:00
build.vc10 cosmetic: recovery.c for client state recovery 2011-08-05 14:32:17 -04:00
daemon recovery: handle delegation.recalled on reclaim 2011-08-05 14:32:20 -04:00
dll [dll] fixing drive enumeration 2011-06-01 12:36:46 -04:00
install install: disabled warning 4711 2010-10-19 11:17:13 -04:00
libtirpc [libtirpc] fixing infinite loop in autherr 2011-06-14 12:00:05 -04:00
mount [mount] adding security option to PrintUsage 2011-04-29 14:48:03 -04:00
sys [driver] removing mrxsetinfoatcleanup 2011-07-18 15:24:19 -04:00
tests test: asio.exe for async reads and writes 2011-04-12 14:49:32 -04:00
dirs removing daemon and libtirpc from ddk build 2010-12-10 11:26:05 -05:00
install.bat fresh git tree for public release 2010-10-12 10:15:48 -04:00
ms-nfs41-idmap.conf idmap.c for ldap caching and configuration 2010-11-08 12:54:40 -05:00
nfs41rdr.inf fresh git tree for public release 2010-10-12 10:15:48 -04:00
README.html readme: updated known issues 2011-07-01 11:52:44 -04:00
uninstall.bat fresh git tree for public release 2010-10-12 10:15:48 -04:00

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Windows NFS 4.1 Client Instructions</title>
    <link rel="stylesheet" title="CITI Default" href="http://www.citi.umich.edu/format/citi.css" type="text/css"/>
    <link rel="icon" href="http://www.citi.umich.edu/images/citilogo-16x16.png" type="image/png"/>
    <link rel="shortcut icon" href="http://www.citi.umich.edu/images/citilogo-16x16.png" type="image/png"/>
    <style type="text/css">
    /*<![CDATA[*/
    body { min-width: 600px; background-color: #DDDDFF; font-family: serif; }
    #page { padding: 0 12px 0 12px; }
    #content { margin: 12px 0 12px 0; padding: 8px; background-color: #FFFFFF; border: 1px solid #88A; }
    #index { padding-right: 12px; float: right; background-color: #FFFFFF; border: 1px solid #88A; }
    a { color: #0282b4; }
    a:hover { color: #0244b4; }
    h1 { font-size: 2em; text-align: center; background: none; }
    h2 { margin: 24px 0 8px 0; font-variant: small-caps; border-bottom: 1px dashed #88A; }
    h3 { margin-left: 8px; }
    /*]]>*/
    </style>
</head>
<body>
<div id="page">
<h1>Windows NFS 4.1 Client Instructions</h1>
<div id="content">
<div id="index">
<ol>
    <li><a href="#build">Building</a></li>
    <li><a href="#install">Installation</a></li>
    <li><a href="#ldap">Ldap Configuration</a></li>
    <li><a href="#startup">Starting the Client</a></li>
    <li><a href="#mount">Mounting</a></li>
    <li><a href="#cthon">Connectation</a></li>
    <li><a href="#issues">Known Issues</a></li>
</ol>
</div>
<h2>1. <a name="build">Building</a></h2>
<h3>Requirements</h3>
<ul>
    <li>Windows Vista x64, Windows Server 2008 R2 x64, or Windows 7 x64. (Windows XP and previous versions are not supported. 32-bit builds have not been tested.)</li>
    <li>Microsoft Visual Studio 2010</li>
    <li>Windows Driver Development Kit (WinDDK 6000 or later)</li>
    <li>ms-nfs41-client source code:
    <br/><code>&gt; git clone git://citi.umich.edu/projects/ms-nfs41-client.git</code></li>
</ul>
<h3>Building the rpc library and nfs client daemon</h3>
<ul><li>WinDDK does not include the ldap library, so we build the rpc library and nfs client daemon with Visual Studio 2010.</li></ul>
<ol>
    <li>Open Windows Explorer and navigate to <strong>ms-nfs41-client\build.vc10</strong>.</li>
    <li>Make a copy of <strong>env.props.example</strong>, and rename it to <strong>env.props</strong>.
    <li>Open <strong>env.props</strong> in a text editor, and verify that the value in <code>&lt;WDKPATH&gt;C:\WinDDK\7600.16385.0&lt;/WDKPATH&gt;</code> points to your WinDDK installation.</li>
    <li>Open the solution file <strong>ms-nfs41-client.sln</strong> in Visual Studio 2010.</li>
    <li>Select the Debug configuration and x64 platform (accessible via Build->Configuration Manager).</li>
    <li>Right-click on the <strong>daemon</strong> project and select Build. The project and its dependencies should build without errors. The resulting binaries, <strong>nfsd.exe</strong> and <strong>libtirpc.dll</strong>, can be found under <strong>ms-nfs41-client\build.vc10\x64\Debug\</strong>.</li>
</ol>
<h3>Building the driver and utilities</h3>
<ol>
    <li>From the Start menu, open the WinDDK 'x64 Checked Build Environment' for the target platform.</li>
    <li>Change directory to <strong>ms-nfs41-client</strong> and type <code>build</code>. All projects should build without errors.</li>
</ol>
<h2>2. <a name="install">Installation</a></h2>
<h3>Requirements</h3>
<ul>
    <li>ms-nfs41-client binaries: <strong>nfs41_driver.sys</strong>, <strong>nfs41_np.dll</strong>, <strong>libtirpc.dll</strong>, <strong>nfs_install.exe</strong>, <strong>nfsd.exe</strong>, <strong>nfs_mount.exe</strong></li>
    <li>ms-nfs41-client configuration files: <strong>nfs41rdr.inf</strong>, <strong>install.bat</strong>, <strong>uninstall.bat</strong>, <strong>etc_netconfig</strong>, <strong>ms-nfs41-idmap.conf</strong></li>
</ul>
<h3>Instructions</h3>
<ol>
    <li>Copy or extract all ms-nfs41-client binaries and configuration files into a directory that's convenient for testing.</li>
    <li>Open a WinDDK 'x64 Checked Build Environment' as Administrator in this directory (right click and 'Run as administrator').</li>
    <li>Create a certificate for test-signing the driver (<a href="http://msdn.microsoft.com/en-us/library/ff540213%28VS.85%29.aspx" title="msdn.microsoft.com">Creating Test Certificates</a>):
    <br/><code>&gt; makecert /pe /ss PrivateCertStore /n CN=nfs41_test nfs41_test.cer</code></li>
    <li>Use the certificate to sign <strong>nfs41_driver.sys</strong> (<a href="http://msdn.microsoft.com/en-us/library/ff553467%28VS.85%29.aspx" title="msdn.microsoft.com">Test-Signing a Driver File</a>):
    <br/><code>&gt; signtool sign /v /s PrivateCertStore /n nfs41_test /t http://timestamp.verisign.com/scripts/timestamp.dll nfs41_driver.sys</code></li>
    <li>Install the certificate to the 'Trusted Root Certificate Authorities' store:
    <br/><code>&gt; certmgr /add /c nfs41_test.cer /s /r localMachine root</code></li>
    <li>Install the driver and update the registry:
    <br/><code>&gt; install.bat</code></li>
    <li>Copy configuration files:
    <br/><code>&gt; mkdir C:\etc</code>
    <br/><code>&gt; copy etc_netconfig C:\etc\netconfig</code>
    <br/><code>&gt; copy ms-nfs41-idmap.conf C:\etc\</code></li>
    <li>Allow windows to load test-signed drivers:
    <br/><code>&gt; bcdedit /set testsigning on</code></li>
    <li>Reboot.</li>
</ol>
<h2>3. <a name="ldap">Ldap Configuration</a></h2>
<h3>Requirements:</h3>
<ul>
    <li><strong>C:\etc\ms-nfs41-idmap.conf</strong> from <a href="#install">Installation</a> step 7.</li>
</ul>
<h3>Instructions</h3>
<ol>
    <li>Open <strong>C:\etc\ms-nfs41-idmap.conf</strong> in a text editor.</li>
    <li>Uncomment the <code>ldap_hostname</code> and <code>ldap_base</code> lines, and configure as appropriate to match your ldap server configuration (we'll add suggestions later).</li>
</ol>
<h2>4. <a name="startup">Starting the Client</a></h2>
<h3>Instructions</h3>
<ol>
    <li>From a Windows command prompt, run <strong>nfsd.exe</strong> to start the nfs client daemon. Leave this running in the background until all mapped drives are unmounted.
    <br/>Usage:
    <br/><code>&gt; nfsd.exe -d &lt;debug level&gt; [--noldap]</code></li>
    <ul>
        <li><code>&lt;debug level&gt;</code> determines the log verbosity (1, 2, 3 or 0 to disable)</li>
        <li><code>--noldap</code> disables id mapping and uses a default uid=666 and gid=777</li>
    </ul>
</ol>
<h2>5. <a name="mount">Mounting</a></h2>
<h3>Instructions</h3>
<ol>
    <li>From a Windows command prompt run <strong>nfs_mount.exe</strong> to mount a share:
    <br/><code>&gt; nfs_mount.exe Z: &lt;server_name&gt;:\</code></li>
    <li>To specify the security flavor, add the 'sec=' mount option with sys, krb5, krb5i, or krb5p:
    <br/><code>&gt; nfs_mount.exe -o sec=&lt;flavor&gt; Z: &lt;server_name&gt;:\</code></li>
    <li>You can later unmount with:
    <br/><code>&gt; nfs_mount.exe -d Z</code></li>
</ol>
<h2>6. <a name="cthon">Connectathon</a></h2>
<h3>Requirements</h3>
<ul>
    <li><a href="http://www.cygwin.com" title="www.cygwin.com">Cygwin</a>, including packages gcc-core, make, time, tirpc, git</li>
    <li><a href="http://www.connectathon.org/nfstests.html" title="www.connectathon.org">Connectathon Test Suite</a></li>
    <li>ms-nfs41-client source code (patches for connectathon are located in <strong>ms-nfs41-client\tests</strong>)</li>
</ul>
<h3>Instructions</h3>
<ol>
    <li>Extract <strong>nfstests.zip</strong> into a directory that's convenient for testing (i.e. <strong>cthon04</strong>).</li>
    <li>Open a Cygwin shell, and change directory to <strong>cthon04</strong>.</li>
    <li>Create a git repository to track changes:
    <br/><code>&gt; git init</code>
    <br/><code>&gt; git add *</code>
    <br/><code>&gt; git commit -m "files from nfstests.zip"</code></li>
    <li>Apply all cthon patches:
    <br/><code>&gt; git am /path/to/ms-nfs41-client/tests/*.patch</code></li>
    <li>Build the tests:
    <br/><code>&gt; make</code></li>
    <li>Run the test suite on a mounted directory:
    <br/><code>&gt; ./runtests -a -t z:/testdir</code></li>
</ol>
<h2>7. <a name="issues">Known Issues</a></h2>
<ul>
    <li>AUTH_SYS does not handle multiple users, so all operations are sent as the user that established the mount.</li>
    <li>krb5p security has only been tested with DES, as the linux server does not support gss krb5 v2 tokens with rotated data.</li>
    <li>When recovering opens and locks outside of the server's grace period, client does not check whether the file has been modified by another client.</li>
    <li>If nfsd.exe is restarted while a drive is mapped, that drive needs to be remounted before further use.</li>
    <li>Symbolic links are not supported in Cygwin. Connectathon's basic test8 and special test nfsidem have been commented out.</li>
    <li>Does not allow renaming a file on top of an existing open file. Connectathon's special test op_ren has been commented out.</li>
    <li>The Windows DFS client interferes with some requests, indicated by long delays during operation. To disable the DFS client, use regedit.exe to navigate to HKLM\System\CurrentControlSet\Services\Mup, and add a REG_DWORD entry named 'DisableDfs' with a value of 1. See <a href="http://support.microsoft.com/kb/171386">http://support.microsoft.com/kb/171386</a> for more information.</li>
</ul>
<p>Please direct any questions to <a href="mailto:msv4-devel@citi.umich.edu">msv4-devel@citi.umich.edu</a>.</p>
</div>
</div>
</body>
</html>