NFS Sharing Demonstration

This video will look at how to use the NFS server and client features in Windows as well as a quick look at Ubuntu. There is a lot to NFS and this video just covers the basics.

Show lesson content
0:25 – We will now take a look at my computer running Windows Server 2012 R2.

0:32 – First we will open Server Manager from the quick launch bar.

0:37 – Select “Add roles and features” to start the Add roles and features wizard.

0:43 – As we will be installing this on a local server, we will leave the first two screens as their defaults and click next.

0:49 – On the Server Selection screen, we will select the local server ‘NYDC1’ from the list and click next.

0:56 – On the Server Roles screen, we will select the NFS Server role. (We will discuss the client component later on in the video.) Expand ‘File and Storage Services’ and then expand the sub-category ‘File and iSCSI services’ then select the Server for NFS component.

PLEASE NOTE: Windows may prompt you to install additional features. If this is the case, select’ Add Features’ when prompted.

1:35 – Click next.

1:37 – The next screen will ask if you would like to install additional features. In our case today, we do not need any additional features so we will just press next.

1:45 – With the required roles selected (and additional features added if necessary), we will be on the last screen of the wizard. We will press install at this point to initiate the install of the selected roles and features. The installation will take a few moments to complete so we’ll pause the video and return when it’s done.

1:59 – Once the install is complete, we will close the wizard and then open up Windows Explorer.

2:07 – We’ll select the D Drive and create a new folder called ‘Data’. This will be the folder we share using NFS.

2:12 – Next, we will create a text document called “Data folder on NYDC1.txt” so when we connect to it later in the video using the client, I can identify it.

2:28 – With the folder now created, the next step is to share it. To do this, we will right click on the folder and select properties.

2:37 – To share the folder using NFS, select the NFS Sharing tab.

2:43 – On the NFS Sharing tab, press the button “Manage NFS Sharing” to bring up the NFS sharing dialog.

2:49 – To share the folder, tick the option at the top “Share this folder”.

2:55 – With the folder shared, there are some additional options that can be configured, but that is beyond the scope of this video.

3:04 – If you notice at the top, there are options for Kerberos if you want to utilize Kerberos for security.

3:11 – In our case, I will select the option “Allow anonymous access”. This will allow the NFS share to be accessed without a username and password.

3:20 – Next we will determine which computers we will enable to access the share. To do this, we will press the permissions button.

3:31 – We see by default that all machines have the “allow read-only access” to the share.

3:35 – To add additional permissions, we’ll select the Add button.

3:38 – In this case, I will add the computer NYDC1, which is the server.

3:43 – Later in the video, we’ll be trying to connect to the share from the NYDC1 server and we want to ensure that it has access when we do.

3:49 – Notice, for the type of access, I can select read-only or read-write. We’ll leave it on Read/Write and then press OK to exit the dialog.

4:00 – Notice that if the permission “all machines” is selected, the remove button is unavailable and greyed out. This permission cannot be removed, so if you wanted to remove permissions, you will need to change the access to “No Access”. Since we have added NYDC1 into the permissions list, this essentially limits access to ONLY NYDC1.

4:21 – With the share created, and permissions set, we will close the open windows and go back to the Server manager.

4:25 – This step is to connect the new NFS share to Windows. To do this, however, an additional feature is required. Keep in mind that Windows Server and Windows OS versions earlier than 8.1 support this feature, however Windows 8.1 does not have this support built in. If you are using 8.1, you will need additional software to access an NFS share.

4:58 – To add the Feature, we will select Add Roles and Features from the Server Manager.

5:05 – Because the feature will be installed locally, we will accept the defaults on the first two pages of the wizard when prompted.

5:10 – No roles need to be added, so simply hit next.

5:14 – On the features screen, we will select “Client for NFS”. Once selected, we will click next.

5:20 – We now complete the wizard and will select “Install” for the server to begin installing this new feature.

5:25 – As the installation takes a moment to complete, we will pause the video.

5:29 – Now that the installation is complete, we will close the wizard and open Windows Explorer.

5:35 – To map to the NFS Drive, we will right click on “This PC” and select map network drive.

5:44 – We could enter in a Windows share name of \\NYDC1\Data. This will work, however we could also use the UNIX standard of NYDC1:/Data. Either will work fine.

6:03 – Notice when we try to map the drive, there is an error message. This message will suggest that the share could not be found. However, we know the problem is with the permissions.

6:11 – To resolve this, we will go back to Windows Explorer. Open up the D:\ drive and right click the ‘Data’ folder and select properties.

6:22 – We’ll select the NFS sharing tab and press the button Manage NFS Share.

6:25 – From this new window, we will press the permissions button.

6:28 – With the permissions dialog open, we will press the add button.

6:34 – This time, we will add the IP Address to the permissions list as opposed to the computer name. We will ensure that it has Read/Write access.

6:42 – If we now exit all the way back out and retry mapping the drive, it will connect without issue.

6:52 – This is an important point with NFS as issues can arise from using a computer or hostname in the permissions list. As a quick fix, you can use the IP address instead.

7:05 – Notice that with the drive now mapped, not all the files are being shown. This is another permissions problem.

7:12 – To resolve this, we’ll go back to the folder properties and this time we’ll select the security tab.

7:18 – We will select the Edit button and then select Add to change the security permissions.

7:23 – We will then add the permissions for anonymous logon.

7:27 – The ‘Everyone’ permission is set but everyone does not include ‘anonymous’, which NFS has used in this case.

