Accessing NFS from Windows

TIG doesn't currently have good documentation for accessing NFS from Windows, because (1) it's not possible for all use-cases, (2) it's not possible for all editions of all Windows versions, and (3) in cases where it is possible, it's much more clumsy than on Linux. But we can point you at what we know, and depending on your particular Windows version, who uses your Windows machine, and/or what kind of access you need, you may be able to work something out.

Help out your fellow CSAILors! If you've successfully mounted a CSAIL NFS filesystem on a Windows machine, we'd love to know what worked for you! You can just edit this document yourself (it's under version control, so if you mess something up let us know and we can fix it).

There are a few important things we depend on for NFS access from CSAIL Linux machines that are not available on Windows:

  • Linux (specifically Ubuntu) provides a piece of software called an a automounter, which can keep track of which NFS filesystems are served from which NFS fileservers (we have several), mount them when needed under pathnames that are easy to remember, and unmounts them automatically after they've been unused for a while (which makes NFS connections more robust)
  • CSAIL Ubuntu machines are centrally managed, so TIG can configure the automounter to know which CSAIL NFS filesystems are on which servers, and what paths to use for them.
  • CSAIL Ubuntu machines share login names and numerical identifiers (UIDs) for CSAIL users with our NFS servers, so the machines mounting the filesystems and the servers providing them can agree about which user is performing an action like writing or reading a file. Windows 8.0 and lower has no way of doing that; all NFS actions performed by anybody on a Windows 8.0 machine appear to the server to be performed by the same user. (And by default, that user is "nobody", which has minimal privileges, so there's a good chance you won't even be shown the files you care about.) Windows 8.1 and later apparently provides a method for installing a Linuxlike password and group file on the Windows machine and using them to map NFS accesses by individual Windows users to the corresponding user IDs on the NFS server, but we haven't tested that.

So, if you're on a Windows 8.0 Enterprise machine or earlier, and you're the only person who ever uses the machine, it's theoretically possible to mount individual NFS filesystems, but to make access comfortable you'll probably need to tweak a WIndows registry entry to change the (NFS/Linux) user the Windows machine performs NFS operations as from "nobody" to your own UID. (But then of course anybody on that machine can perform NFS operations as you.) You'll still need to mount each NFS filesystem by hand and unmount it when you're done, and to do that you'll need to figure out the server which serves the filesystem and its path on the server (which is not the same as it's path when mounted on a CSAIL Linux machine); see below for how to do that. (Note that non-Enterprise versions of Windows may not support the "Services for Unix" component required for NFS support.)

Under Windows 8.1 or later, I'm told it's possible to give Windows a Unix-style password and group file so that Windows can map Windows users to UIDs on the NFS server, but I don't have details.

This thread on superuser.com has some information on mounting NFS filesystems on Windows 8.0 and 8.1, but it basically presumes you're sharing files from your single-user fileserver to your single-user Windows machine (presumably with everything world-writable), so it ignores the userid issues.

This (untested) Microsoft TechNet documentation talks about mounting NFS filesystems on Windows 7 (but again doesn't discuss he userid mapping issues).

One of the responses to this question mentions the Windows registry keys you can set to make your Windows 8.0 Enterprise or earlier box use a different id than "nobody" (anonymous) for NFS accesses.

And this (again untested) Microsoft Support article describes scripts to take Unix UIDs and GIDs and feed them into Lightweight Directory Services, which is apparently how you tell Windows to perform operations as the right NFS user.

So how do I figure out what server and pathname I want to mount?

Presumably you already know (or one of your colleagues can already tell you) the pathname of the NFS directory you want to use as mounted on a CSAIL Ubuntu system. The simplest way to find out what NFS server provides that directory and what pathname to use when mounting it is to ssh into a CSAIL machine with NFS support turned on (you can use ubuntu-login.csail.mit.edu if your group doesn't already have an appropriate machine), cd to the directory, and type df . (that's the command df followed by a space and a period; the period stands for "the current directory") That will show you what filesystem the current directory is on, with enough information for you to mount an NFS filesystem elsewhere by hand. For instance:
$ cd /data/scratch
$ df .
Filesystem                                 1K-blocks        Used  Available Use% Mounted on
nfs-prod-3.csail.mit.edu:/export/scratch 16106127360 14798169792 1307957568  92% /data/scratch
That tells you that the filesystem known as /data/scratch on our Linux machines is mounted from the server nfs-prod-3.csail.mit.edu and corresponds to the pathname /export/scratch on that server.

-- JaySekora - 05 Jun 2015
Topic revision: 05 Jun 2015, JaySekora
 

MIT Computer Science and Artificial Intelligence Laboratory

 

  • About CSAIL
  • Research
  • News + Events
  • Resources
  • People

This site is powered by Foswiki MIT: Massachusetts Institute of Technology