Connect Windows Server 2012 R2 to NFS Shares
Out of the field, a Windows Server 2012 and Windows H can’t hook up with NFS-based mostly shares out of your Linux surroundings by default. Although, they each embrace a function that when allow does permit them to.
Microsoft likes to trumpet that ninety% of servers deployed in enterprise environments run Windows Server. But that also means there are plenty of LinuxUnix servers on the market. When you embrace startups and mid-sized corporations, the variety of Linux servers grows considerably.
With the expansion of Linux adoption, particularly on the small-to-medium sized enterprise, odds you could ultimately want to attach a Windows server or a Windows desktop to an NFS share.
Install NFS Client Feature
The NFS shopper is now an installable function in Windows H and Windows Server 2012 and better.
- Launch Server Manager
- On the highest-left aspect of the console, click on Manage.
- Click Add Roles and Features.
- On the Before you start display, click on Next.
- On the Select set up sort display, choose Role-based mostly or function-based mostly set up, after which click on Next.
- On the Select vacation spot server display, in case you are putting in to the native server, click on Next. Otherwise, choose a server from the Server Pool record.
- On the Select server roles display, click on Next.
- On the Select options display, scroll down the listing of obtainable options till you see Client for NFS. Click its checkbox to pick it for set up, after which click on Next.
- On the Confirm set up alternatives display, assessment your choices after which click on Install.
- After the set up completes, evaluate the outcomes after which click on Close.
Mount NFS Share
To mount an NFS share into Windows we have to use the mount command. There is not any GUI interface to carry out this activity. The command could be very easy to make use of and comparatively just like the identical command present in Linux.
The examples under will hook up with a number named LNXSRV01. The native consumer account on LNXSRV01 that might be used to mount the share can be Sam.
- Open a command-immediate.
- Mount an NFS share referred to as /exports/dept to the Z:.
mount -consumer:Sam -p:MyPassword LNXSRV01exportsdept Z:
Instead of typing the password into the command-line, we will use ‘*’ to drive a password immediate when mounting.
mount -consumer:Sam -p:* LNXSRV01exportsdept Z:
To mount the share into any out there drive letter on the Windows server we will substitute Z: with ‘*’.
mount -consumer:Sam -p:* LNXSRV01exportsdept *
Set whether or not the mount sort is tough or mushy utilizing the mtype choice.
mount -o mtype=onerous -consumer:Same -p:* LNXSRV01exportsdept *
There is not any technique of making a persistent mount of an NFS share on a Windows server. The solely choice to mount an NFS share at system boot or logon is to make use of a batch script. This, nevertheless, just isn’t beneficial.