7:39 – We will now exit out of here and return to the Windows share. Notice that when we press the F5 key within the share, the files will appear. Currently, the only file in the folder is the text document we created earlier but there are four other folders that have appeared.

7:53 – These folders are from the previous version feature of Windows. Normally with Windows you would not see these folders but with NFS sharing, these folders appear.

8:02 – You can start to see why you would just use SMB sharing to avoid problems like these.

8:15 – To prove a point, we’ll map another drive to the local C Drive. Once the drive is mapped, I will right click on the Start Menu and select the option “command prompt”.

8:28 – With the command prompt open, we will run the command “net use”.

8:31 – Notice that the drive that we mapped using NFS is shown in standard Windows format. However, it is not using the Windows SMB protocol as seen on the far right. It is shown as “NFS Network”.

8:48 – In contrast to this, notice that the share above this is listed as “Microsoft Windows Network”.

8:56 – This means that one share is using NFS while the other share is connected using SMB.

9:00 – We will now close these Windows and go back to Server Manager and select “File and Storage Services” on the left hand side.

9:12 – Once open, we will then select the option “Shares”.

9:19 – This shows all shares currently configured on this server.

9:23 – If we right click on the data share, this will bring up the properties for the NFS share. Here you can configure the options for the share.

9:28 – The options are the same as before but are in a different interface, so we won’t go through them again. However, we will select Share permissions.

9:40 – In a moment, we will discuss how to mount the NFS share in Linux so we will need to add the server’s IP address to the permissions list.

9:47 – To do this, we will press add and then add the IP address under the host.

9:55 – Once we add the IP address, and apply the changes we will get a dialog message reminding me that we have enabled the anonymous logon.

10:02 – This is fine for this demonstration so we will ignore this message.

10:09 – The Windows server is now configured to allow the Linux server to mount a share from the Windows Server using NFS.

10:15 – We will now switch to the server running Ubuntu to see how this is done.

10:23 – First we will open a terminal to run the required commands.

10:30 – To do this, I will select the menu and select XTerm found under system tools.

10:37 – First we will create a folder where the NFS share will be mounted to. To do this, we will run the command “sudo mkdir” followed by the path.

10:44 – In this case, we will create a folder called ‘Data’ under ‘mnt’.

10:48 – The sudo command allows the tool to run as a root user, equivalent to an administrator in Window

10:55 – When we run the command, we will be prompted for the root password.

11:00 – The next step is to install the NFS software. This will provide the functionality to the server for it to mount the NFS shares along with the ability to share folders on the network using NFS.

11:10 – To do this, we will run ‘sudo’ again and this time run the command ‘apt-get’. This is the package software that this distribution of Linux uses to install and update software.

11:22 – In this case, we will use the ‘install’ option followed by the name of the NFS package. So the command would be ‘sudo apt-get install nfs-kernel-server’.

11:31 – It will download the package and request input, where we will put Y to start the installation. This will have NFS installed and ready to use.

11:38 – With the package installed, the next step is to mount the NFS share on the Windows server to the folder we created earlier.

11:44 – To do this, we need to run the ‘sudo’ command with the ‘mount’ command and then enter in where the share is located, in this case the IP address. After this, we will state where the folder will be mounted to on the Linux system.

12:08 – So we will run the following command ‘sudo mount /mnt/data’

12:11 – Once the command is run, the NFS share will be mounted. We will now change to this folder and run a directory listing.

12:17 – You can see the files shown are the same as those on Windows when we mapped the drive.

12:26 – That’s all you need to do for the client.

12:29 – The next part of the video will be configuring Linux to share a folder. First we will create a folder to share by running two ‘mkdir’ commands to create the folder shared under export. ‘mkdir /export’ and then ‘mkdir /export/shared’

12:40 – Next we need to change the permissions of the folder we just created. To do this, we will run the command ‘chmod 777’ which grants all access to all users to the folder we created.

12:54 – Next, we need to modify a configuration file so that the folder will be shares using NFS.

13:01 – To do this, we will run ‘sudo pico etc/exports’.

13:09 – To share the folder, we need to add the path to the folder in the configuration file followed by who has access (asterisks are used to include “everyone”), then ‘RW’ for read and write. So the line entered is “/export/shared *(rw)”.

13:25 – Once we have made the required changes, we will close and save the file.

13:31 – With the changes made, the final step is to activate the NFS service.

13:35 – To do this, we will run the ‘service’ command followed by the server name and the parameter start. So the command will be “sudo service NFS-kernel-server start”.

13:42 – The folder is now shared using NFS. We will not change over to the Windows server to look at how to map a drive to this NFS share.

13:52 – To map the drive, we will open Windows Explorer and right click on “This PC” and select the option “Map Network Drive”.

14:02 – For the path, we will enter in the IP Address of the Linux Server followed by a colon and then the path of the share. “”.

14:13 – Upon pressing finish, the drive will be mapped.

14:16 – That is it for NFS on Windows Server. We hope the video helped give you a good understanding of how it all works.

“Installing and Configuring Windows Server 2012 R2 Exam Ref 70-410” pg 75

Voice Talent: HP Lewis http://hplewis.com
Video Production: Kevin Luttman http://www.KevinLuttman.com
Web Document: Phillip Guld http://Philguld.com
Quality Assurance and Web Hosting: Edward M http://digitalmaru.com/

Lesson tags: 70-410-windows-server
Back to: 70-410 Installing and Configuring Windows Server 2012 > Windows File and Share Access

Installing and Configuring Windows Server 2012