Настройка dfs репликации windows server 2019

Learn how to Configure DFS to optimize the hierarchy of shared folders and streamline administration and the use of shared resources.

What Is DFS Replication and How to Configure It?

File shares are used in organizations to allow users to access and exchange files. If the number of file shares is large, it may be difficult to manage them because mapping many shared resources to each user’s computer takes time and effort. If the configuration of one file share changes, you need to update shared drive mappings for all users using this share. In this case, DFS can help you optimize the hierarchy of shared folders to streamline administration and the use of shared resources. This blog post explains DFS configuration and how to set up DFS replication in Windows Server 2019.

Table of Contents

  • What Is DFS and How Does DFS Work?
  • How to Set Up DFS in Your Windows Environment
  • DFS Namespace Setup
  • How to Configure DFS Replication

Before we start

In addition to replication, data stored on your file shares should be backed up and protected for operational recovery. NAKIVO Backup & Replication is a universal data protection solution to protect data on SMB and CIFS file shares, including on NAS, as well as data in virtual, cloud and physical environments. 

What Is DFS and How It Works

A Distributed File System (DFS) is a logical organization that transparently groups existing file shares on multiple servers into a structured hierarchy. This hierarchy can be accessed using a single share on a DFS server.
A DFS file share can be replicated across multiple file servers in different locations to optimize server load and increase access speed to shared files. In this case, a user can access a file share on a server that is closest to them. DFS is intended to simplify access to shared files.

Using a DFS namespace server

DFS uses the Server Message Block (SMB) protocol, which is also known as the Common Internet File System (CIFS). Microsoft’s implementation of DFS doesn’t work with other file sharing protocols like NFS or HDFS. However, you can connect multiple SMB shares configured on NAS devices and Linux machines using Samba to your DFS server running on Windows Server. DFS consists of server and client components.

You can configure one DFS share that includes multiple file shares and connect users to this single file share using a unified namespace. When users connect to this file share using a single path, they see a tree structure of shared folders (as they are subfolders of the main share) and can access all needed file shares transparently. Underlying physical file servers hosting file shares are abstracted from the namespace used to access shares. DFS namespaces and DFS replication are the two main components used for DFS functioning.

What is a DFS namespace?

A DFS namespace is a virtual folder that contains links to shared folders stored on different file servers. DFS namespaces can be organized in different ways depending on business needs. They can be organized by geographical location, organization units, a combination of multiple parameters, etc. You can configure multiple namespaces on a DFS server. A DFS namespace can be standalone or domain-based.

DFS namespace and folder targets

  • A standalone DFS namespace stores configuration information and metadata locally on a root server in the system registry. A path to access the root namespace is started with the root server name. A standalone DFS namespace is located only on one server and is not fault-tolerant. If a root server is unavailable, the entire DFS namespace is unavailable. You can use this option if you don’t have an Active Directory domain configured (when using a Workgroup).
  • A domain-based DFS namespace stores configuration in Active Directory. A path to access a root namespace starts with the domain name. You can store a domain-based DFS namespace on multiple servers to increase the namespace availability. This approach allows you to provide fault tolerance and load balancing across servers. Using domain-based DFS namespaces is recommended.

A namespace consists of the root, links (folders), and folder targets.

  • A namespace root is a starting point of a DFS namespace tree. Depending on the type, a namespace can look like this:

\ServerNameRootName (a standalone namespace)

\DomainNameRootName (a domain-based namespace)

  • A namespace server is a physical server (or a VM) that hosts a DFS namespace. A namespace server can be a regular server with the DFS role installed or a domain controller.
  • A folder is a link in a DFS namespace that points to a target folder containing content for user access. There are also folders without targets used for organizing the structure.
  • A folder target is a link to a shared file resource located on a particular file server and available via the UNC path (Universal Naming Convention). A folder target is associated with the folder in a DFS namespace, for example, \FS2TestShare on the FS2 server. A folder target is what users need to access files.

One folder target can be a link to a single folder or multiple folders (if these folders are located on two different servers and are synchronized/replicated with each other). For example, a user needs to access \DFS-server01TestShareDoc but depending on the user’s location, the user is redirected to a shared folder \FS01Doc or \FS02Doc.

The DFS tree structure includes the following components:

  • DFS root, which is a DFS server on which the DFS service is running
  • DFS links, which are links pointing to network shares used in DFS
  • DFS targets, which are real network shares to which DFS links point

What is DFS replication?

DFS replication is a feature used to duplicate existing data by replicating copies of that data to multiple locations. Physical file shares can be synchronized with each other at two or more locations.

An important feature of DFS replication is that the replication of a file starts only after that file has been closed. For this reason, DFS replication is not suitable for replicating databases, given that databases have files opened during the operation of a database management system. DFS replication supports multi-master replication technology, and any member of a replication group can change data that is then replicated.

A DFS replication group is a group of servers participating in the replication of one or multiple replication folders. A replicated folder is synchronized between all members of the replication group.

DFS replication group

DFS replication uses a special Remote Differential Compression algorithm that allows DFS to detect changes and copy only changed blocks of files instead of copying all data. This approach allows you to save time and reduce replication traffic over the network.

DFS replication is performed asynchronously. There can be a delay between writing changes to the source location and replicating those changes to the target location.

DFS Replication topologies

There are two main DFS replication topologies:

  • Hub and spoke. This topology requires at least three replication members: one which acts as a hub and two others act as spokes. This technique is useful if you have a central source originating data (hub) and you need to replicate this data to multiple locations (spokes).
  • Full mesh. Each member of a replication group replicates data to each group member. Use this technique if you have 10 members or less in a replication group.

What are the requirements for DFS?

The main requirement is using Windows Server 2008 DataCenter or Enterprise editions, Windows Server 2012, or a newer Windows Server version. It is better to use Windows Server 2016 or Windows Server 2019 nowadays.

NTFS must be a file system to store shared files on Windows Server hosts.

If you use domain-based namespaces, all servers of a DFS replication group must belong to one Active Directory forest.

How to Set Up DFS in Your Windows Environment

You need to prepare at least two servers. In this example, we use two machines running Windows Server 2019, one of which is an Active Directory domain controller:

  • Server01-dc.domain1.local is a domain controller.
  • Server02.domain1.local is a domain member.

This is because configuring DFS in a domain environment has advantages compared to Workgroup, as explained above. The domain name is domain1.local in our case. If you use a domain, don’t forget to configure Active Directory backup.

Enable the DFS roles

First of all, you need to enable the DFS roles in Windows Server 2019.

  1. Open Server Manager.
  2. Click Add Roles and Features in Server Manager.
  3. Select Role-based or featured-based installation in the Installation type screen of the Add Roles and Features wizard.
  4. In the Server Selection screen, make sure your current server (which is a domain controller in our case) is selected. Click Next at each step of the wizard to continue.
  5. Select server roles. Select DFS Namespaces and DFS Replication, as explained in the screenshot below.

Setting up DFS in Windows Server 2019 – installing DFS roles

  1. In the Features screen, you can leave settings as is.
  2. Check your configuration in the confirmation screen and if everything is correct, click Install.
  3. Wait for a while until the installation process is finished and then close the window.

DFS Namespace Setup

Create at least one shared folder on any server that is a domain member. In this example, we create a shared folder on our domain controller. The folder name is shared01 (D:DATAshared01).

Creating a shared folder

  1. Right-click a folder and, in the context menu, hit Properties.
  2. On the Sharing tab of the folder properties window, click Share.
  3. Share the folder with Domain users and set permissions. We use Read/Write permissions in this example.
  4. Click Share to finish. Then you can close the network sharing options window.

Sharing a folder in Windows Server 2019 to set up DFS

