Настройка dfs windows server 2016

Рано или поздно системные администраторы задаются вопросом о децентрализованном хранении информации или хотя бы об объединении нескольких существующих файловых серверов в единый. Параллельно этому поднимается вопрос о безопасности хранимой информации. Относительно простым, менее затратным и популярным среди администраторов 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

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

DFSR is a role service of Windows Server that enables to replicate folders between multiple file servers across limited bandwidth network connections.

DFSR (Distributed File System) Replication it’s a good solution to keep sync file servers when you have branches and must be share the same File Servers across the organization.

Another use of DFS-R is as Disaster Recovery Solution for the File Servers.

In the past i have publish the article Install and Configure DFS Replication in Windows Server 2012 

Today i would like to explain how can setup DFS replication in Windows Server 2016.

Improvements in win2016

Base on Microsoft Technet DFSR in Windows Server 2016 hasn’t any improvement 

DFSR Requirements before installation

Before start the installation of DFSR it’s very important to meet the requirements in your environment

  • 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.

How to Setup DFS Replication

After verify that meet all the requirements we can start to setup DFS Replication in Windows Server 2016

  • Open Server Manager
  • Click Manage — — > Add Roles & Features

  • Click Next

  • Leave the Role-base or Feature-based installation and click Next.

  • Leave the default options and click Next.

  • Expand File Storage Services — — > File & iSCSI Services and check DFS Replication.

  • Click Add Features to return in first screen and click Next.

  • Click Next.

  • Click Install and wait to finish the Installation.

How to Setup DFS Replication Group

Now we can start to configure DFS Replication across the File Servers.

  • From Server Manager click Tools — DFS Management

  • Right Click in Replication and select New Replication Group.
  • In this scenario we have 2 File Servers so we must select Replication group for data collection.

  • Type a name for the Replication Group and the Domain name of your environment.

  • Select the source FileServer which contain that data that you want to replicate.

  • Click Add and select the folder that you must replicate.

  • After add the folder it will seems like this

  • Select the destination File Server.

  • Select the target folder. Don’t create the root folder in the destination because if select the target folder User as in example will be create the Path E:\Users\Users. We don’t want this. Just select the previous level before and the replication will be create the Folder. Click Next.

  • Configure the Bandwidth and when you would like to Replicate. These settings depends on your requirements. In case that you want to use DFSR for Disaster Recovery it’s better to schedule the Replication after hours instead to replicate continuously.
  • Select what is best for you and click Next.

  • Click Create 

  • Check the Status all completed sucessfull and click Close

How to Configure DFS Replication

If you are setup dfs replication for the first time it’s very common to come across with specific errors because of the wrong configuration or no configuration at all.

It’s very important to know what must be change after setup of the DFS-Replication Group.

The most common errors related with the Staging folder.

Staging folder used by DFS Replication as caches for new and changed files that must be ready to replicate. By default the size of the Staging folder is 4GB.

I am sure that you will ask which is the recommended size of the staging folder?

Base on Microsoft Technet the recommended minimum size of staging folder can be calculated with the following Powershell command. The <replicatedfolderpath> is the path to replicated folder.

Get-ChildItem <replicatedfolderpath> -recurse –force | Sort-Object length -descending | select-object -first 32 | measure-object -property length -sum).sum /1gb

After calculate the staging folder size 

  • From the  DFS Management Console in the Membership Tab right click and select Properties in the first folder.

  • Click in Tab Staging 
  • Change the Quota (in megabytes)
  • Click OK

  • Another one important configuration is the File Filtering
  • From the DFS Management Console select Replicated Folders Tab
  • Right click and select Properties in the Replicated Folder.

  • In the File Filter you can exclude extensions that you don’t want or it mustn’t replicate.
  • By default has these extensions. If you have these type of files that must replicate then you must remove it from there.

  • How can Force or Disable the Replication? 
  • From the  DFS Management Console select the Tab Connections.
  • Select the Server that you want to Disable or Force the Replication and with right click you can find the options.

  • In the same Tab select the Server that you want. Right click and select properties
  • Click in Tab Schedule.
  • From here you can schedule the Replication and the Bandwidth usage
  • You can click the button View Schedule to see what you have already schedule and the Bandwidth usage.

  • If you want to change click Cancel.
  • Select Custom connection schedule.
  • Click in Edit Schedule.

