Настройка nfs windows server 2019

In this article, I will explain how you can install and configure an NFS Server on a Windows 2019 Server. I will also show you the steps to create an NFS shared folder and mount the shared folder on Linux clients.

What is the Network File System (NFS)?

Network File System (NFS) provides a file-sharing solution that lets you transfer files between computers running Windows Server and other non-Windows operating systems such as Linux or UNIX using the NFS protocol.

NFS in Windows Server includes Server for NFS and Client for NFS. A computer running Windows Server can use Server for NFS to act as an NFS file server for other non-Windows client computers.

Client for NFS allows a Windows-based computer running Windows Server to access files stored on a non-Windows NFS server.

Understanding Test lab:

For this, we will use the virtual test lab created in VirtualBox.

  • WS2K19-DC01: Domain Controller and DNS
  • UBUNTU1804: Ubuntu OS, NFS client.

Install Server for NFS role service in Windows Server 2019:

To install the Server for NFS role service in Windows Server 2019, follow the below steps:

1. Open Server Manager. Click on Tools and select Add Role and Features.

1. Start Add Roles and feature installation wizard

2. On the Before you begin page, click Next.

2. Click Next on before you begin screen

3. Select Role-based or feature-based installation and click Next.

3. select role-based or feature-based installation

4. Select a server from the server pool on which you want to install the Network File System for Server role service, click Next.

4. Select local server for server for NFS role service installation

5. On select server roles page, expand File and Storage Services, expand File and iSCSI Services. Select Server for NFS checkbox.

5. Select Server for NFS role service

6. A new window will pop up, click on Add Features to include required features and management tools needed by the NFS server.

6. Click on Add Features to add required feature for NFS server

7. Make sure that the Server for NFS role service is selected. Click Next.

7. Make sure NFS role is selected

8. On select features, click Next.

8. Click Next on select feature page

9. Click Install and complete the installation process.

9. Click on Install to start NFS role Installation Process

10. Click Close to finish the installation.

10. Click on close once installation completes

How to Create an NFS Shared Folder on Server 2019:

After installing the Server for NFS on Windows Server 2019, the next step is to create an NFS shared folder by using the File and Storage Services console.

11. On the Server Manager Console, click on File and Storage Services.

11. Click on File and Storage Service

12. Click on Shares. Right-click in the empty area and select New Share.

12. Select New Share

13. On Select the profile for this share, select NFS Share – Quick profile. Click Next.

13. Select NFS Share Quick Profile

14. To configure a specific folder as NFS shared folder, select the checkbox Type a custom path and type the path for the specific folder you’d like to set as a shared folder. Click Next.

14. Browse the local folder path to share as NFS share

15. Verify share name, local path and remote path for NFS shared folder. Click Next.

15. Verify NFS share Name and path

16. Specify the Authentication methods as per your requirement.

16. Select NFS authentication method

17. To set up the NFS share permissions, click Add button.

17. Click on Add to specify permission

18. Specify the Hosts you’d like and assign the access permissions from the drop-down menu.

  • Host: 172.18.72.103 (IP address of Ubuntu VM)
  • Share Permissions: Read/Write

19. Click on Add.

18. Specify the Host and Permission Information

20. Using the same steps, you can add permission for other Hosts as well. Click Next.

19. Click Next after specifying NFS permission

21. Specify NTFS permission. As we are just testing NFS sharing, we are going with default permission. Click Next.

20. Setup NTFS permission as needed

22. Review the selections, click on the Create button.

21. Click on Create to create a new NFS share folder

23. Click on the close button after verifying the successful creation of the NFS shared folder.

22. Click on Close once you finished

24. Verify the NFS shared folder under the shares list. Access the local path of the NFS shared folder. Create one text file and put some text under it.

23. Create one sample text file under the folder

Mount the NFS shared Folder on Linux Client (Ubuntu Machine):

25. On the Ubuntu machine, verify the local IP address and network connectivity with the NFS server.

24. Check local IP address and connectivity with NFS server

26. To mount an NFS shared folder on a Linux machine, open terminal. Type command: mkdir /data

This command will create one directory name data under the root directory.

25. Create one new directory

27. Type command:

Syntax: mount -t nfs <NFS-Server-IP>/<NFS-Shared-Folder-Name> /<Mount-Point>