Now the share is available at this address:

\server01-dcshared01

Creating a DFS namespace

Let’s create a DFS namespace to link shared folders in a namespace.

  • Press Win+R and run dfsmgmt.msc to open the DFS Management window. You can also run this command in the Windows command line (CMD).

As an alternative, you can click Start > Windows Administrative Tools > DFS Management.

  • In the DFS Management section, click New Namespace.

How to configure DFS namespaces

  • The New Namespace Wizard opens in a new window.
  1. Namespace Server. Enter a server name. If you are not sure that the name is correct, click Browse, enter a server name and click Check Names. In this example, we enter the name of our domain controller (server01-dc). Click Next at each step of the wizard to continue.

Adding a DFS namespace server

  1. Namespace Name and Settings. Enter a name for a namespace, for example, DFS-01. Click Edit Settings.

Entering a name for a DFS namespace

Pay attention to the local path of a shared folder. Change this path if needed. We use the default path in our example (C:DFSRootsDFS-01).

  1. You need to configure access permissions for network users. Click Use custom permissions and hit Customize.

Configuring access permissions for a shared folder on a DFS namespace server

  1. We grant all permissions for domain users (Full Control). Click Add, select Domain Users, select the appropriate checkboxes, and hit OK to save settings.

Configuring permissions for a shared folder

  1. Namespace type. Select the type of namespace to create. We select Domain-based namespace and select the Enable Windows Server 2008 mode checkbox. Select this checkbox if the functional level of your domain is Windows Server 2008 when you use Windows Server 2016 or Windows Server 2019 for better compatibility.

It is recommended that you use a Domain-based namespace due to advantages such as high DFS namespace availability by using multiple namespace servers and transferring namespaces to other servers.

Selecting a domain-based namespace for DFS configuration

  1. Review Settings. Review settings and, if everything is correct, click Create.

Reviewing configuration to finish DFS namespace setup

  1. Confirmation. The window view in case of success is displayed in the screenshot below. The namespace creation has finished. Click Close.

A DFS namespace has been created

Adding a new folder to a namespace

Now we need to add a new folder into the existing namespace. We are adding a folder on the same server, which is a domain controller, but this method is applicable for all servers within a domain.

  1. Open the DFS management window by running dfsmgmt.msc as we did before. Perform the following actions in the DFS management window.
  2. In the left pane, expand a namespace tree and select a namespace (\domain1.localDFS-01 in our case).
  3. In the right pane (the Actions pane), click New Folder.
  4. In the New Folder window, enter a folder name, for example, Test-Folder to link the DFS folder and a shared folder created before. Click Add.

Adding a new folder into a DFS namespace

  1. Enter the path to the existing folder. We use \server01-dcshared01 in this example. You can click Browse and select a folder. Click OK to save the path to the folder target.

Adding a folder target

The folder target has been added.

  1. Click OK to save settings and close the New Folder window.

A folder target has been added

Now you can access the shared folder by entering the network address in the address bar of Windows Explorer:

\server01-dcdfs-01Test-Folder

You should enter a path in the format:

\DomainNameDFS-NameSpace

Accessing a shared folder in Windows Explorer

We need to configure the second server to replicate data. The name of the second server is Server02 and this server is added to the domain1.local domain in this example. Add your second server to a domain if you have not done this operation before.
Install the DFS roles, as we did for the first server. As an alternative method, you can use PowerShell instead of the Add Roles wizard. Run these two commands in PowerShell to install DFS replication and DFS namespace roles.

Install-WindowsFeature -name “FS-DFS-Replication” -IncludeManagementTools

Install-WindowsFeature -name “FS-DFS-Namespace” -IncludeManagementTools

First of all, we need to install the DFS Replication role on the second server.

How to set up DFS roles in PowerShell

Create a folder for replicated data, for example, D:Replication

We are going to use this folder to replicate data from the first folder created on the first server before.

Share this folder (D:Replication) on the second server and configure access permissions the same way as for the previous shared folder. In this example, we share the folder with Domain Users and grant Read/Write permissions.

Sharing a folder on the second server

The network path is \server02replication in this example after sharing this folder. To check the network path to the folder, you can right-click the folder name and open the Sharing tab.

Let’s go back to the domain controller (server01-dc) and open the DFS Management window.

In the left pane of the DFS Management window, expand the tree and select the namespace created before (Test-Folder in this case).

Click Add Folder Target in the Actions pane located in the top right corner of the window.

The New Folder Target window appears. Enter the network path of the folder that was created on the second server before:

\Server02Replication

Click OK to save settings and close the window.

Adding a new folder target to configure Windows DFS replication

A notification message is displayed:

A replication group can be used to keep these folder targets synchronized. Do you want to create a replication group?

Click Yes.

A notification message is displayed when creating a DFS replication group

Wait until the configuration process is finished.

As a result, you should see the Replicate Folder Wizard window. Perform the next steps in the wizard window.

Check the replication group name and replicated folder name. Click Next to continue.

Entering a replication group name and replication folder name

Check folder paths in the Replication Eligibility screen.

Checking paths of shared folders

Select the primary member from the drop-down list. In this example, the primary member is Server01-dc. Data from the primary member is replicated to other folders that are a part of the DFS namespace.

Selecting a primary member when configuring DFS replication

Select the topology of connections for replication.

Full mesh is the recommended option when using a DFS replication group with less than ten servers. We use Full mesh to replicate changes made on one server to other servers.

The No Topology option can be used if you want to create a custom topology after finishing the wizard.

The Hub and spoke option is inactive (grayed out) because we use less than three servers.

Selecting a full mesh topology to configure DFS replication

Configure replication group schedule and bandwidth. There are two options:

  • Replicate continuously using the specified bandwidth. Replication is performed as soon as possible. You can allocate bandwidth. Continuous replication of data that changes extensively can consume a lot of network bandwidth. To avoid a negative impact on other processes using the network, you can limit bandwidth for DFS replication. Keep in mind that hard disk load can be high.
  • Replicate during the specified days and times. You can configure the schedule to perform DFS replication at the custom date and time. You can use this option if you don’t need to always have the last version of replicated data in target folders.

We select the first option in our example.

Setting up DFS replication group schedule

Review settings for your DFS replication group. If everything is correct, click Create.

Reviewing settings for a DFS replication group before finishing configuration

View the DFS replication configuration status on the Confirmation screen. You should see the Success status for all tasks as displayed on the screenshot below. Click Close to close the wizard window.

A DFS replication group has been created successfully

A notification message about the replication delay is displayed. Read the message and hit OK.

A notification message about DFS replication delay

DFS replication has been configured. Open a shared folder from which data must be replicated initially. Write a file to that network folder and check whether the new data is replicated to the second folder on another server. Don’t forget that opened files are not replicated until they are closed after saving changes to a disk. In a few moments, you should see a file-replica in the target folder.

Using filters for DFS Replication

Use file filters to select the file types you don’t want to replicate. Some applications can create temporary files and replicating them wastes network bandwidth, loads hard disk drives, consumes additional storage space in the target folder, and increases overall time to replicate data. You can exclude the appropriate file types from DFS replication by using filters.

To configure filters, perform the following steps in the DFS Management window:

  1. Expand the Replication tree in the navigation pane and select the needed DFS replication group folder name (domain1.localdfs-01Test-folder in our case).
  2. Select the Replicated Folders tab.
  3. Select the needed folder, right-click the folder name and hit Properties. Alternatively, you can select the folder and click Properties in the Actions pane.
  4. Set the filtered file types by using masks in the folder properties window. In this example, files matching the rule are excluded from replication:

~*, *.bak, *.tmp

You can also filter subfolders, for example, exclude Temp subfolders from DFS replication.