Now you have Setup and Configure the DFS Replication between two FileServers.

Of course we aren’t finish here. Because now we must learn to monitoring how the replication is going.

So I will come back next week to explain DFS Replication monitoringm

Have a nice weekend !!

You can send me an email at info@askme4tech.com  or do your comments in Twitter or Facebook

I invite you to follow me on Twitter or Facebook. If you have any questions, send email to me at info@askme4tech.com.

В серии статей мы рассмотрим установку файлового сервера на базе Windows Server 2016, настройку пространства имен, квотирования, группы AD, права доступа к сетевым папкам, создание ярлыков на сетевые папки через GPO.
За базу берем поставленную мне задачу, упростим ее для статьи. В примере будем использовать два отдела компании. На сервере будет использовано два HDD диска для хранения данных, также подключим третий HDD диск по сети с другого сервера.

1 . Установка и настройка файлового сервера, DFS Namespace и квот
2 . Настройка прав доступа к сетевым папкам на файловом сервере
3 . Добавление групп в AD
4 . Добавляем ярлыки на рабочий стол через GPO

Установка роли файлового сервера

1 . Открываем панель управления Server Manager, справа, вверху, находим Manage, выбираем «Add roles and features» (Добавить роли и компоненты)
2 . Тип установки указываем «Role-based or feature-based installation» (Установка ролей и компонентов)
3 . Выбираем необходимый нам сервер из пула (списка) серверов
4 . Выбираем компоненты 

File Server

На этом установка роли файлового сервера завершена.

Установка DFS-namespace

Зачем нужен DFS?

DFS имеет ряд преимуществ как для пользователей сети, так и для предприятий.

Для пользователей сети:

Namespace DFS — это упрощенный доступ к файлам, распределенным по сети. Исчезает необходимость в подключении множества сетевых дисков. Пользователям предоставляется одна общая сетевая папка, в которой отображаются только те папки, к которым им предоставлен доступ, если конечно включен ABE.

Для организации:

Namespace DFS — гибкое использование свободных ресурсов. Создание и подключение к DFS сетевых папок с серверов и компьютеров со свободным местом на жестком диске.
Replication DFS (Репликация DFS) — автоматическое резервирование важной информации повышает отказоустойчивость всей системы (выход одного сервера или дискового устройства не повлияет на работу пользователей).

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

Установка DFS

Если вы не установили DFS при инсталляции роли файлового сервера, то можно ее просто добавить. Для этого:

Откройте панель управления сервером Windows и найдите Add roles and features (Добавить роли и компоненты).

В качестве типа установки укажите Role-based or feature-based installation (Установка ролей и компонен
Выбираем нужный сервер из пула серверов. тов).

Выбираем нужный сервер из пула серверов.

Установка DFS шаг 1
Установка DFS шаг 1

В следующем окне отмечаем DFS Namespaces и DFS Replication, если нужно.

Установка DFS шаг 2

Установка DFS шаг 2
Установка DFS шаг 3
Установка DFS шаг 3

После удачной инсталляции переходим к настройке DFS 

Установка DFS шаг 4

Установка DFS шаг 4

Настройка DFS

В Server Manager\Dashboard выберете > ToolsDFS Managment.

Или в поиске введите команду dfsmgmt.msc.

Для создания нового пространства имен выберете в правой части экрана New Namespace.

Введите название сервера и выберите его местоположение.

Создание Namespace шаг 1

Создание Namespace шаг 1

На следующем этапе задаем имя пространства имен DFS. Хочу обратить внимание, что заданное здесь имя будет использоваться при подключении общей сетевой папки. Например:

\\companyname.local\share

Создание Namespace шаг 2

Создание Namespace шаг 2

На следующем шаге выбираем Domain-based namespace, так как используются доменные службы Active Directory.

Создание Namespace шаг 2

