Introduction

Server for Network File System (NFS) provides a file-sharing solution for enterprises that have a mixed Windows and UNIX environment. Server for NFS enables users to share and migrate files between computers running the Windows Server 2012 operating system using SMB protocol and UNIX-based computers using the NFS protocol.

Today we will go through the process of how to provision a Server for NFS share on Windows Server 2012.   Note that provisioning on a Clustered Share Volume (CSV) and on ReFS is not supported in this release. This is based on NTFS volumes. The scenario we describe involves:

  • Install the Server for NFS role on the target Windows Server 2012 machine.
  • Provisioning a pre-existing directory c:\share on an NTFS volume with export name “share”.

We will cover this process step by step in two different ways, namely PowerShell cmdlet and server manager UI. Following sections will introduce them one by one.

PowerShell cmdlet Setup

Server for NFS is a server role available on Windows Server 2012 operating system.

Step 1: Install the Server for NFS role

From the PowerShell cmdlet run the following command to make this server to also act as a NFS server:

Add-WindowsFeature FS-NFS-Service

Step 2: Provision a directory for NFS Sharing

Authentication method, user identity mapping method, and permission of a Server for NFS share need to be configured when provisioning a directory for NFS sharing. The following PowerShell cmdlet provisions a new share with "auth_sys" authentication, unmapped access and with read-only permissions:

New-NfsShare –Name share –Path c:\share –Authentication sys –EnableUnmappedAccess $True –Permission readonly


The concepts and settings of user mapping as well as authentication methods are covered in blog post "NFS Identity Mapping in Windows Server 2012" at http://blogs.technet.com/b/filecab/archive/2012/10/09/nfs-identity-mapping-in-windows-server-2012.aspx.

The concepts and settings of Kerberos authentication in detail is covered in blog post “How to NFS Kerberos Configuration with Linux Client” at http://blogs.technet.com/b/filecab/archive/2012/10/09/how-to-nfs-kerberos-configuration-with-linux-client.aspx.

The concepts and settings of permission is covered in blog post “How to Perform Client Fencing” at http://blogs.technet.com/b/filecab/archive/2012/10/09/how-to-perform-client-fencing.aspx.

UI based Setup

Step 1: Install the Services for NFS role

In Server Manager, choose Add Roles and Features from Manage menu item (Figure 1).


Figure 1

Figure 2

This action pops up the Add Roles and Features Wizard (Figure 2). Press Next button to continue.


Figure 3

Select Role-based or feature-based installation radio button. Then click Next button to move to the next page.

Figure 4

After that, we select the destination server where we plan to deploy NFS server (Figure 4). Select Select a server from the server pool radio button, and choose the destination server. In our example we choose the server “nfsserver” as destination server. Click Next button to continue the process.

Figure 5

In this step, we select the server role Server of NFS check box from Roles’ tree view under File And Storage Services -> File services (Figure 5).

 

Figure 6

A confirmation pop-up window will arise (Figure 6). Follow its default setting and click Add Feature button.


Figure 7

After that, we will come back to the Select server roles step (Figure 5).  Press Next button to switch to the Select features page (Figure 7). In this page, we skip all feature settings and press Next button.


Figure 8

This is the last page of setting up NFS server role. Just click Install button to perform NFS server role setup. This process may take a while and you can always close the setup page and the process will run in background.

Step 2: Provision a directory for Server for NFS Share

 


Figure 9

Go back to the dashboard of Server Manager, and choose File and Storage Service (Figure 9).


Figure 10

In this page, select the server from Servers, and click Shares (Figure 10).


Figure 11

In this page, click the link “To create a file share, start the New Share Wizard” to start the New Share Wizard (Figure 11).


Figure 12

After the New Share Wizard pops up, select “NFS Share - Quick” and click the Next button.


Figure 13

In this page, we customize the target folder we plan to share (Figure 13). In our example, we select the path c:\share. Click Next to go to next page.


Figure 14

Given a name of that NFS share, the wizard will generate the remote path of this share (Figure 14). In our case, the share name is “share”, and the remote (exported) path is “nfsserver:/share”. Click Next button to continue.


Figure 15

Now we enter the authentication page (Figure 15). Choose “No server authentication” for "auth_sys" authentication method and allow unmapped user access by selecting “Enable unmapped user access” and “Allow unmapped user access by UID/GID”.

The concepts and settings of unmapped access and authentication methods are covered in blog post "NFS Identity Mapping in Windows Server 2012" at http://blogs.technet.com/b/filecab/archive/2012/10/09/nfs-identity-mapping-in-windows-server-2012.aspx.

The concepts and settings of Kerberos authentication method in detail is covered in blog post “How to NFS Kerberos Configuration with Linux Client” at http://blogs.technet.com/b/filecab/archive/2012/10/09/how-to-nfs-kerberos-configuration-with-linux-client.aspx.

Click Next to move on to the next page.

Figure 16

Add share permission by first click the Add button (Figure 16).

 

Figure 17

We assign read permission to all machines by choosing “Read Only” from share permissions and click Add button to add this permission (Figure 17). Then click Next button two times to the confirmation page (Figure 18). Click Create button to confirm the share creation process. The concepts and settings of permission will be covered in blog post “How to Perform Client Fencing” at http://blogs.technet.com/b/filecab/archive/2012/10/09/how-to-perform-client-fencing.aspx.

Figure 18

Click Create button and the wizard completes the share creation. After completion, close the wizard.

Feedback

Please send feedback you might have to nfsfeed@microsoft.com