3. What Are the Commands Used in Windows 2016 to Mount the Nfs Share on the Linux Server?

Here we're going to show you how to mount an NFS file share in Windows Server 2016 both temporarily and persistently so that it will automatically mount after a reboot.

There are a couple of different ways this can be washed, including mapping a network drive or adding a network location, which we'll discuss here.

Our NFS Server: In this example we already take an NFS server setup on a CentOS 7 Linux organization which is available at 192.168.1.14 and we have exported the /root/nfs directory with NFS. Encounter our guide on creating an NFS server in Linux here if you need information on how to do this.

Install NFS Client

Before we can mount any NFS shares on our Windows server, we must starting time install the NFS client characteristic. This can be washed through the graphical user interface (GUI) using server manager, notwithstanding that takes a lot longer so we'll utilise some PowerShell.

First nosotros'll employ the Get-WindowsFeature cmdlet to search for bachelor features that contain the cord 'NFS*' in the Name field.

PS C:\>          Get-WindowsFeature -Name NFS*        

Get-WindowsFeature Find NFS-Client Windows Server 2016

As we can see NFS-Customer is bachelor for install but non currently installed.

Next nosotros employ the Install-WindowsFeature cmdlet to install the NFS-Client feature, as shown below.

PS C:\>                      Install-WindowsFeature -Name NFS-Customer        

Install-WindowsFeature NFS-Client Windows Server 2016

Once complete we should see that the installation has completed successfully, no reboot is required for this feature, we tin brainstorm using it straight abroad.

Mountain NFS Temporarily

We can use the mount command in command prompt to quickly mount our NFS share and confirm that it's working. Notation that the mount command used here is in command prompt rather than PowerShell, using it in PowerShell will neglect equally it is a different command.

C:\Users\Administrators>          mount \\192.168.1.14\root\nfs X:          X: is at present successfully connected to \\192.168.1.14\root\nfs  The command completed successfully.        

Command Prompt Mount NFS Windows Server 2016

At this point we can scan to "This PC" and nosotros should see the NFS share mounted under Network Locations.

There is an issue with this however, this mount is not persistent meaning that if we perform a restart of the Windows server it will not be there subsequently. Luckily there are a few ways nosotros tin permanently map to the NFS file share.

Mount NFS Persistently

Most of the time nosotros volition want our NFS mount to survive a system reboot and mountain automatically after boot so that we don't have to manually mount it every time.

There are a couple of different ways that nosotros can reach this job:

  • Map Network Drive
  • Add A Network Location

Map Network Bulldoze

I personally prefer this method, as nosotros tin see the space remaining much more easily.

  1. First open up "This PC" and select Computer from the carte du jour at the top. From here click on Map network drive, equally shown below.

    Map network drive

  2. The Map Network Drive window will open up, select the drive letter that you want to assign to the NFS share, followed past the IP address or hostname of the NFS server equally well equally the path to the exported NFS directory. Click the End button when complete.

    Map network drive

    Yous may see a popular up window showing that the connection is existence attempted. Once complete the shared NFS folder will open upwards.

  3. When you lot view "This PC" you lot volition meet the mapped network drive under Network location. This method is better than calculation the network location every bit nosotros'll discuss next as it clearly shows how much disk space on the NFS share is in use and how much is yet available.

    Map network drive

Add together A Network Location

This volition basically create a shortcut to the mounted NFS directory for you to access at any time, it will also be available subsequently restart just like the map network drive method to a higher place.

  1. First open "This PC" and correct click in the white space area and select "Add a network location".

    Add network location

  2. On the welcome screen click Next to go on.

    Add network location

  3. Select that you want to cull a custom network location, followed by the Next button.

    Add network location

  4. Enter in two back slashes, followed past the IP address or hostname of your NFS server, followed by the path that is being exported by the NFS server. Click Adjacent one time you've filled this in.

    Add network location

  5. Y'all tin can at present select a custom name for the network location, click Next once you've set one.

    Add network location

  6. To complete the process, only click the Finish button on the completion screen.

    Add network location

  7. Nosotros can optionally open the NFS mount now, or we can scan to "This PC" and see the folder shortcut listed under the "Network locations" setting as shown below.

    Add network location

    Every bit mentioned note that this does not bear witness the deejay space in apply like the network drive mapping option.

Summary

Nosotros have shown y'all how to install the NFS customer feature in Windows Server 2016, and then mount an NFS share from a Linux server both temporarily through command prompt with the mountain command, and persistently so that the NFS share is mounted automatically after the server has been restarted.

By doing this we can easily access files from a Unix or Linux based operating system over NFS from Windows.

piferrieverl.blogspot.com

Source: https://www.rootusers.com/how-to-mount-an-nfs-share-in-windows-server-2016/

0 Response to "3. What Are the Commands Used in Windows 2016 to Mount the Nfs Share on the Linux Server?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel