Меню Рубрики

Mount windows share nfs

Подключаем NFS шару в Windows Server 2012 R2

Сегодня мы разберемся, как установить и настроить клиент NFS (Network File System) в Windows Server 2012 R2 / Windows 8. Итак, чтобы подключить каталог (шару) с NFS сервера в Windows Server 2012 R2 / Win 8, нужно, как и в предыдущих версиях Windows, установить отдельный компонент — клиент NFS (Client for NFS). Дополнительно, для возможности управления настройками NFS подключения, можно установить компонент служб NFS (Services for Network File System).

Клиент NFS входит в состав ОС Microsoft, начиная с Windows 7. В Windows 2012 / 8 клиент NFS получил небольшие изменения. Теперь NFS клиент поддерживает аутентификацию по протоколу Krb5p — Kerberos версии 5 (в дополнение к Krb5 и Krb5i, поддержка которых появилась еще в Windows 7), поддерживаются большие NFS пакеты – до 1024KB (в Win 7 максимальный размер пакета 32KB)

Клиент NFS можно установить через GUI или с помощью Powershell. Для установки в графическом режиме, откройте консоль Server Manager и выберите компонент (Features) под названием Client for NFS.

По умолчанию вместе с этим компонентом не устанавливается графическая консоль управления NFS, чтобы исправить это, установим опцию Services for Network File System Management Tools в разделе Remote Server Administration Tools -> Role Administration Tools -> File Services Tools.

Для установки NFS-клиента в Windows 8 нужно активировать компонент Services for NFS ->Client for NFS, через установку/удаление компонентов (Turn Windows features on or off) в Панели управления (Control Panel -> Programs -> Programs and Features).

Все перечисленные выше компоненты системы можно установить всего одной командой Powershell:

После окончания установки, запустите консоль Services for Network File System Managemen и откройте окно свойств NFS клиента (Client for NFS).

В настройках NFS клиента можно задать:

  • Используемый транспортный протокол (Transport protocols) – по умолчанию TCP+UDP
  • Тип монтирования NFS шар: hard или soft
  • На вкладке File Permissions указываются дефолтные права для создаваемых папок и файлов на NFS шарах
  • На вкладке Security указываются протоколы аутентификации, с помощью которых можно аутентифицироваться на NFS сервере

После настройки установки, администраторы смогут смонтировать NFS каталог с помощью команды mount:

В этом примере мы смонтировали под буквой Z: каталог NFS, расположенный на сервере lx01.abc.lab.

После монтирования, подключенный таким образом каталог на NFS сервере доступен в системе как отдельный диск с буквой Z:\ .

Смонтировать NFS шару можно и с помощью Powershell:

Отключить смонтированный каталог можно так:

Источник

How to Mount an NFS Share Using a Windows 10 Machine

Mounting an NFS (Network File System) share using a Unix-like operating system is pretty straight forward. But how do you mount an NFS share of a UNIX system from a Windows 10 machine? Keep reading to find out how.

NFS Only Works in Windows 10 Enterprise

Update 2012-04-20 – These instructions should now work on Windows 10 Pro (Version 10.0.14393 and above) as mentioned by EyeDocGeek in the comments.

This tutorial only applies to the enterprise version of Windows 10 because it is the only version which includes the Services for NFS feature. If you don’t have the enterprise version of Windows, then you might be better off exposing your share using Samba which should work on all versions of Windows.

With that said let’s install the Services for NFS feature and mount an NFS share.

Install the NFS Client (Services for NFS)

The first thing we need to do is install the NFS Client which can be done by following the steps below:

Step 1: Open Programs and Features.

Step 2: Click Turn Windows features on or off.

Step 3: Scroll down and check the option Services for NFS, then click OK.

Step 4: Once installed, click Close and exit back to the desktop.

Enable Write Permissions for the Anonymous User

With the default options you will only have read permissions when mounting a UNIX share using the anonymous user. We can give the anonymous user write permissions by changing the UID and GID that it uses to mount the share.