Configuring DFS replication filters

Staging location

There can be a conflict when two or more users save changes to a file before these changes are replicated. The most recent changes have precedence for replication. Older versions of changed files are moved to the Conflict or Deleted folder. This issue can happen when replication speed is low and the file size is large (amount of changes is high) when the amount of time to transfer changed data is lower than the interval between writing changes to the file by users.

Staging folders act as a cache for new and changed files that are ready to be replicated from source folders to target folders. The staging location is intended for files that exceed a certain file size. Staging is used as a queue to store files that must be replicated and ensure that changes can be replicated without worrying about changes to them during the transfer process.

Another aspect of configuring staging folders is performance optimization. DFS replication can consume additional CPU and disk resources, slow down and even stop if the staging quota is too small for your tasks. The recommended size of the staging quota is equal to the size of the 32 largest files in the replication folder.

You can edit staging folder properties for DFS Replication in the DFS Management window:

  1. Select a replication group in the left pane of the DFS Management window.
  2. Select the Memberships tab.
  3. Select the needed replication folder, right-click the folder, and hit Properties.
  4. Select the Staging tab in the Properties window.
  5. Edit the staging path and quota according to your needs.

Configuring DFS staging location

Saved changes are not applied immediately. New staging settings must be replicated across all DFS servers within a domain. Time depends on Active Directory Domain Services replication latency and the polling interval of servers (5 minutes or more). Server reboot is not required.

DFS Replication vs. Backup

Don’t confuse DFS Replication of data in shared folders and data backup. DFS replication makes copies of data on different servers, but if unwanted changes are written to a file on one server, these changes are replicated to other servers. As a result, you don’t have a recovery point because the file has been overwritten with unwanted changes on all servers and you can use it for recovery in case of failure. This threat is present in case of a ransomware attack.

Use NAKIVO Backup & Replication to protect data stored on your physical Windows Server machines including data stored in shared folders. The product also supports Hyper-V VM backup and VMware VM backup at the host level for effective protection.

Download the free trial version and protect data in your environment.

Conclusion

Distributed File System (DFS) can significantly simplify shared resources management for administrators and make accessing shared folders more convenient for end-users. DFS makes transparent links to shared folders located on different servers. DFS namespaces and DFS replication are two main features that you can configure in the DFS Management window after installing the appropriate Windows server roles. Opt for configuring DFS in a domain environment rather than in a Workgroup environment because there are many advantages, such as high availability and flexibility in an Active Directory domain.

In this article, we will install and configure DFS (Distributed File System) Replication group in Windows Server 2019. We will configure DFS replication for the existing namespace which we have created in last article.

Check out the previous post on How to Install and Configure DFS Namespace in Windows Server 2019.

Overview:

DFS Replication is a role service in Windows Server 2019 that you to replicate folders between multiple servers.

DFS Replication uses a compression algorithm known as remote differential compression (RDC). RDC detects the changes to the data and enables DFS Replication to replicate only the changed file blocks instead of the entire file. 

Virtual Lab Setup:

  • WS2K19-DC01: Active Directory Domain Controller with DNS role.
  • WS2K19-SRV02: DFS Namespace Server for mylab.local domain.
  • WS2K19-SRV01: Member Server for mylab.local domain.

Install the DFS Replication role:

1. Log in to the WS2K19-SRV01 server and open the Server Manager console.

1 Open Server Manager console

2. Click on Manage and select Add roles and features.

2 Click on Manage

3. Click on Next on Before you begin console.

3 Click Next on Before you begin console

4. Choose Role-based or Feature-based installation and click Next.

4 Choose Role-based Installation

5. Select your server on which you want to install the DFS replication server role. Click on Next.

5 Select local server to install DFS replication role

6. On select server role console, expand the File and Storage Services, expand File and iSCSI Services and select DFS Replication from the list.

6 Choose DFS replication role

7. Click on Add Features when prompted to install the Management tools.

7 Click on Add features required by DFS replication

8. Click on Next.

8 Click Next after selecting DFS replication role

9. On Select features console, click on Next to continue.

9 On Select Feature page click next

10. Click on Install and wait for the installation process to complete.

10 Click on Install to start the installation process

Note: We need to perform the same steps to install the DFS replication role on WS2K19-SRV02. 

In the previous post, we have created DFS namespace and added one DFS folder with a target path on the WS2K19-SRV02 server.

  • DFS Namespace Path: \mylab.localstore
  • DFS Folder Path: \mylab.localstoreTestData
  • Original Shared Folder Path: \WS2K19-SRV02TestUsersData
12 Verify DFS namespace and DFS folder exist

We will enable DFS replication for the TestData DFS folder.

Configure DFS Replication:

Before configuring replication, you need to add a network shared folder on the second DFS server.

On the WS2K19-SRV01 server, create a new shared folder with default NTFS permission on E: drive named TestUsersDatacopy. 

13 Check the Shared Folder path

11. From the Server Manager console, select DFS Management from the Tools menu.

11 Open DFS Management Console

12. In DFS Management console right-click on DFS folder (In our case, it will be TestData) and select Add Folder Target.

14 Add Folder Path to the DFS folder

13. Enter the name of the shared folder and click OK. In our example, the shared folder path will be \WS2K19-SRV01TestUsersDataCopy.

15 Select the shared folder path

14. Click on OK.

16 Click Ok to add another folder target path

15. For configuring replication, click Yes on the Replication page.

17 Click Yes to create a replication group

16. In the DFS Replication Configuration Wizard, verify the name of the replication group and the folder which we want to replicate. Click on Next.

18 Verify replication group name

17. Verify the shared folder paths on both servers. Click on Next.

19 Verify replication target folder path

18. Select the primary server on which we have stored the data initially. Click on Next.

20 Choose primary member for DFS replication

19. On the Topology Selection console, select the Full Mesh topology and click Next.

21 Choose replication topology

20. With DFS Replication, you can choose the replication schedule and the bandwidth you want to allocate to the DFS replication process. Leave the default setting and then click Next.

22 Setup DFS replication Schedule and Bandwidth

21. Review the settings and then click on Create.

23 Create DFS Replication Group

22. On the Confirmation page, click on Close to close the wizard.

24 Click on close to close the console

23. Here, we can verify that our new replication group is created. 

25 Verify DFS replication group is created

Test DFS Replication:

24. To test the replication between both servers, copy some data on the primary server (WS2K19-SRV02) and see the data should be on the secondary server (WS2K19-SRV01) as well.

26 Copy some data on primary server for testing purpose

25. Verify the data on Secondary Server (WS2K19-SRV01).

27 Verify the same data on secondary server

I hope this article will be helpful for you all. Thank you for reading.

Post Views: 3,314