Создание Namespace шаг 3

В результате видим сообщение об успешном создании пространства имен.

Создание Namespace шаг 4

Создание Namespace шаг 4

Теперь подключаем к нашему созданному Namespace сетевые папки.

Настройку прав доступа для папок смотрите здесь >>>

Для создания новой папки выберете в правой части экрана New Folder. Задайте имя папки и путь к ней.

Создание папки в Namespace

Создание папки в Namespace

В моем случае у меня 2 разных сетевых папки на разных дисках. Но для пользователей отдела один сетевой ресурс:

\\companyname.local\share-files

Если в будущем мне понадобится добавить какие-либо сетевые папки для отделов, но при этом не подключать несколько сетевых ресурсов, то достаточно будет создать новый Namespace и подключить к нему нужные папки.

НА ЗАМЕТКУ!
Если после удаления Namespace появилась ошибка и перестали отображаться другие, то нажмите на него
и выберите Remove DFS Namespaces from the display.
Ошибка исчезнет и все остальные Namespace появятся на экране.

Replication DFS (Репликация DFS) мною не настраивалась. Наличие свободных ресурсов всегда болезненный вопрос.

Для второго отдела был создана обычная сетевая папка с правами доступа.

\\share\name-files

Настройка квот для сетевых папок в Windows Server 2016

Причины для установки квот на сетевые папки могут быть самые разные. Для меня было целью разделить место на логическом диске D: моего файлового сервера на 2 отдела. 

Для установки квот на сетевые папки необходимо установить File Server Resource Manager.

Установка File Server Resource Manager шаг 1

Установка File Server Resource Manager шаг 1
Установка File Server Resource Manager шаг 2
Установка File Server Resource Manager шаг 2

В Server Manager\Dashboard выберете > Tools > File Server Resource Manager. Откроется окно управления  File Server Resource Manager. Если у вас в компании есть настроенный SMTP server с 25 портом, то вы можете настроить отправку уведомлений о квотах на e-mail администратора. Для этого выберите: File Server Resource Manager > Configure Options… 

Для создания своей квоты выберите Quota Management > Quota Templates > Create Quota Templates

Настройка Quota Template шаг 1

Настройка Quota Template шаг 1

Задаем имя для нашей новой квоты, описание, если нужно, и устанавливаем лимит. Нажимаем OK. Квота создана. Если нажать кнопку ADD, то открывается окно с доп. настройками, в котором можно создать уведомления о действиях с папкой, к которой применена квота, запись уведомлений в журнал и отправки на e-mail администратора.

Создадим квоту Storage и применим ее к папке old storage.

Подключим эту папку на компьютере пользователя, видим результат. 

Хочу добавить, что квоты бывают Hard (жесткими) и Soft (мягкими).  Мягкие квоты – это квоты, в которых установленный лимит можно превышать при достижении порогового значения. Жесткие квоты – запрещают пользователю превышать установленное пороговое значение лимита. Я использую жесткие квоты, так как хочу закрепить выделенное место на жестком диске за отделами.

На заметку!
Если вы подключаете сетевую папку созданную в Namespace,
то корректного отображения информации об объеме данной сетевой папки не будет.

Обращаю внимание на то, что эта статья описывает конкретный пример. Задачи и решения для каждой компании индивидуальны.

In this lesson, you will learn how to implement DFS to your Windows Server 2016 for your branch office locations.

Step 1. Open Server Manager

Open the Server Manager by clicking the Windows button and clicking the Server Manager or by searching it on the list of programs.

Step 2. Add the DFS role

  1. Click on Manage from the top right-hand corner, and then click Add Roles and Features.

Add Roles

2. In the Add Roles and Features Wizard, click Next

Add Roles Features

3. Choose Role-based or feature-based installation on the Select installation type, then click Next.

4. On the Select destination server page, you will see the name of the server you have previously configured selected, click Next.

5. On the Select server roles page, expand the File and Storage Services (installed), do the same thing for File and iSCSI Services, and then select the DFS Namespaces checkbox.

Select Server Roles