For example, to mount an NFS shared folder named share1 of the NFS server that is configured with IP address 172.18.72.5, the folder should be mapped on the /data mount point.

In our case command will look like:

mount –t nfs 172.18.72.5:/share1 /data

26. Mount the NFS shared Folder on Ubuntu Machine

28. Verify the content of the text file which we have created earlier on the NFS server.

27. Verify the sample text file.

In this blog post, we have learned the steps on how to install and configure NFS in Windows Server 2019.

I hope, you enjoyed it. Thank you for reading.

Video Guide: Installing and Configuring NFS Server role in Windows Server 2019

Post Views: 5,973

Network File System (NFS) клиент по умолчанию не установлен в Windows Server 2022/2019/2016 и десяточных версиях Windows 11/10. Для его установки запустите Server Manager, выберите Add Roles and Features -> Client for NFS.

Установка NFS клиента Windows Server 2019

Если вы хотите установить графические консоли управления NFS (nfsmgmt.msc), выберите дополнительно Services for Network File System Management Tools в Remote Server Administration Tools -> Role Administration Tools -> File Services Tools.

Services for Network File System Management Tools - консоль NFS

Или вы можете установить клиент NFS и консоль управления с помощью PowerShell:

Install-WindowsFeature NFS-Client, RSAT-NFS-Admin

В Windows 10/11 для установки NFS клиента выполните:

Enable-WindowsOptionalFeature -FeatureName ServicesForNFS-ClientOnly, ClientForNFS-Infrastructure -Online -NoRestart

Клиент NFS в Windows поддерживает NFSv2 и NFSv3.

Теперь вы можете подключить NFS шару с помощью PowerShell:

New-PSdrive -PSProvider FileSystem -Name M -Root \\192.168.0.211\mnt\hyperv -Persist

Опция Persist включает автоматическое подключение NFS шары после перезагрузки.

Из CMD:

mount -o anon nolock \\192.168.0.211\mnt\hyperv M:

Также вы можете смонтировать NFS каталог из графического интерфейса File Explorer.

Для отключения NFS шары, выполните:

Umount M:

Или

Remove-PSdrive -Name M

При подключении NFS шары может появится ошибка:

The remote device or resource won’t accept the connection.

Ошибка подключения NFS шары: The remote device or resource won’t accept the connection.

Чтобы исправить проблему, запустите консоль Services for Network File System (NFS) и проверьте права для подключения к удаленному ресурсу.

Если вы хотите подключиться к NFS ресурсу под anonymouse пользователем, нужно добавить два параметра реестра:

New-ItemProperty HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default -Name AnonymousUID -Value 000001f4 -PropertyType "DWord"
New-ItemProperty HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default -Name AnonymousGID -Value 00000064 -PropertyType "DWord"

Если для подключения нужно всегда использовать учетную запись root, измените значения параметров AnonymousUID и AnonymousGID на 0.

Если вы используете NFS подключения в окружении Active Directory, нужно отменить важный нюанс.

Если в AD не добавлены UNIX атрибуты и User Name Mapping не настроен, то для подключения к NFS серверу из Windows будет использоваться анонимное подключение. Для использование учетных данных для подключения к NFS вам нужно внести изменения в схему AD (атрибуты uidNumber и gidNumber).

На контроллерах домена WS 2012R2 можно добавить вкладку UNIX атрибутов в свойствах пользователя AD:

Dism.exe /online /enable-feature /featurename:adminui /all

Однако эта опция является deprecated в Windows Server 2016 и атрибуты пользователя предлагается править вручную или с помощью PowerShell:

Set-ADUser -identity user1 -add @{uidNumber="<user_unix_uid>";gidNumber="<user_unix_gid>"}

При подключении NFS каталога также может появится ошибка:

You can't access this shared folder because your organization's security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network.

В этом случае нужно создать параметр реестра AllowInsecureGuestAuth:
New-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters -Name AllowInsecureGuestAuth -Value 00000001
New-ItemProperty HKLM:\ oftware\Policies\Microsoft\Windows\LanmanWorkstation -Name AllowInsecureGuestAuth -Value 00000001

Затем перепустите службу NFS.

windows-server-2019

Introduction