DFS [https://docs.microsoft.com/ru-ru/windows-server/storage/dfs-namespaces/dfs-overview] делает общее пространство имён для подключения к файловым данным.

С помощью DFS системный администратор выстраивает общее дерево файловых ресурсов, которые хранятся на разных серверах. У пользователя будет только одно сетевое подключение, а не множество, и данные он будет получать с ближайшего к нему сервера (в распределённой сети).

В нашем случае есть файловые ресурсы \srv01-ftpinstall, \srv02-bdDocs, \srv-03-websprav, \srv04-krtkarta и ещё около 10ка. Крайне неудобно их использовать по отдельности, поэтому их желательно соединить (поместить) в одно целое, типа \srv05-ftpobmen.  

 Активируем роль Пространства имён DFS, открываем консоль Управление DFS. На разделе Пространства имён нажимаем правой кнопкой мыши, и в меню выбираем пункт Создать пространство имён. Далее в мастере настроек указываем сервер srv05-ftp, присваиваем имя obmen, определяемся с правами доступа (мы выбрали Администраторы имеют полный доступ; остальные – доступ для чтения), выбираем Доменное пространство имён и Далее->Создать. По умолчанию будет создана папка obmen в C:корни_DFS.

Теперь на созданном пространстве имён \srv05-ftpobmen нажимаем правой кнопкой мыши и выбираем пункт Создать папку, указываем путь к ней. После этого ко второй папке, третьей и так далее. В результате получится дерево папок (см. рис. 1) с доступом по одному сетевому имени к разным серверам. Проверяем сетевой доступ к этому ресурсу в проводнике и для сотрудников создаём всего одно сетевое подключение \srv-05-ftpobmen.

Рисунок 1. Пространство имён DFS.

Помимо настройки пространства имён DFS желательно позаботиться и об отказоустойчивости, а именно о резервных серверах и настройке репликации (DFS-R) [https://docs.microsoft.com/ru-ru/windows-server/storage/dfs-replication/dfsr-overview].

Рано или поздно системные администраторы задаются вопросом о децентрализованном хранении информации или хотя бы об объединении нескольких существующих файловых серверов в единый. Параллельно этому поднимается вопрос о безопасности хранимой информации. Относительно простым, менее затратным и популярным среди администраторов AD (Active Directory) является использование DFS. Рассмотрим что это и как настроить.

DFS — Distributed File System — распределенная файловая система. Является продуктом компании Microsoft, предназначенный для упрощения доступа  пользователей к файлам. Что примечательно, файлы могут быть разнесены территориально.

Выделяют два типа DFS:
1. Namespace DFS (Пространство имен DFS). Данный тип реализует виртуальное дерево, которое объединяет общие каталоги сети в единое пространство имен. Существует возможность настройки нескольких пространств имен.
2. Replication DFS (Репликация DFS) — репликация уже существующего каталога с отслеживанием содержимого и внесенных изменений.

Установка (DFS Installation)

Сразу заострим внимание, что установку, в рамках данного примера, будем выполнять на уже настроенный контроллер домена.

Открываем диспетчер серверов. В основной части окна кликаем по «Добавить роли и компоненты»:

В новом окне переходим к пункту «Тип установки», выбираем параметр «Установка ролей и компонентов», нажимаем кнопку «Далее»:

В обновленном окне выбираем текущий сервер и кликаем по кнопке «Далее»:

Следующим шагом, в списке доступных ролей находим «Файловые службы и службы хранилища» и раскрываем список, в котором необходимо отыскать «Файловые службы и службы iSCSI». Также раскрываем список параметров. Отмечаем галочками «Пространства имен DFS» и «Репликация DFS». В появившемся окне кликаем «Добавить компоненты». Нажимаем кнопку «Далее» несколько раз и дожидаемся окончания установки:

Создание пространства имен DFS

Перед тем, как приступить к созданию пространства имен DFS, необходимо создать хотя бы одну сетевую директорию на любом из серверов входящих в домен. В нашем случае будем использовать директорию созданную на том же контроллере домена.

Для того чтобы папка стала доступна из сети, кликаем по ней правой кнопкой мыши, в контекстном меню выбираем «Поделиться», затем «Отдельные люди»:

В поле ввода указываем «Пользователи домена», нажимаем кнопку «Добавить», затем «Поделиться»:

Общий доступ к папке готов. Кликаем по кнопке «Готово»:

Теперь сервер доступен по пути:
WINSERVER2019net_share

Создадим пространство имен DFS.

Для этого в меню «Пуск» выбираем «Средства администрирования Windows». Также можно через Панель управленияСистема и безопасностьАдминистрирование.

В открывшемся окне, выбираем «Управление DFS»:

В новом окне «Управление DFS», в правой части кликаем по «Новое пространство имен …»:

В окне мастера указываем имя сервера. Его можно отыскать как в окне, которое откроется при клике по кнопке «Обзор», так и в свойствах системы на вкладке «Имя компьютера». Нажимаем «Далее»:

Следующим шагом указываем имя пространства имен. В нашем случае, пусть будет «MyDFS». Нажимаем кнопку «Изменить настройки…». В новом окне следует обратить внимание на строку «Локальный путь общей папки», при необходимости измените его. В том же окне установим переключатель на значение «Использовать пользовательские разрешения» и кликаем кнопку «Настроить»:

В открывшемся окне разрешаем полный доступ для всех и нажимаем кнопку «OK»:

Окно изменения настроек закрываем кликом по кнопке «OK», в окне мастера нажимаем кнопку «Далее»:

На новом этапе выбора типа пространства имен устанавливаем переключатель на значение «Доменное пространство имен», нажимаем кнопку «Далее».

Внимательно просматриваем настройки. Все устраивает — нажимаем «Создать»:

В случае успеха мастер покажет следующее окно:

Нажимаем кнопку «Закрыть».

Добавляем новый каталог в существующее пространство имен

Смысла в проделанном выше нет, если не добавить каталоги к уже существующему пространству имен. В примере процесс будет выполнен на том же сервере, однако, метод применим ко всем серверам в домене.

В окне управления DFS, в левой его части, разворачиваем дерево управления DFS до существующего, кликаем по необходимому. В правой части окна, в разделе действий, выбираем «Создать папку…»:

В открывшемся окне «Создание папки» указываем имя, в нашем случае «Test» и нажимаем кнопку «Добавить»:

В новом окне необходимо добавить путь к существующей сетевой папке. Список доступных каталогов можно посмотреть кликнув по кнопк «Обзор…». По окончании, нажимаем «OK»:

Результат будет таким:

Нажимаем «OK».

Доступ к DFS можно получить из любой адресной строки (Пуск->Выполнить, или из адресной строки любой папки) по шаблону:
<доменное_имя_сервера><имя_пространства_имен_DFS>

Например:
laa.testMyDFS

Результат таков:

Настройка DFS-репликации

Для выполнения репликации данных необходимо добавить второй сервер в этот же домен и установить на нем роль сервера «Репликация DFS» с помощью диспетчера серверов:

На этом же сервере создаем папку и разрешаем общий доступ к ней. В эту папку будут реплицироваться данные из директории, расположенной на сервере контроллера домена:

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

Возвращаемся к контроллеру домена и развернутому на нем пространству имен DFS. Открываем уже знакомое из примеров выше окно «Управление DFS». В левой части окна, разворачиваем дерево до созданного пространства имен. В правой части окна выбираем «Добавить конечный объект папки…». В новом окне вводим адрес до общего каталога на другом сервер (который создали ранее). Нажимаем кнопку «OK»:

Система задаст вопрос желании создать группу репликации. Нажимаем кнопку «Да»:

Дожидаемся окончания хода выполнения. Итогом будет открытое окно «Мастера репликации папок». Необходимо проверить имя группы репликации, а также имя каталога, который будет реплицирован. Переходим к следующему шагу кликнув по кнопке «Далее»:

На данном этапе проверяем пути до сетевых каталогов и нажимаем «Далее»:

Следующим шагом предстоит выбрать основной узел из выпадающего списка. Это тот узел с которого данные будут реплицироваться. В случае с примером, основной член репликации сервер с именем WINSERV2016 — это сервер, на котором поднят контроллер доменов. Конкретный пример, лишний раз напоминает о необходимости определения понятных имен для серверов и прочих узлов сети. Нажимаем «Далее»:

Теперь предстоит выбрать топологию подключений между членами репликации. Выбираем доступную — «Полная сетка», однако если вы желаете создать свою топологию репликации позже, то выбирайте «Нет топологии». Нажимаем «Далее»:

Настройка подходит к концу и на этом шаге следует определиться с периодичностью репликации данных. Выбираем вариант с постоянной репликацией. Преимущества этого метода в том, что данные будут дублироваться сразу. Недостаток — нагружает локальную сеть при больших объемах информации, а также нагрузка на жесткий диск.

Второй вариант, предлагает настроить репликацию по расписанию. Минус этого способа в том, что данные будут синхронизированы «потом». Выбираем желаемый вариант и нажимаем «Далее»:

Программа предлагает просмотр выбранных параметров. Если все устраивает — нажимаем кнопку «Создать»:

В случае успеха результат будет таким:

Нажимаем кнопку «Закрыть».

Система напомнит о задержках репликации. Чтобы не получать это сообщение вновь, при желании, следует установить галочку в соответствующем месте. Нажимаем кнопку «OK»:

Настройку распределенной файловой системы, а также репликацию данных можно считать оконченной.

220140
Минск
ул. Домбровская, д. 9

+375 (173) 88-72-49

700
300

ООО «ИТГЛОБАЛКОМ БЕЛ»

220140
Минск
ул. Домбровская, д. 9

+375 (173) 88-72-49

700
300

ООО «ИТГЛОБАЛКОМ БЕЛ»

File sharing in an organization plays a critical role in the collaboration between users. Microsoft included in Windows Servers the DFS namespace and DFS Replication to help provide highly available resilience and traffic optimized shares.

These shares can be in multiple locations, and users won’t need to remember each shared content location or worry about its availability. And in this tutorial, you’ll learn how to configure a DFS infrastructure namespace and DFS replication.

Read on and start replicating your data automatically!

Prerequisites.

This tutorial comprises hands-on demonstrations. You can follow along by having the following in place:

  • At least a Windows Server 2016 – This tutorial uses Windows Server 2019
  • Active Directory Domain Services (AD DS).
  • A user account as a member of the Domain Admins groups in a domain – This tutorial uses a domain namespace called Remote.local. This domain hosts two domain controllers named DCR and DCR1.

Installing DFS Namespace and Replication

Distributed File System (DFS) allows the grouping of logical share resources between multiple servers and branches. Included in a Windows Server OS, DFS is a free and great option for data sharing and replication.

To take advantage of DFS, below are two of DFS’s components that you’ll have to install:

  • DFS Namespace (DFS-N) – DFS namespace allows the building of the namespace and the logical folder structure. These folders can be on multiple servers, as you’ll see later.
  • DFS Replication (DFS-R) – DFS Replication replicates folders to other members in the network.

Microsoft did a great job making almost everything a wizard-base, so a couple of clicks and you’re ready to go.

1. Log in to the first server (DCR1), and open Server Manager.

2. On the Server Manager, click on Manage (top-right) —> Add Roles and Features to initiate adding features to your server.

Initiating adding features to the server
Initiating adding features to the server

3. Tick the Skip this page by default option, and click Next. Doing so lets you skip this page when you add another feature in the future since this section is just an introduction to the wizard.

Acknowledging the wizard’s introduction
Acknowledging the wizard’s introduction

4. Now, select the Role-base or Feature-base installation and click Next since you’re working on a single server, not part of VDI.

Selecting an installation type
Selecting an installation type

5. In the Select destination server page, select the installation’s destination server from the list and click Next.

Selecting the installation’s destination server
Selecting the installation’s destination server

6. Next, expand File and Storage Services and File and iSCSI Services. Tick the boxes for the DFS Namespaces and DFS Replication.

Regardless of which box you tick first, you’ll get a pop-up window where you’ll confirm the features (step seven).

Select the required roles
Select the required roles

7. Click on Add Features, as shown below, to confirm the additional features.

Confirming additional features
Confirming additional features

8. Ensure both DFS Namespaces and DFS Replication options are ticked and click on Next.

Confirming selected roles
Confirming selected roles

9. On the Features page, leave the defaults and click Next.

Confirming selected features
Confirming selected features

10. Review your installation selections and click the Install button to install DFS Namespaces, DFS Replication, and the binaries on your server.

Installing DFS Namespaces and DFS Replication
Installing DFS Namespaces and DFS Replication

11. Once installed, click on the Close button to close the wizard.

Completing the installation
Completing the installation

12. Finally, log in to the other server (DCR), and repeat steps 2-11 to install DFS Namespace and Replication.

Configuring DFS Namespace and DFS Replication

Now that the binaries are installed and available on your server, you must configure the service and create the DFS infrastructure. You’ll build the namespace structure and the required folders.

1. Open the DFS Management console in the Administrative Tools.

2. On the DFS Management, right-click on Namespaces and select New Namespace.

Initiating creating a new namespace
Initiating creating a new namespace

3. Input the server’s name (DCR1), or click on Browse to locate the server hosting the namespace, and click Next.

Specifying the server to host the DFS namespace
Specifying the server to host the DFS namespace

4. Now, type Public as the namespace’s Name, and click Edit Settings. A pop-up window appears where you’ll define a shared folder location and the sharing permission (step five).

Setting the namespace’s name
Setting the namespace’s name

5. In the Edit Settings window, configure the settings of the shared folder with the following:

  • Point the Local path of the shared folder to whatever path you want. This tutorial’s choice is the C:Public folder.
  • Select the shared folder permissions that fit your need, and click OK. For this tutorial, choose the Administrators have full access: other users have read and write permissions option.
Modifying the shared folder’s settings
Modifying the shared folder’s settings

Don’t manually create the shared folder and point the wizard to the folder. Doing so makes folder permission management harder. Why? The specified sharing permission in the Edit Settings window won’t apply. As a result, you’ll get the following error message.

Getting a duplicate shared folder error
Getting a duplicate shared folder error

6. After defining the shared folder’s location, click on Next.

Continuing with the defined shared folder location
Continuing with the defined shared folder location

7. Now you must select any of the namespace types below to create:

  • Domain-based – The namespace server settings are stored in one or more servers and Active Directory. Users can connect to the domain namespace to get the shared folder which looks like \mydomain.localMyShare.
  • Stand-alone namespace – The namespace settings are stored in a single server, making hosting the namespace server on a Failover Cluster.

If you select the Stand-alone namespace option, users can access the namespace root using the server name \DCR1Public.

Tick the Enable Windows Server 2008 mode option, and click Next to increase scalability, and enable access-based enumeration,

Domain-based or Stand-alone namespace
Domain-based or Stand-alone namespace

8. Review the settings you selected for the namespace, and click Create to finalize creating the new namespace.

Creating the namespace against the selected settings
Creating the namespace against the selected settings

9. Finally, click Close to close the wizard after successfully creating a new namespace.

Closing the wizard after successful namespace creation
Closing the wizard after successful namespace creation

Adding More Namespace Servers

The namespace server is ready, and that’s great. But right now, only one server is added as a namespace server. Why not add more servers to the namespace? The more servers you add, the better the availability.

To add more servers to your namespace:

1. Expand Namespaces, click on the newly-created namespace —> Namespace Servers tab, and click on Add Namespace Server in the Actions panel (right-most). Doing so opens a pop-up window where you can specify the server to add (step two).

Adding a new namespace server
Adding a new namespace server

2. In the Add Namespace Server window, input the server’s name to add, and click on Edit Settings to modify the shared folder’s settings.

Specifying the server to add to the namespace
Specifying the server to add to the namespace

3. Specify the shared folder’s path and permissions as you did in step five of the “Configuring DFS Namespace and DFS Replication” section, and click OK.

Configure the shared folder’s path and permissions
Configure the shared folder’s path and permissions

4. Now, click OK in the Add Namespace Server window to save the changes and add the new namespace server.

Saving the new namespace server
Saving the new namespace server

Once added, you’ll now see two namespace servers in the list below.

Verifying the newly-created namespace server
Verifying the newly-created namespace server

Configuring DFS Namespace Folder and Folder Target

Did you know you can aggregate multiple share resources in a single virtual share folder namespace? For instance, a company may have a shared folder for three different folders.

Even if these shared folders are on different servers and locations, the folder namespace aggregates so users can access them without remembering each folder location.

To configure the DFS Namespace folder and folder target:

1. In the DCR1 server, create two regular folders named UsersData, and ApplicationData in the domain namespace’s shared folder (\Remote.localPublic).

Creating regular folders in a shared folder (DCR1 server)
Creating regular folders in a shared folder (DCR1 server)

2. Next, switch to the DCR server, and create a regular folder called Contracts in the \Remote.localPublic.

Creating a regular folder in a shared folder (DCR server)

3. Open DFS Management in the DCR server, right-click on Namespaces, and select Add Namespaces to display.

Adding namespaces to display
Adding namespaces to display

4. Now, specify the domain (Remote.local), select the namespace, and click OK to display the namespace in the DFS Management.

Specifying domain and namespace to display
Specifying domain and namespace to display

5. Right click on the Public namespace, and select New Folder to initiate adding a new folder.

6. Click on Add, and a pop-up input box opens where you’ll target the shared folder path to add (step five).

Initiating adding a folder
Initiating adding a folder

7. Click on Browse, and a new window opens where you’ll locate a shared folder.

Browsing for a shared folder
Browsing for a shared folder

8. Next, expand the Public folder, select the UsersData folder, and click OK to select the folder to add.

The folders you see below are shared folders from the DCR1 server.

Adding the selected shared folder to the Public namespace
Selecting a shared folder

9. Set the folder’s name to UsersData, and click OK to add the folder as a shared folder.

Adding the selected shared folder to the Public namespace
Adding the selected shared folder to the Public namespace

10. Next, repeat steps five to nine to add the ApplicationData folder.

11. Switch to the DCR1 server, and follow the same steps five to nine to add the Contracts folder.

12. Finally, open File Explorer on both DCR and DCR1 servers and navigate to the Public namespace (\Remote.localPublic).

Regardless of which server you’re in, you’ll see the three virtual folders (UserData, ApplicationData, and Contracts), as shown below.

Viewing the shared folders in the Public namespace
Viewing the shared folders in the Public namespace

Configuring the DFS Replication

You’ve just completed a milestone of creating one shared folder (Public) under the Remote.local namespace and adding multiple folders. But now, if you try adding contents to the namespace, those contents will remain on the same server.

As a solution, you’ll configure the DFS Replication to ensure the added content gets replicated to all other servers for high availability.

To configure the DFS Replication:

1. On the DFS Management in the DCR1 server, right-click on Replication, and select New Replication Group to initiate adding a new replication group.

Initiating adding a new replication group
Initiating adding a new replication group

2. Next, choose a replication type that fits your need; there are two replication types as follows:

  • Multipurpose replication group – Provides replication between two servers or more, usually used for file sharing.
  • Replication group for data collection– Provides replication between two servers in different locations, usually for backup purposes between a branch office and the main office. This way, the backup software performs a backup of the replicated data instead of running the backup over the WAN.

Remember that only two servers can be in this replication group type, not more.

For this tutorial, select the Multipurpose replication group option and click Next since you share folders between two servers.

Selecting the multiple replication group for replication type
Selecting the multiple replication group for replication type

3. Input a unique name for the replication group (Public Replication), and click Next.

Setting the replication group name
Setting the replication group name

4. Now, on the Replication Group Members page, click on Add to locate the servers to add as members in the replication group, and click Next.

Adding servers as replication group members
Adding servers as replication group members

5. Choose a topology to set how servers replicate the contents from one server to another.

There are three topology options as follows:

  • Hub and Spoke – This option requires at least three servers. One is the initial master Hub, and the other servers are the Spoke. This option is handy when the data originates from the Hub and should be replicated in multiple locations.

Each replica is a two-way replication with the Hub but spoke servers don’t replicate content between each other. But with this option, all replication stops until the Hub is up again when the Hub is down.

Since you’re only working on two servers, this option is disabled by default.

  • Full Mesh – This option lets all servers replicate everything with each other.
  • No Topology – With this option, no replication will be placed until you configure the replication topology.

For this tutorial, select the Full Mesh topology, and click Next. This topology works well regardless if you have ten or fewer replication group members,

Make sure to evaluate your network and connectivity speed between branches, as the replication can exhaust the bandwidth.

Selecting the full mesh topology
Selecting the full mesh topology

6. Next, select the Replicate continuously using specified bandwidth option to perform replications continuously. Keep the Bandwidth at default (Full), and click Next to create a bandwidth throttle.

But if you prefer a specific schedule for replications to execute, choose the Replicate during the specified days and times option instead.

Setting a replication schedule and bandwidth
Setting a replication schedule and bandwidth

7. Select the primary member (DCR), and click Next. The immediate member is the server that initializes the replication and sends the content to all other members.

Ensure the destination folder on different nodes is empty as the content from the primary member is authoritative during the initial replication.

Setting the primary replication group member
Setting the primary replication group member

8. On the Folder to Replicate page, click on Add, and a pop-up window appears where you can select a folder to replicate.

Initiating adding a folder to replicate
Initiating adding a folder to replicate

9. Click on Browse to locate the folder to add for replication, which is the primary source of the content to replicate to other nodes, and click OK.

Note that you can only add a folder from the primary member you selected in step seven.

You can customize and change the NTFS permission (not the folder sharing permission) as you want by clicking on Permissions

Locating a folder to add for replication
Locating a folder to add for replication

10. After adding the folder to replicate, click on Next.

Verifying the folder to replicate
Verifying the folder to replicate

11. Now, click on Edit, which opens a window where you can specify the location to store the replicated content in the other member server.

If you’re using the DFS Management console and configuring the setting remotely, the Local path of folder is the local path, such as C:Public, and not a UNC.

Editing the local replication path
Editing the local replication path

12. Edit the replication settings with the following:

  • Select the Enable option to enable the replication for this server
  • Click on Browse and locate the local path to store the replicated data.
  • Click on OK to save the modified settings.
Click on OK to save the modified settings.
Click on OK to save the modified settings.

13. After setting the local path, click Next to confirm the modified settings.

Confirming modified local path settings
Confirming modified local path settings

14. Review the selected settings, and click on Create to finalize creating the new replication group.

Creating the new replication group
Creating the new replication group

15. Finally, click on Close once the replication group is created to close the wizard.

Congratulation! You’ve successfully created your DFS Replication.

Closing the replication group wizard
Closing the replication group wizard

Testing the Replication

Everything has been set into place, and all that’s needed is to test the replication. How? You’ll create multiple files on different folders from different servers and see if each replicates in all servers.

To test the replication:

1. Navigate to \Remote.localPublic in File Explorer, and you’ll see the namespace folders created all under the root.

Verifying the namespace folders
Verifying the namespace folders

2. Next, inside \Remote.localPublic, create a new folder called CompanyData and place a few files inside the folder.

Creating a folder (CompanyData) in the \Remote.localPublic namespace
Creating a folder (CompanyData) in the \Remote.localPublic namespace

3. Lastly, navigate to C:PublicCompanyData on each server, and you’ll see the same content on both servers.

Below, you can see the file name change replicates from one server to another almost instantly, which indicates the replication is working as expected.

Verifying replication works on both servers
Verifying replication works on both servers

Conclusion

In this tutorial, you’ve learned how to keep data high availability with DFS Replication. DFS provides a great way to help in solving common content sharing issues, including availability, scalability, and the ability to support different connectivity speeds.

Having an automatic replication system truly comes in handy. But as a fail-safe, why not backup your entire system?

description title ms.date author manager ms.author ms.topic

Learn more about: DFS Replication overview

DFS Replication overview

01/05/2022

JasonGerend

elizapo

jgerend

article

DFS Replication overview

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008

DFS Replication is a role service in Windows Server that enables you to efficiently replicate folders (including those referred to by a DFS namespace path) across multiple servers and sites. DFS Replication
is an efficient, multiple-master replication engine that you can use to keep folders synchronized between servers across limited bandwidth network connections. It replaces the File Replication Service (FRS) as the replication engine for DFS Namespaces.

[!TIP]
Consider using Azure File Sync to reduce your on-premises storage footprint. Azure File Sync can keep multiple Windows file servers in sync and each one only needs to keep a cache on-premises while the full copy of the data is in the cloud. Azure File Sync also has the additional benefit of cloud backup with integrated snapshots. For more information, see Planning for an Azure File Sync deployment.

Active Directory Domain Services (AD DS) uses DFS Replication for replicating the SYSVOL folder in domains that use the Windows Server 2008 or later domain functional level. For more information about replicating SYSVOL using DFS Replication, see Migrate the SYSVOL replication to DFS Replication.

DFS Replication uses a compression algorithm known as remote differential compression (RDC). RDC detects changes to the data in a file and enables DFS Replication to replicate only the changed file blocks instead of the entire file.

To use DFS Replication, you must create replication groups and add replicated folders to the groups. Replication groups, replicated folders, and members are illustrated in the following figure.

A replication group containing a connection between two members, each having a couple replicated folders

This figure shows that a replication group is a set of servers, known as members, which participate in the replication of one or more replicated folders. A replicated folder is a folder that stays synchronized on each member. In the figure, there are two replicated folders: Projects and Proposals. As the data changes in each replicated folder, the changes are replicated across connections between the members of the replication group. The connections between all members form the replication topology.
Creating multiple replicated folders in a single replication group simplifies the process of deploying replicated folders because the topology, schedule, and bandwidth throttling for the replication group are applied to each replicated folder. To deploy additional replicated folders, you can use Dfsradmin.exe or a follow the instructions in a wizard to define the local path and permissions for the new replicated folder.

Each replicated folder has unique settings, such as file and subfolder filters, so that you can filter out different files and subfolders for each replicated folder.

The replicated folders stored on each member can be located on different volumes in the member, and the replicated folders do not need to be shared folders or part of a namespace. However, the DFS Management snap-in makes it easy to share replicated folders and optionally publish them in an existing namespace.

You can administer DFS Replication by using DFS Management, the DfsrAdmin and Dfsrdiag commands, or scripts that call WMI.

Requirements

Before you can deploy DFS Replication, you must configure your servers as follows:

  • Update the Active Directory Domain Services (AD DS) schema to include Windows Server 2003 R2 or later schema additions. You cannot use read-only replicated folders with the Windows Server 2003 R2 or older schema additions.
  • Ensure that all servers in a replication group are located in the same forest. You cannot enable replication across servers in different forests.
  • Install DFS Replication on all servers that will act as members of a replication group.
  • Contact your antivirus software vendor to check that your antivirus software is compatible with DFS Replication.
  • Locate any folders that you want to replicate on volumes formatted with the NTFS file system. DFS Replication does not support the Resilient File System (ReFS) or the FAT file system. DFS Replication also does not support replicating content stored on Cluster Shared Volumes.

Interoperability with Azure virtual machines

Using DFS Replication on a virtual machine in Azure has been tested with Windows Server; however, there are some limitations and requirements that you must follow.

  • Using snapshots or saved states to restore a server running DFS Replication for replication of anything other than the SYSVOL folder causes DFS Replication to fail, which requires special database recovery steps. Similarly, don’t export, clone, or copy the virtual machines. For more information, see article 2517913 in the Microsoft Knowledge Base, and Safely Virtualizing DFSR.
  • When backing up data in a replicated folder housed in a virtual machine, you must use backup software from within the guest virtual machine.
  • DFS Replication requires access to physical or virtualized domain controllers – it can’t communicate directly with Azure AD.
  • DFS Replication requires a VPN connection between your on premises replication group members and any members hosted in Azure VMs. You also need to configure the on premises router (such as Forefront Threat Management Gateway) to allow the RPC Endpoint Mapper (port 135) and a randomly assigned port between 49152 and 65535 to pass over the VPN connection. You can use the Set-DfsrMachineConfiguration cmdlet or the Dfsrdiag command-line tool to specify a static port instead of the random port. For more information about how to specify a static port for DFS Replication, see Set-DfsrServiceConfiguration. For information about related ports to open for managing Windows Server, see article 832017 in the Microsoft Knowledge Base.

To learn about how to get started with Azure virtual machines, visit the Microsoft Azure web site.

Installing DFS Replication

DFS Replication is a part of the File and Storage Services role. The management tools for DFS (DFS Management, the DFS Replication module for Windows PowerShell, and command-line tools) are installed separately as part of the Remote Server Administration Tools.

Install DFS Replication by using Windows Admin Center, Server Manager, or PowerShell, as described in the next sections.

To install DFS by using Server Manager

  1. Open Server Manager, click Manage, and then click Add Roles and Features. The Add Roles and Features Wizard appears.

  2. On the Server Selection page, select the server or virtual hard disk (VHD) of an offline virtual machine on which you want to install DFS.

  3. Select the role services and features that you want to install.

    • To install the DFS Replication service, on the Server Roles page, select DFS Replication.

    • To install only the DFS Management Tools, on the Features page, expand Remote Server Administration Tools, Role Administration Tools, expand File Services Tools, and then select DFS Management Tools.

      DFS Management Tools installs the DFS Management snap-in, the DFS Replication and DFS Namespaces modules for Windows PowerShell, and command-line tools, but it does not install any DFS services on the server.

To install DFS Replication by using Windows PowerShell

Open a Windows PowerShell session with elevated user rights, and then type the following command, where <name> is the role service or feature that you want to install (see the following table for a list of relevant role service or feature names):

Install-WindowsFeature <name>
Role service or feature Name
DFS Replication FS-DFS-Replication
DFS Management Tools RSAT-DFS-Mgmt-Con

For example, to install the Distributed File System Tools portion of the Remote Server Administration Tools feature, type:

Install-WindowsFeature "RSAT-DFS-Mgmt-Con"

To install the DFS Replication, and the Distributed File System Tools portions of the Remote Server Administration Tools feature, type:

Install-WindowsFeature "FS-DFS-Replication", "RSAT-DFS-Mgmt-Con"

Additional References

  • DFS Namespaces and DFS Replication overview
  • Checklist: Deploy DFS Replication
  • Checklist: Manage DFS Replication
  • Deploying DFS Replication
  • Managing DFS Replication
  • Troubleshooting DFS Replication

Summary

  1. Presentation
    • One-way replication
    • Multidirectional replication
  2. Implementing DFS Replication
    • Prerequisites
    • Installing the DFS role
      • Windows 2008R2
      • Windows 2012R2 / 2016 / 2019
    • Configuring DFS
  3. Troubleshooting
    • Modification of the intermediate quota
    • Report generation

Presentation

DFS Replication allows you to set up a replication of a folder between several servers.

There are “two types of replications”.

One-way replication

This type of replication is mainly used to centralize file server backups on a backup server.

réplication DFS unidirectionnelle

Multidirectional replication

This type of replication makes it possible to have a folder with the same content on several servers at a longer or shorter interval depending on the link between the servers. This solution allows multi-site companies to have a common share replicated on all file servers.

réplication dfs multidirectionnelle

This allows the users of each site in the event of a network cut (vpn / internet) to continue to access documents and therefore to work. In addition it brings better performance because of having the files locally on the site.

Another advantage of this solution is to have one or more copies of the files on different sites and therefore in the event of a problem on a server it is possible to have access to the documents by going to another member of the group.

This topology also brings drawbacks:

  • DFS-R is not a substitute for a backup solution.
  • In the event of a virus (cryptolocker) on one of the sites, all the file servers will be affected.
  • No locking on files. For example, the same Excel file can be opened for writing on two different servers.
  • Bandwidth saturation, in case of drag / drop from one folder to another done by mistake this will be replicated on all the sites consuming bandwidth and being able to delay the replication of the modifications and generate a large number of Conflicts.

Implementing DFS Replication

Prerequisites

  • Servers must be a member of the domain.
  • The DFS Replication feature must be installed on all members.

Installing the DFS role

Windows 2008R2

1. From the server manager, go to File services 1, right click on it and click on Add role services 2.

Gestionnaire de serveur

2. Select the DFS Replication service 1.

Cocher Réplication DFS

3. Click on Next> 1.

Cliquer sur Suivant

4. Click on Install 1.

Lancer l'installation

5. Wait during the installation …

Patienter pendant l'installation

6. Once the installation is complete, click on the Close button 1.

Fermer l'assistant

Windows 2012R2 / 2016 / 2019

1. From the server manager, click on Add roles and features 1.

Gestionnaire de serveur

2. When the wizard opens, click Next 1.

Assistant d'installation de rôle

3. At the type of installation option, choose Installation based on a role or a feature 1 and click on the Next button 2.

Installation basé sur un rôle

4. Select the server where the installation is to be performed 1 and click Next 2.

Choix du serveur

5. Go to the File and Storage Services 1 role and expand it. Check the box for DFS Replication 2.

Sélection de la fonctionnalité Réplication DFS

6. Validate the addition of dependencies by clicking on Add features 1.

Valider les dépendances

7. In the list of roles and functions click on Next 1.

  • Valider rôle et fonctionnalité
  • Valider rôle et fonctionnalité

8. Click on Install 1.

Lancer l'installation

9. Wait while the DFS Replication service is installed.

Installation ...

10. When the installation is complete, exit the wizard by clicking Close 1.

Fermer l'assistant

Configuring DFS

All configuration is performed under Windows 2012R2.

1. Open the console, from Server Manager: Tools 1 DFS Distributed File System Management 2.

Ouvrir la console

2. Go to Replication 1 and click on New Replication Group … 2 from the Actions menu.

Création du groupe de réplication

3. Select the type of group according to your needs. In the article, we will choose a multi-use replication group then click on Next 1.

Choix du type

4. Choose a name for group 1 and enter a description A then click Next 2.

Information identification du groupe de réplication dfs

5. He now declares the member servers, clicks on Add 1 and uses the AD object explorer.

Déclarer les serveurs membres

6. Once the servers have been added to replication group 1, go to the next step by clicking on the Next 2 button.

Valider l'ajout des serveurs

7. We will choose a full mesh topology 1, which allows replication between all the members of the group. Click on Next 2.

Choix topologie

8. In case of replication between several servers physically on the same LAN and interconnected in VPN by a THD connection, leave Full Bandwidth 1 and click on Next 2. Go directly to point 9.

Planification sans gestion de la bande passante

We will see how to adapt the bandwidth according to the hours and days.

8-1. Select the Replicate on the specified days and times 1 option and click on the Modify schedule … button 2.

Planification personnalisée

8-2. Choose a time slot / days 1 and the desired flow rate 2.

Sélection de la plage horaire/jour et du débit

8-3. The selected range changes to blue 1 with the set flow rate 2.

Paramètre appliqué

8-4. The rest of range 1 will be able to use all of the bandwidth 2.

Pas de limitation le reste du temps

8-5. The selected range changes to blue 1 with the configured flow 2. When planning is complete click on OK 3.

Validation de la planification

8-6. Click on the Next 1 button.

Passer à l'étape suivante

9. Select the primary member of replication group 1 and click Next 2.

Choix du membre principal

This member will be the source for the initial replication.

10. You must now choose the folder that will be replicated on the main member. Click on Add … 1.

Sélection du dossier à repliquer

11. Enter the location of the folder or click on Browse 1 and validate with the OK button 2.

Paramétrage du dossier

12. Click on Next 1.

Valider en passant à l'étape suivante

13. It is now necessary for each member of the replication group to also choose its location. Select a member and click on Modify 1.

Configuration des dossiers sur les autres membres

14. Enter the path or click on Browse … 1 and validate with OK 2.

Indiquer le dossier cible

15. Once all the members have been correctly configured, go to the next step by clicking Next 1.

Valider en cliquant sur Suivant

16. Click on Create 1.

Lancer la création du groupe

17. The replication group is built, exit the wizard by clicking on Close 1.

Le groupe est créé

18. Click OK 1 to close the warning.

Valider l'alerte

19. The replication group is available in the console:

  • Console appartenance
  • Console connexion
  • Console dossier

20. Open the Active Directory Users and Computer console and expand the System> DFRS-GlobalSettings folders 1. We can see the replication group that we have just configured 2.

Objets de réplication DFS dans l'AD

21. Go to one of the target servers of the replication group. Open the file explorer and go to the reception folder. There should be a folder (shortcut) named DfsrPrivate 1, click on it to open it.

Dossier dfrprivate

The folder may take some time to be created.

If the folder is not visible, you must show the hidden files

The folder can only be accessed with the administrator account.

22. In this folder are 4 other folders 1 which are used by the replication process as “cache” (Intermediate quota). In this folder are also the Delete files from the replication group as well as the conflicting files.

Dossier nécessaire au bon fonctionnement

Troubleshooting

Modification of the intermediate quota

The staging quota acts as a cache for replication. Unfortunately there is no calculation rule to determine its size. It must be appropriate for each replication group. The default size is 4GB. Here are some things to consider when adjusting the quota.

  • Volume of the elements that make up the replication group.
  • Largest item size (if you have files larger than the quota replication may fail).
  • Write rate in the group (creation / modification).

During the initial replication if your source folder is already large, it is advisable to increase the staging quota.

It is possible to use the reports to obtain information on the intermediate quota.

1. From the DFS-R console, go to a replication group, on the Memberships 1 tab, select a member 2, right click on it and go to Properties 3.

Modification du quota

2. Go to the Generation 1 tab then modify the Quota 2. Click on Apply 3 and OK 4.

Saisie du nouveau quota

3. Do the manipulation for all the members of the group.

4. The quota has increased to 16GO 1.

Validation du quota dans la console

Report generation

There is no tool to monitor the status of replications, it is necessary to pass the generation of reports or by PowerShell commands.

1. From the console, select a replication group, click on Create a diagnostic report … 1 in the Actions menu. Choose a report type 2 and click Next 3.

Accès à la génération de rapport

2. Choose the save location for report 1 and its name 2. Then click on Next 3.

Configuration du rapport

3. Select the members to put in the report 1 and click on Next 2.

Choix des serveurs

4. Configure options 1 for the report and click Next 2.

Options du rapport

5. Click on Create 1 and wait for the generation.

  • Création du rapport
  • Génération ...

6. Once generated, the report will automatically open in the internet browser.

Visualisation du rapport

Понравилась статья? Поделить с друзьями:
  • Настройка dfs репликации windows server 2016
  • Настройка dfs windows server 2012 r2
  • Настройка default user в windows 10
  • Настройка default switch hyper v windows 10
  • Настройка dcom для opc windows 10