6. From the Add Roles and Features pop-up window, click Add Features.

7. On the Select features page, click Next.

8. On the Confirm installation selections page, click Install. Once the installation is complete, hit the Close button.

Installing Dfs Role

Step 3. Configuring your DFS Namespace.

  1. Go back to the Server Manager, click Tools, and then go to DFS Management

Managing Dfs

2. On the DFS Management window, from the navigation pane, click Namespaces.

Namespace Window

3. Right-click Namespaces, and then click the New Namespace.

4. From New Namespace Wizard, on the Namespace Server page, under Server, type the name of your server (on this example, it is SA-JF-WSRV-01), and then click Next.

Namespace Server Window

5. On the Namespace Name and Settings page, under Name, type the name of the namespace you want to set it to (for our example, mine is DevOps) and then click Edit Settings.

Namespace Settings

6. Type C:\<namespace> (for this example, C:\DevOps) under Local path of shared folder and choose All users have read and write permissions and click OK. (The Drive C here is the example of where actually your target folder is located on your server. This will only be visible to you as the server administrator. Using the namespace will hide this local path to your users.)

Namespace Permission Setting

7. On Namespace Name and Settings window, click Next.

8. On the Namespace Type page, make sure that Domain-based namespace is selected. Please also note that the namespace will be accessed by \\<yourcreateddomain>\DevOps (For this example it will be \\jfrdc-lab.com\DevOps)

Namespace Type Window

9. Ensure that the Enable Windows Server 2008 mode check box is selected, and then click Next.

10. On the Review Settings and Create Namespace page, click Create.

11. You will see the confirmation “You have successfully completed the New Namespace Wizard”, click the Close button.

Step 4. Verify DFS functionality for your server. Create sample file.

  1. Go to the File Explorer. (Press Windows logo + “E” or simply click the File Explorer icon on the taskbar)
  2. On the address bar of your file explorer, type the namespace you have created and hit enter. (For this example, it is \\jfrdc-lab.com\DevOps)

File Explorer 1

3. Verify that you can access the target folder of your namespace.

File Explorer 2

4. Create a sample text file by doing a right click inside the target folder.

File Explorer 3

5. Name your file as “Sample Text File“.

6. To verify that the file also exists on your local drive, navigate to where you saved your target folder. On this example it is C:\DevOps

7. You should be able to see the text file you have created.

File Explorer 4

Next process is to create target folder on your created namespace. To learn about adding target folder, click here.

This handbook explains how to set up DFS data replication in an Active Directory domain on Windows Server 2016 machines.

A Distributed File System (DFS) can be one of two types:

Namespace DFS – Namespace DFS enables you to establish virtual directory trees that connect shared files across a corporate network. Multiple DFS namespaces are available to set up. It makes it easier for users to access files that are scattered around the globe;

DFS Replication – generates a duplicated shared folder and keeps track of file modifications.

Installing DFS Namespaces and DFS Replication Roles on Windows Server 2016

Let’s install the DFS Namespaces and DFS Replication roles on the two Windows Server 2016 machines that will be used for replication.

Create a new DFS namespace using the DFS Management console (dfsmgmt.msc).
You can build a domain-based namespace or stand-alone namespace.

Domain-based namespace is a namespace that is integrated into the Active Directory. Allows you to hide the DFS namespace server name from users, as well as simplify the replacement and transfer of the namespace to another server.

Even in a workgroup, a stand-alone namespace allows you to establish DFS structures without requiring Active Directory Domain Services (AD DS). A failover cluster can be used to ensure the namespace’s high availability.

Create a new folder in the new namespace. Make sure that the new directory is accessible over the network by the UNC path dfs\namespacename\foldername (in our example it is contoso.com\public\shareddocs).

Configuring DFS Replication Between 2 Servers Running Windows Server 2016

You can now set up DFS replication. You can use DFS Replication to synchronise directories with files (replicated folders) between servers in a DFS replication group. The DFS replication group’s servers communicate with one another using DFS connections.

The Remote Differential Compression Algorithm is used to repeat changes (RDC). Only the parts of the files that have changed are reproduced. DFS replication is asynchronous, which means that sources may not be consistent at any given time.

It’s important to distinguish between FRS (File Replication Service) and DFSR (Distributed File System Replication) (Distributed File System Replication). When Windows Server 2008 introduced DFSR, it became possible to apply differential compression when only partial changes in a file were communicated over the network, rather than the complete file. The entire file is copied in FRS replication.

The use of folders between remote branches for DFS replication over slow WAN lines is advantageous.

Replication comes to a halt when communication between replication partners is lost. Replication will resume once the network has been restored.

A replication group is a collection of servers (members) that work together to replicate one or more directories.

System requirements for DFS replication:

  1. All servers in the replication group must have DFS Replication installed.
  2. The replication group’s servers must all be in the same AD forest.
  3. Forest schema version must be at least Windows Server 2003 R2, domain functional level must be at least Windows Server 2008;
  4. The NTFS file system must be used to store replicated directories. The following file systems are not supported: ReFS, FAT, and Cluster Shared Volumes.
  5. Antivirus on DFS servers must be compatible with DFS replication technology, or antivirus exceptions for duplicated directories must be added.

You must create a network shared folder on the second DFS server before configuring replication. Select the relevant namespace in the DFS Management interface and choose Add Folder Target from the context menu.

Enter the name of the shared folder and click OK (in our example it is \\HOST2\DFS\ShareDocs).

You will be prompted to create a new replication group. Click Yes.

In the DFS Replication Configuration Wizard, you need to verify the name of the replication group and the directory you want to replicate.

Check the paths to the shared folders on the servers.

Choose the primary member node where the initial data will be stored and where initial replication will take place.

Full mesh is usually chosen as the replication topology. All modifications made on one node are promptly replicated to all others in this architecture. 

The timing and bandwidth that can be used to replicate data must still be adjusted. After you’ve double-checked your settings, click Create.

Following the successful formation of a new replication group, a message should display.

This completes the DFS distributed file system and data replication configuration.

Create a new file in one of the member servers’ shared folders. Depending on the capacity of the communication connection between DFS servers and the DFS replication parameters, huge files can take many hours or even days to replicate.

If 2 users simultaneously edit (or create) the same file, then DFS replicates the version of the file that was changed (created) last. An earlier version of the file is stored in DfsrPrivate\ConflictandDeleted directory on the server that resolves the DFS replication conflict. In this case, an entry about the conflict that has occurred appears in the ConflictandDeletedManifest.xml file.

Tweaking DFS Replication

You can tweak several variables after creating a DFS replication group to improve performance.

Expand the Replication area of the DFS Management console, which contains all the replication groups.

Choose the replication group you just made. There are four tabs on the right window:

Membership is a list of network folders that data is copied across.
Connections — specifies the structure of DFS replication partners’ relationships;
DFS folder settings for replicated folders;
Permissions for replication groups are delegated.
Note the 4 GB Staging Quota setting on the Membership tab. What exactly is it? The DFS service employs intermediate hidden folders to hold modified data that must be sent to replication partners when replicating. On each server, these files are saved in the DfsrPrivateStaging subdirectory.

Open the attributes of any folder on the Membership tab and select the Staging tab. As you can see, you can define the Staging folder’s path and maximum size here (Quota). The default storage capacity is 4 GB. To improve the performance of the DFS file replication service in big infrastructures, the quota size should be increased.

This quota should not be less than the total size of the replication directory’s 32 biggest files, according to Microsoft. The following PowerShell command will return the total size of the directory’s 32 biggest files:

Get-ChildItem C:\SharedDOCS -recurse –force | Sort-Object length -descending | select-object -first 32 | measure-object -property length -sum).sum /1gb

If the DFS server’s staging quota is insufficient, occurrences with EventID 4208 are frequently reported in the event log. In this scenario, it is suggested that the staging quota be increased by 20%.

Some administrators assume that a file larger than the Staging folder’s quota cannot be copied through DFS. This isn’t correct. Such a file can also be reproduced normally, but the procedure will take many steps (the file will be divided into several portions and sent in pieces), slowing down the process significantly.

