For some reason, the setup process for the NFS server on Window Server 2003 R2 is very different than it is on XP. Note that what I’m about to describe is for sharing a directory hosted on my Windows box to another machine on my switch. No integration with active directory or anything like that.
First of all, make sure you have all the components installed. This can be done from the Add/Remove Windows Components option from within the Add or Remove Programs item in the control panel.
Other Other Network File and Print Services (click Details), there’s another sub-window for Microsoft Services for NFS.
In the components list for Microsoft Services for NFS, I made the original mistake of checking only the things that I thought were required. In the end, I ended up installing everything, so it’s really much easier to just install everything from the get go.
Once that’s all done there should be a Microsoft Services for Network File System entry in your Administrative Tools list. Clicking on this brings you to a somewhat familiar looking (if you’ve done this on XP) window with a list of NFS related items on the left. The major difference from the XP version is that when you click on each item in the left, the larger right window pane only shows a help message. The way you get to the actual setting values is by right-clicking the items in the list on the left. Took me a while to figure this out, and I still don’t understand why it was done this way.
Anyhow, here’s the checklist:

  1. Make sure your username mapping service is running and configured correctly. You can start and stop it through the right click menu on list entry on the left of the configuration window.
  2. Make sure you set your nfs server to use the local username mapping server. You can do this by issuing the following command in a shell:
    c:\> nfsadmin mapping \\<yourhostname> config mapsvr=localhost
    
  3. Make sure you server for NFS is running, and set up exports. You can do the former through the standard Services mechanism, and sharing is set up almost like normal windows file sharing. Start by right-clicking on the folder you want to share. You can also use the nfsshare command line utility if you prefer.

That’s it for the Windows side. The one last thing I’ll mention is something I found out the hard way. Linux nfs clients have bad defaults (performance wise) for nfs mounts. Most importantly, the values of rsize and wsize default to 1024, which mean a request is made for each 1K that needs to be read or written. Obviously, this doesn’t even fit all small files, so even for sharing source code this sucks.
Because I’m on my own switch, I bumped this up to rsize=16384,wsize=16384 and the performance improvement is like night and day. YMMV, but 1K is most likely too small for most situations (it even says so in the Ubuntu man pages). They probably didn’t bump up the defaults for some archaic compatibility reason.

1 Comment

  1. David

    Reply

    My install fails to install the Server for NFS, and points me to the log file: %SYTEMROOT%/nfsocm.log and when I browse through that log file I see the following error: Failed to update the NFS server performance counters
    Any ideas??

Leave a Reply to David Cancel reply

Your email address will not be published. Required fields are marked *