- Adding Windows Server NFS Shares to VMware ESX
- Problem
- Create NFS Shares on Windows Server 2019, 2016, and 2012
- VMWare vSphere 6 Connecting to Windows NFS Shares
- Create NFS Shares on Windows Server 2008
- How to Configure NFS Share in Windows Server 2019
- What is the Network File System (NFS)?
- Understanding Test lab:
- Install Server for NFS role service in Windows Server 2019:
- How to Create an NFS Shared Folder on Server 2019:
- Mount the NFS shared Folder on Linux Client (Ubuntu Machine):
- Video Guide: Installing and Configuring NFS Server role in Windows Server 2019
- Обзор NFS Network File System overview
- Описание компонента Feature description
- Версии Windows и Windows Server Windows and Windows Server versions
- Практическое применение Practical applications
- Новые и измененные функции New and changed functionality
- NFS версии 4,1 NFS version 4.1
- Инфраструктура NFS NFS infrastructure
- Постоянная доступность NFS версии 3 NFS version 3 continuous availability
- Улучшения развертывания и управляемости Deployment and manageability improvements
- Сведения о диспетчере сервера Server Manager information
- Дополнительные сведения Additional information
Adding Windows Server NFS Shares to VMware ESX
KB ID 0000319
Problem
You have a Windows 2019/2016, 2012, or 2008 server with plenty of storage space, and you would like to present that to an ESX/ESXi server as a datastore. You can configure a folder (or drive) as an NFS share and present it to VMware vSphere, so that it can be used as a datastore.
Note: For Server 2008 and vSphere 4/5 Scroll down.
Create NFS Shares on Windows Server 2019, 2016, and 2012
Essentially you need to add the ‘Server for NFS’В role, (Below “File and Storage Services“).
Create a folder to share, on its properties > NFS Sharing > Manage NFS Sharing.
Tick to share > Permissions.
You can add each host individually here, but I’m just changing the default rule to allow Read/Write to ALL MACHINES > Tick ‘Allow root access’ > OK.
VMWare vSphere 6 Connecting to Windows NFS Shares
Make Sure you have a VMKernel port on the same network as your NFS share.
DataStore View > Right click the ‘Cluster‘ > Storage > New Datastore > NFS > Next > NFS 3 > Next.
Give the datastore a name > Select the share name (prefix it with a forward slash, and remember they are case sensitive!) > Enter the IP or FQDN of the NFS server > Next > Next > Finish.
Create NFS Shares on Windows Server 2008
Gotchas
1. The system will not work if you do not have a vmkernel port, if you already have iSCSI or vmotion working then this will already be in place.
If not you will see an error like this,
Call “HostDatastoreSystem.CreateNasDatastore” for object “ha-datastoresystem” on ESX “
2. Make sure TCP port 2049 is open between the NFS share and the ESX box. On an ESX 3.x servers you may need to run ” esxcfg-firewall -e nfsClient “.
Other Points
1. You CAN boot a windows VM from anyВ NFS store (just because Windows cannot boot from NFS – does not mean a VM can’t).
2. NFS Datastores are limited to 16TB.
3. vSphere supports up to 64 NFS Datastores (ESX supports up to 32).
4. Thin provisioned disks will “re-expand” when moved/cloned to another NFS Datastore (THOUGH NOT in a vSphere environment).
5. On Server 2008 R2 NFS can only support 16 TCP connections, to raise the limit see here.
How to Configure NFS Share in 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.
2. On the Before you begin page, click Next.
3. Select Role-based or feature-based installation and click Next.
4. Select a server from the server pool on which you want to install the Network File System for Server role service, click Next.
5. On select server roles page, expand File and Storage Services, expand File and iSCSI Services. Select Server for NFS checkbox.
6. A new window will pop up, click on Add Features to include required features and management tools needed by the NFS server.
7. Make sure that the Server for NFS role service is selected. Click Next.
8. On select features, click Next.
9. Click Install and complete the installation process.
10. Click Close to finish the installation.
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.
12. Click on Shares. Right-click in the empty area and select New Share.
13. On Select the profile for this share, select NFS Share – Quick profile. Click Next.
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.
15. Verify share name, local path and remote path for NFS shared folder. Click Next.
16. Specify the Authentication methods as per your requirement.
17. To set up the NFS share permissions, click Add button.
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.
20. Using the same steps, you can add permission for other Hosts as well. Click Next.
21. Specify NTFS permission. As we are just testing NFS sharing, we are going with default permission. Click Next.
22. Review the selections, click on the Create button.
23. Click on the close button after verifying the successful creation of the NFS shared folder.
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.
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.
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.
27. Type command:
Syntax: mount -t nfs / /
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
28. Verify the content of the text file which we have created earlier on the NFS server.
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
Обзор NFS Network File System overview
Область применения: Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 Applies to: Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
В этом разделе описывается служба роли сетевой файловой системы и компоненты, входящие в состав роли сервера файловых служб и службы хранилища в Windows Server. This topic describes the Network File System role service and features included with the File and Storage Services server role in Windows Server. Сетевая файловая система (NFS) предоставляет решение для совместного использования файлов для предприятий с разнородными средами, включающими компьютеры Windows и не Windows. Network File System (NFS) provides a file sharing solution for enterprises that have heterogeneous environments that include both Windows and non-Windows computers.
Описание компонента Feature description
С помощью протокола NFS можно передавать файлы между компьютерами под управлением Windows и другими операционными системами, отличными от Windows, например Linux или UNIX. Using the NFS protocol, you can transfer files between computers running Windows and other non-Windows operating systems, such as Linux or UNIX.
NFS в Windows Server включает Server для NFS и Client для NFS. NFS in Windows Server includes Server for NFS and Client for NFS. Компьютер под управлением Windows Server может использовать сервер для NFS в качестве файлового сервера NFS для других клиентских компьютеров, отличных от Windows. A computer running Windows Server can use Server for NFS to act as a NFS file server for other non-Windows client computers. Клиент для NFS позволяет компьютеру под управлением Windows под управлением Windows Server получить доступ к файлам, хранящимся на NFS-сервере, отличном от Windows. Client for NFS allows a Windows-based computer running Windows Server to access files stored on a non-Windows NFS server.
Версии Windows и Windows Server Windows and Windows Server versions
Windows поддерживает несколько версий клиента NFS и сервера в зависимости от версии операционной системы и семейства. Windows supports multiple versions ofthe NFS client and server, depending on operating system version and family.
Операционные системы Operating Systems | Версии NFS Server NFS Server Versions | Версии клиента NFS NFS Client Versions |
---|---|---|
Windows 7, Windows 8.1, Windows 10 Windows 7, Windows 8.1, Windows 10 | Недоступно N/A | NFSv2, NFSv3 NFSv2, NFSv3 |
Windows Server 2008, Windows Server 2008 R2 Windows Server 2008, Windows Server 2008 R2 | NFSv2, NFSv3 NFSv2, NFSv3 | NFSv2, NFSv3 NFSv2, NFSv3 |
Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019 Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019 | NFSv2, NFSv3, Нфсв 4.1 NFSv2, NFSv3, NFSv4.1 | NFSv2, NFSv3 NFSv2, NFSv3 |
Практическое применение Practical applications
Ниже приведены некоторые способы использования NFS. Here are some ways you can use NFS:
- Используйте файловый сервер Windows NFS для предоставления многопротокольного доступа к одному и тому же файловому ресурсу по протоколам SMB и NFS с многоплатформенных клиентов. Use a Windows NFS file server to provide multi-protocol access to the same file share over both SMB and NFS protocols from multi-platform clients.
- Разверните файловый сервер Windows NFS в среде операционной системы, отличной от Windows, чтобы предоставить клиентским компьютерам, не являющимся клиентскими Windows, доступ к файловым ресурсам NFS. Deploy a Windows NFS file server in a predominantly non-Windows operating system environment to provide non-Windows client computers access to NFS file shares.
- Перенос приложений из одной операционной системы в другую путем хранения данных в общих файловых ресурсах, доступных через протоколы SMB и NFS. Migrate applications from one operating system to another by storing the data on file shares accessible through both SMB and NFS protocols.
Новые и измененные функции New and changed functionality
Новые и измененные функциональные возможности в сетевой файловой системе включают поддержку NFS версии 4,1 и Улучшенное развертывание и управляемость. New and changed functionality in Network File System includes support for the NFS version 4.1 and improved deployment and manageability. Дополнительные сведения о новых или измененных функциях в Windows Server 2012 см. в следующей таблице: For information about functionality that is new or changed in Windows Server 2012, review the following table:
Компонент или функция Feature/functionality | Новинка или обновление New or updated | Описание: Description |
---|---|---|
NFS версии 4,1 NFS version 4.1 | Оператор new New | Повышенная безопасность, производительность и совместимость по сравнению с NFS версии 3. Increased security, performance, and interoperability compared to NFS version 3. |
Инфраструктура NFS NFS infrastructure | Обновленные возможности Updated | Улучшает развертывание и управляемость и повышает безопасность. Improves deployment and manageability, and increases security. |
Постоянная доступность NFS версии 3 NFS version 3 continuous availability | Обновленные возможности Updated | Повышает постоянную доступность на клиентах NFS версии 3. Improves continuous availability on NFS version 3 clients. |
Улучшения развертывания и управляемости Deployment and manageability improvements | Обновленные возможности Updated | Позволяет легко развертывать NFS и управлять ими с помощью новых командлетов Windows PowerShell и нового поставщика WMI. Enables you to easily deploy and manage NFS with new Windows PowerShell cmdlets and a new WMI provider. |
NFS версии 4,1 NFS version 4.1
NFS версии 4,1 реализует все необходимые аспекты в дополнение к некоторым дополнительным аспектам RFC 5661: NFS version 4.1 implements all of the required aspects, in addition to some of the optional aspects, of RFC 5661:
- Файловая система, которая разделяет физическое и логическое пространство имен и СОВМЕСТИМА с NFS версии 3 и NFS версии 2. Pseudo file system, a file system that separates physical and logical namespace and is compatible with NFS version 3 and NFS version 2. Для экспортированной файловой системы, которая является частью псевдо-файловой системы, предоставляется псевдоним. An alias is provided for the exported file system, which is part of the pseudo file system.
- Составные удаленные вызовы процедур объединяют соответствующие операции и сокращают число бесед. Compound RPCs combine relevant operations and reduce chattiness.
- Сеансы и многосеансовая коммутация сеансов обеспечивают только одну семантику и обеспечивают постоянную доступность и лучшую производительность при использовании нескольких сетей между клиентами NFS 4,1 и сервером NFS. Sessions and session trunking enables just one semantic and allows continuous availability and better performance while utilizing multiple networks between NFS 4.1 clients and the NFS Server.
Инфраструктура NFS NFS infrastructure
Улучшения общей инфраструктуры NFS в Windows Server 2012 описаны ниже. Improvements to the overall NFS infrastructure in Windows Server 2012 are detailed below:
- Инфраструктура транспорта /External (RPC) , используемая сетевым протоколом Winsock, доступна как для сервера NFS, так и для клиента для NFS. The Remote Procedure Call (RPC)/External Data Representation (XDR) transport infrastructure, powered by the WinSock network protocol, is available for both Server for NFS and Client for NFS. Это заменяет интерфейс TDI, обеспечивает лучшую поддержку и обеспечивает лучшую масштабируемость и масштабирование на стороне приема (RSS). This replaces Transport Device Interface (TDI), offers better support, and provides better scalability and Receive Side Scaling (RSS).
- Функция мультиплексора RPC-портов является удобной для брандмауэра (меньше портов для управления) и УПРОЩАЕТ развертывание NFS. The RPC port multiplexer feature is firewall-friendly (less ports to manage) and simplifies deployment of NFS.
- Автоматически настроенные кэши и пулы потоков являются возможностями управления ресурсами в новой инфраструктуре RPC/XDR, которая является динамической, автоматически настраивает кэши и пулы потоков на основе рабочей нагрузки. Auto-tuned caches and thread pools are resource management capabilities of the new RPC/XDR infrastructure that are dynamic, automatically tuning caches and thread pools based on workload. Это полностью удаляет предоставляя, который участвует во время настройки параметров, обеспечивая оптимальную производительность сразу после развертывания NFS. This completely removes the guesswork involved when tuning parameters, providing optimal performance as soon as NFS is deployed.
- Новые варианты реализации и проверки подлинности Kerberos с добавлением поддержки Kerberos (Krb5p) и существующих параметров проверки подлинности krb5 и krb5i. New Kerberos privacy implementation and authentication options with the addition of Kerberos privacy (Krb5p) support along with the existing krb5 and krb5i authentication options.
- Сопоставление удостоверений командлеты модуля Windows PowerShell упрощают управление сопоставлением удостоверений, настройку службы Active Directory облегченного доступа к каталогам (AD LDS) и настройку passwd и неструктурированных файлов UNIX и Linux. Identity Mapping Windows PowerShell module cmdlets make it easier to manage identity mapping, configure Active Directory Lightweight Directory Services (AD LDS), and set up UNIX and Linux passwd and flat files.
- Точка подключения тома позволяет получить доступ к томам, подключенным к общему ресурсу NFS, с помощью nfs версии 4,1. Volume mount point lets you access volumes mounted under an NFS share with NFS version 4.1.
- Функция мультиплексирования портов поддерживает МУЛЬТИПЛЕКСОР порта RPC (порт 2049), который является удобным для брандмауэра и УПРОЩАЕТ развертывание NFS. The Port Multiplexing feature supports the RPC port multiplexer (port 2049), which is firewall-friendly and simplifies NFS deployment.
Постоянная доступность NFS версии 3 NFS version 3 continuous availability
Клиенты NFS версии 3 могут использовать быстрые и прозрачные плановые отработки отказа с большей доступностью и сокращением времени простоя. NFS version 3 clients can have fast and transparent planned failovers with more availability and reduced downtime. Процесс отработки отказа выполняется быстрее для клиентов NFS версии 3, поскольку: The failover process is faster for NFS version 3 clients because:
- Инфраструктура кластеризации теперь позволяет по одному ресурсу на сетевое имя, а не по одному ресурсу на общий ресурс, что значительно повышает время отработки отказа ресурсов. The clustering infrastructure now allows one resource per network name instead of one resource per share, which significantly improves resources’ failover time.
- Пути отработки отказа на сервере NFS настраиваются для повышения производительности. Failover paths within an NFS server are tuned for better performance.
- Регистрация с подстановочными знаками на NFS-сервере больше не требуется, а отработка отказа выполняется более тонко. Wildcard registration in an NFS server is no longer required, and the failovers are more fine-tuned.
- Уведомления сетевых монитор состояния (NSM) отправляются после отработки отказа, и клиентам больше не нужно ждать, пока истечет время ожидания TCP для повторного подключения к серверу, на который выполнен переход. Network Status Monitor (NSM) notifications are sent out after a failover process, and clients no longer need to wait for TCP timeouts to reconnect to the failed over server.
Обратите внимание, что сервер для NFS поддерживает прозрачную отработку отказа только при запуске вручную, обычно во время планового обслуживания. Note that Server for NFS supports transparent failover only when manually initiated, typically during planned maintenance. При незапланированной отработке отказа клиенты NFS теряют свои подключения. If an unplanned failover occurs, NFS clients lose their connections. Сервер для NFS также не имеет интеграции с фильтром ключей возобновления. Server for NFS also doesn’t have any integration with the Resume Key filter. Это означает, что если локальное приложение или сеанс SMB пытается получить доступ к тому же файлу, что и клиент NFS, сразу после плановой отработки отказа, то клиент NFS может потерять свои подключения (прозрачная отработка отказа не будет выполнена). This means that if a local app or SMB session attempts to access the same file that an NFS client is accessing immediately after a planned failover, the NFS client might lose its connections (transparent failover wouldn’t succeed).
Улучшения развертывания и управляемости Deployment and manageability improvements
Развертывание и управление NFS улучшены следующими способами. Deploying and managing NFS has improved in the following ways:
- Более 40 новых командлетов Windows PowerShell упрощают настройку файловых ресурсов NFS и управление ими. Over forty new Windows PowerShell cmdlets make it easier to configure and manage NFS file shares. Дополнительные сведения см. в разделе командлеты NFS в Windows PowerShell. For more information, see NFS Cmdlets in Windows PowerShell.
- Сопоставление удостоверений улучшено с помощью локального хранилища сопоставления неструктурированных файлов и новых командлетов Windows PowerShell для настройки сопоставления удостоверений. Identity mapping is improved with a local flat file mapping store and new Windows PowerShell cmdlets for configuring identity mapping.
- Диспетчер сервера графический пользовательский интерфейс проще в использовании. The Server Manager graphical user interface is easier to use.
- Новый поставщик WMI версии 2 доступен для упрощения управления. The new WMI version 2 provider is available for easier management.
- Мультиплексор портов RPC (порт 2049) является удобным для брандмауэра и упрощает развертывание NFS. The RPC port multiplexer (port 2049) is firewall-friendly and simplifies deployment of NFS.
Сведения о диспетчере сервера Server Manager information
В диспетчер сервера или более новом центре администрирования Windows — используйте мастер добавления ролей и компонентов, чтобы добавить службу роли сервера для NFS (в файле и роли служб iSCSI). In Server Manager — or the newer Windows Admin Center — use the Add Roles and Features Wizard to add the Server for NFS role service (under the File and iSCSI Services role). Общую информацию об установке компонентов см. в разделе Установка и удаление ролей, служб ролей или компонентов. For general information about installing features, see Install or Uninstall Roles, Role Services, or Features. Средства сервера для NFS включают оснастку «службы для сетевой файловой системы» MMC для управления сервером для NFS и клиентом для компонентов NFS. Server for NFS tools include the Services for Network File System MMC snap-in to manage the Server for NFS and Client for NFS components. С помощью оснастки можно управлять компонентами сервера для NFS, установленными на компьютере. Using the snap-in, you can manage the Server for NFS components installed on the computer. Сервер для NFS также содержит несколько средств администрирования командной строки Windows: Server for NFS also contains several Windows command-line administration tools:
- Подключение подключает удаленный общий ресурс NFS (также известный как экспорт) локально и сопоставляет его с буквой локального диска на клиентском компьютере Windows. Mount mounts a remote NFS share (also known as an export) locally and maps it to a local drive letter on the Windows client computer.
- Nfsadmin управляет параметрами конфигурации сервера для NFS и клиента для компонентов NFS. Nfsadmin manages configuration settings of the Server for NFS and Client for NFS components.
- Нфсшаре настраивает параметры общего ресурса NFS для общих папок с помощью сервера для NFS. Nfsshare configures NFS share settings for folders that are shared using Server for NFS.
- Нфсстат отображает или сбрасывает статистику вызовов, полученных сервером для NFS. Nfsstat displays or resets statistics of calls received by Server for NFS.
- Шовмаунт Отображает подключенные файловые системы, экспортированные сервером для NFS. Showmount displays mounted file systems exported by Server for NFS.
- Umount удаляет диски, подключенные к NFS. Umount removes NFS-mounted drives.
В NFS в Windows Server 2012 появился модуль NFS для Windows PowerShell с несколькими новыми командлетами специально для NFS. NFS in Windows Server 2012 introduces the NFS module for Windows PowerShell with several new cmdlets specifically for NFS. Эти командлеты предоставляют простой способ автоматизации задач управления NFS. These cmdlets provide an easy way to automate NFS management tasks. Дополнительные сведения см. в разделе командлеты NFS в Windows PowerShell. For more information, see NFS cmdlets in Windows PowerShell.
Дополнительные сведения Additional information
В следующей таблице приведены дополнительные ресурсы для оценки NFS. The following table provides additional resources for evaluating NFS.