In this article, we will explore the what, who, where, when, why, and how of Network File System (NFS) as Storage Server functionality on the Windows Server 2019 platform, so let’s get started.

Comments

Popular posts from this blog

What is Random Access Memory (RAM)?

What is Random Access Memory (RAM)?

Random Access Memory (RAM) is one of the essential components in computer hardware. RAM is responsible for storing and retrieving data quickly, which is why it is often referred to as the «working memory» of a computer. This memory allows the computer to perform various tasks efficiently by providing temporary space for data and instructions that are being processed by the processor. In this article, we will take a closer look at what RAM is, how it works, and why it is important for the overall performance of a computer system.

What does a data analyst do?

What does a data analyst do?

Did you know that 2.5 quintillion bytes of data are created every day? That’s equivalent to 250,000 Libraries of Congress, or 5 million laptops! In this ocean of data, how do we make sense of it all? That’s where data analysts come in. Data analysts are the detectives of the digital world, using their skills and tools to uncover patterns, trends, and insights from data. They help businesses and organizations make informed decisions, solve problems, and seize opportunities. Whether it’s predicting customer behavior, optimizing marketing campaigns, improving healthcare outcomes, or enhancing educational experiences, data analysts play a crucial role in shaping our world.

How To Get Started With No-Code and Low-Code

How To Get Started With No-Code and Low-Code

Imagine your boss asks you to develop custom software for your company. But you and your team don’t have the time or experience in coding. And there’s no developer available at the moment as well. Panicking? Well, don’t. With low code/no code programming, you don’t have to be a developer to do any programming-related task. In recent years, many platforms have made it possible for programmers with little to no development experience to deliver software while meeting the needs of professional developers under time pressure. Without worrying about the specifics of underlying operating systems or scalability needs,

What is DOS?

What is DOS?

Have you ever wondered how your computer knows what to do? The answer lies in the operating system, or OS. One of the oldest and most influential operating systems is DOS, or Disk Operating System. DOS is like a command center that tells the computer what to do and how to do it. Unlike modern operating systems, DOS uses text-based commands instead of graphical user interfaces. While it may seem simple and primitive, DOS is also fast, powerful, and flexible. However, it also has its drawbacks, such as its complexity and obsolescence. In this article, we will explore the fascinating world of DOS.

What is Github?

What is Github?

GitHub is a powerful and widely-used web-based platform designed for version control and collaboration , especially for developers. Built upon Git, it allows users to store, manage, and track their code projects efficiently. Beyond its repository-hosting capabilities, GitHub fosters teamwork by enabling developers to work together seamlessly, review changes, and contribute to open-source projects from anywhere in the world. Whether you’re a seasoned programmer or a beginner, GitHub provides essential tools to streamline coding and project management in one centralized platform. But what exactly is it? In this article, we’ll break down everything you need to know about this essential tool for collaborative coding.

How to use Python if you work in Marketing

How to use Python if you work in Marketing

Are you tired of dealing with tedious manual tasks, like cleaning data or creating reports? Do you want to get more insights from your data and make better-informed decisions? If so, you’re in luck because Python can help!. Now, you may be thinking, “Python? Isn’t that a type of snake?” Well, yes, it is. But in this case, we’re talking about a different type of Python, one that doesn’t bite (unless you forget to close your parentheses). Python is a powerful programming language that can help you automate tasks, analyze data, and create predictive models. It may sound scary if you’re not a coder or a tech-savvy person, but don’t worry!

I have recently been testing and working through some scenarios where I require the NFS client on a Windows machine to access some NAS shares over the NFS protocol, not much has changed I believe between Windows Server 2016 and Windows Server 2019 but thought it might help some to see how easy it is to get going.

I am picking up at this stage with my fully patched and ready to go Windows Server running 2019. As mentioned previously I want to use this machine to access my NFS share which doesn’t matter what it is or what it is for but this Windows machine is running in Microsoft Azure and I am access Azure NetApp Files over the NFS protocols, Azure NetApp Files can be presented over both NFS and SMB and I will have additional posts about this later.

Installing the Client for NFS

I am pretty sure this could also be achieved through the system manager and selecting the Add Features dialog and working through the wizard approach, I have been purposely doing a lot more of my tasks through PowerShell so that I can re-use and make my tasks quicker, this is something I have picked up from my learnings around Infrastructure as Code. For that reason, I am using PowerShell. I am sure someone else had documented the process through the system manager and UI.