To switch the DFS directory on a specific server to read-only mode, click the directory and select Make read-only. As a result, users won’t be able to edit or create files in this directory.

On the Connection tab, you can temporarily suspend replication to one of the servers in the DFS replication group (Disable), or start forced replication (Replication Now).

Open the properties of any folder on the Replication Folders tab. A list of file extensions that are not duplicated between DFS servers can be found in the File filter field. .bak and.tmp are the default file extensions. Other file kinds that do not need to be copied, such as video (*.avi, *.mpeg), music (*.mp3, *.wav), image files (*.iso, *.wim), or other file types, can be included.

The bandwidth throttling for DFS replication between remote locations can be controlled. This is important when offices are connected by slow WAN links and you don’t want the DFS replication traffic to overload them.

A WAN connection between two sites, for example, has a bandwidth of 10 MB. During work hours, you want DFS to be limited to 6 megabits and unlimited the rest of the time.

Go to the Schedule tab > right click on the replication connection and select Properties > click on the Connections tab > go to the Connections tab > right click on the replication connection and select Properties > go to the Connections tab > right click on the replication connection Select “Custom Connection Schedule…” from the drop-down menu. Details > Edit Schedule

Here you can set a limit on the maximum channel usage by DFS replication traffic for different days of the week and daytime:

  • Monday – Friday from 8:00 AM to 5:00 PM — 6 Mb;
  • Sunday, Saturday, and Mo-Fri night — Full bandwidth.

You can use system event logs, as well as the current (percent windir percent debugDFSR.log) and archive DFSR replication logs (percent windir percent debugDFSR.log.gz) to diagnose DFS replication.

The PowerShell cmdlet Get-DFSRConnection can be used to get information about the server’s DFS replication settings.

Common DFS Replication Errors

Let’s consider the most common DFS replication errors and their solutions.

DFS Does Not Replicate Some Files

If you found that DFS Replication is not copying some files, check if they have the Temporary attribute set (0x120).

You can find such files and remove the 0x120 attribute using the following PowerShell script:

Get-ChildItem C:\DFS\DOCS -recurse | ForEach-Object -process {if (($_.attributes -band 0x100) -eq 0x100) {$_.attributes = ($_.attributes -band 0xFEFF)}}

DFS Replication Error 4012

When you try to start DFS replication and get an error code 4012, it signifies the replication hasn’t been done for a long time.

The replication on the folder with the following local path: C:path was halted by the DFS Replication service. This server has been isolated from other partners for 70 days, which exceeds the MaxOfflineTimeInDays parameter’s maximum duration limit (60). The data in this folder is considered stale by DFS Replication, and this server will not replicate the folder until the problem is fixed.

You can increase this period from 60 days (default) to 120 using PowerShell:

  1. Check the current value of MaxOfflineTimeInDays:Get-WmiObject -Namespace root\microsoftdfs -Class DfsMachineConfig | fl MaxOfflineTimeInDays
  2. Increase it up to 120 days:Set-WmiInstance -Namespace root\microsoftdfs -Class DfsMachineConfig -Arguments @{MaxOfflineTimeInDays=120}
  3. Restart DFS Services.

DFS Replication Error 2104

In this case, you need to fix the broken DFS database. Follow these steps:

  1. Disable group replication (DFS Management > Replication > Replication group > Connections);
  2. Create and run the following .bat script with administrator permissions:
set DFS_DRIVE=E: net stop dfsr %DFS_DRIVE% icacls "%DFS_DRIVE%\System Volume Information" /grant "Domain Admins":F cd "%DFS_DRIVE%\System Volume Information" move DFSR %DFS_DRIVE%\DFSR_backup cd .. icacls "%DFS_DRIVE%\System Volume Information" /remove:g "Domain Admins" net start dfsr dfsrdiag PollAD /Member:%userdomain%\%computername%

  • Настройка dfs windows server 2019
  • Настройка ip адреса windows 10 вручную
  • Настройка dcom для opc windows 10
  • Настройка intel hd graphics windows 10
  • Настройка com порта windows xp