The image below shows the a share mounted using the default settings.

To change the UID and GID we need to make a simple change to the Windows registry by performing the following steps:

  1. Open regedit by typing it in the search box end pressing Enter.
  2. Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default.
  3. Create a new New DWORD (32-bit) Value inside the Default folder named AnonymousUid and assign the UID found on the UNIX directory as shared by the NFS system.
  4. Create a new New DWORD (32-bit) Value inside the Default folder named AnonymousGid and assign the GID found on the UNIX directory as shared by the NFS system.
  5. Restart the NFS client or reboot the machine to apply the changes.

The output of the mount command should now look like this:

Notice the 0 value applied to the UID and GID. This means the share is mounted using the root user.

How to Mount an NFS Share

Assuming your NAS device is on the same network as your Windows machine and the IP address of the device is 10.1.1.211, the following command will mount a share on the NFS system at /mnt/vms.

The share is now mounted and we can access the data by navigating to the Z: drive.

That’s it, we can now write to the NAS device. Although, I did notice that trying to open the share for the first time takes a long time.

Источник

How To Mount NFS Share In Linux and Windows?

Network File System or NFS is a network-based filesystem protocol which is mainly used to share files and folders over the network. NFS is a UNIX based technology but can be used by most of the operating systems like Linux, Ubuntu, Debian, Kali, Mint, Fedora, CentOS, RedHat and Windows operating systems Windows 7, Windows 8, Windows 10, Windows Server 2008, Windows Server 2012, Windows Server 2016.

Install NFS Server

NFS packages mainly divided into two parts. First is the server side packages which will install related kernel modules and server tools.

Ubuntu, Debian, Mint, Kali Client Packages

Fedora, CentOS, Fedora Client Packages

Ubuntu, Debian, Mint, Kali Server Packages

After the installation is complete the nfs-server service will be also created automatically.

Fedora, CentOS, Fedora Server Packages

Check NFS Service Status

As the NFS shares will be served over nfs-server we need to the if it is working. We will use systemctl status command with the nfs-server service name.

Check NfS Service Status

We can see that the service is active and working properly.

Start NFS Service

If the service is not started or stopped in any way we need to start the nfs-server service. We will use systemctl start command with the nfs-server service name like below.

Create NFS Share

NFS main configuration is stored in the /etc/exports file. Each share is created line by line. For example, if we want to share /mnt with the IP address 192.168.10.10 we will use the following configuration.

But generally, we share the files and folders with everyone who has access to the NFS server. We can use the following configuration to share everyone.

Enable Exports

After creating the share configuration we need to refresh the NFS table where the shares are stored. We can simply use exportfs command with the -a option which will add current configuration to the NFS table.

Mount NFS Share For Linux

We can use mount command in order to mount NFS share. We will specify the filesystem type as nfs to the mount command with the -t option like below. The server IP address is 192.168.142.144 and share is /mnt . We will mount to the /home/ismail/poftut1 .

List NFS Mounts

After mounting the NFS share we can check it by listing the NFS mount. We will use mount command and filter NFS shares with the grep command like below.

List NFS Mounts

Unmount NFS Share For Linux

We can unmount already mounted NFS shares with the umount command. We will just specify the mount path to the umount command with the sudo command like below.

Mount NFS Share For Windows

First, we will enable NFS modules or features on Windows operating systems. Open Start > Control Panel > Programs. Select Turn Windows Features on or off. Select Services for NFS. Click OK.

We can mount NFS shares in Windows operating systems too. We will use mount command. We will also provide nolock option and other parameters like remote NFS server IP address and local drive which is Z in this case.

Alternatively, we can use net use command which can also mount NFS shares. We will provide the partition name which is z and remote NFS server.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Mount vhdx windows 7
  • Mount ssh disk windows
  • Mount nfs windows server 2012
  • Mount network folder windows
  • Mount iso windows 2008