First of all, let’s see what NFS based features we have available to us by running the below command.

Get-WindowsFeature -Name NFS*

111219 1252 Howtomounta1

As you can see from the image above, we have one feature available to us, “Client for NFS” by installing this it will allow us to mount NFS exports to our Windows machine so we can access the data within.

To install this feature run the following command.

Install-WindowsFeature -Name NFS-Client

111219 1252 Howtomounta2

That’s it, it’s that simple, hardly not worth mentioning. That’s the NFS Client installed on our machine, next we need to make sure from the NAS server point of view that the IP address of this windows machine can access that data.

As I said before I am using Azure NetApp Files, this export is configured in the following screen when configuring Azure NetApp Files. I will provide a step by step walkthrough of this process after this initial post.

111219 1252 Howtomounta3

As you can see from the above, I have allowed all clients from all subnets using the export policy (This is the default setting for ANF), my advice is that if this was production you should to create more secure export policies.

Mounting the share

Now we have our NFS Client and we have our export policy from whichever NAS device you are looking to mount onto your Windows, next we actually need to mount the share for use.

Some people will ask now, why you are using NFS when you can use SMB, certain applications, certain environments may require this method and protocol. If this was a traditional Windows environment and this share was going to house predominately user shares and home drives, then absolutely the way to do this would most likely be with the SMB protocol.

Next up is open up a command prompt with Administrator privileges, the mount command is going to be the command you use and then you will be using the NAS IP Address followed by the share name and then which letter you would like to mount this to on your Windows system.

Mount 10.1.1.4:/vZillaANFShare n:

111219 1252 Howtomounta4

Providing you have the correct configuration, mostly down to the export policy on your NAS device then this process should take seconds. And then by seeing the success message as per above but then checking this now as a mapped network drive as per below.

111219 1252 Howtomounta5

Quick post hope that it is useful for somebody. This was something I was working on so that I could test Azure NetApp Files without access to Azure Active Directory services (due to corporate policy) this stopped me from being able to use SMB but allowed me to test the functionality via NFS on Windows and Ubuntu.

Justin Parisi did a great blog on this at the start of the year – Windows NFS? WHO DOES THAT???

2019-11-12

In this article, we want to teach you How To Set up an NFS server on Windows Server 2019.

An NFS is a protocol that lets users on client computers access files on a network, making it a distributed file system.

NFS or Network File System is necessary for helping your business share files over a network.

You can access remote data and files from any remote computer or device that links to the network you will use.

All people within a network will have access to the same files, making file-sharing efforts easier.

To install the NFS server on your Windows Server, you can follow the steps below.

Install NFS on Windows Server 2019

First, open your server manager app.

Then, on the server manager click on the Add roles and Features. On the “before you begin” screen click next to continue.

Next, you will see the select installation type screen. You need to choose role-based and click on the Next button.

Installation type window

In the next window, you need to select the destination server. Select your server and click on the next.

Select destination server for IIS

At this point, in the select server roles window, expand the File and Storage Services, and under it expand File and iSCSI services. Here you need to check the box next to the Server for NFS.

select NFS server roles

This will open a pop-up window, just click on the Add Features to continue.

Add NFS features on Windows server 2019

After that, you will back to the Select Server Roles window, and press Next to continue.

server for NFS

In the Next window, you can always get back and add more features. So press Next to continue.

select features on Windows server 2019

Then, click on the Install button to start your NFS server installation. When your installation is completed, click on the close button to Finish your installation on Windows Server 2019.

Finish NFS server installation

Conclusion

At this point, you learn to Set up an NFS server on Windows Server 2019.

Hope you enjoy it.

In future articles, we will show you how to configure the NFS share folder.

May you will be interested in these articles:

Set up Plesk on Windows Server 2019.

How To Change HostName on Windows Server/Client.

How To Create an FTP Site on Windows Server 2016.

Add Multiple IP Addresses on Windows Server 2016.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Накопительное обновление для windows server 2016
  • Windows загружается только через f12
  • Как удалить защитник windows 10 навсегда через реестр
  • Совместимость криптопро с windows
  • Какой пароль учетной записи windows 10 по умолчанию