Sooner or later, system administrators wonder about decentralized storage of information or at least combine several existing file servers into one. In parallel, the question of the security of stored information is raised. Relatively simple, less expensive and popular among AD administrators (Active Directory) is the use of DFS. Consider what it is and how to set it up.
DFS –Distributed File System. It is a Microsoft product designed to simplify user access to files. What is noteworthy, files can be distributed territorially.
There are two types of DFS:
1. DFS Namespace. This type implements a virtual tree that combines common network directories into a single namespace. It is possible to configure multiple namespaces.
2. DFS Replication - replication of an existing directory with the tracking of content and changes.
DFS Installation
We’ll immediately emphasize that the installation, as part of this example, will be performed on an already configured domain controller.
Open the server manager. In the main part of the window, click on "Add Roles and Components".
In the new window, go to the item "Installation Type", select the parameter "Install Roles and Components", click the button "Next".
In the updated window, select the current server and click on the button "Next".
The next step, in the list of available roles we find “File Services and Storage Services” and open the list in which you need to find “File Services and iSCSI Services". We also expand the list of parameters. We tick off “DFS Namespaces” and “DFS Replication”. In the window that appears, click "Add Components". Press the button “Next” several times and wait for the installation to complete.
Creating a DFS Namespace
Before you start creating a DFS namespace, you must create at least one network directory on any of the servers in the domain. In our case, we will use the directory created on the same domain controller.
To make the folder accessible from the network, right-click on it, select "Share" in the context menu, then "Separate people".
In the input field, specify "Users of the domain", click the button "Add", then "Share".
Sharing the folder is ready. Click on the button "Done".
Now the server is available along the path:
WINSERVER2019net_share
Create a DFS namespace.
To do this, select "Windows Administration Tools" in the menu "Start". It is also possible through the control Panel➝System and Security➝Administration.
In the window that opens, select "DFS Management".
In the new window "DFS Management", on the right side click on "New namespace...".
In the wizard window, specify the server name. It can be found both in the window that opens when you click the "Browse" button and in the system properties on the "Computer Name" tab. Click “Next”.
The next step is the namespace name. In our case, let it be "MyDFS." Press the button "Change settings...”.
In a new window, pay attention to the line "Local path of the Local path of the shared folder", if necessary, change it. In the same window, set the switch to the value "Use user permissions" and click the button "Configure".
In the window that opens, allow full access for everyone and click the button "OK".
Close the window for changing settings by clicking on the button “OK”, in the wizard window, click the button “Next”.
At the new stage of choosing the type of namespace, set the switch to the value "Domain Namespace", click the button "Next".
We carefully review the settings. Everything suits - click "Create".
Click the button "Close".
Add a new directory to the existing namespace
There is no sense in the above if you do not add directories to an existing namespace. In the example, the process will be executed on the same server, however, the method is applicable to all servers in the domain.
In the DFS control window, in its left part, expand the DFS control tree to an existing one, click on the necessary one. In the right part of the window, in the action section, select "Create folder...".
In the opened window “Create Folder” specify the name, in our case “Test” and click the button “Add”.
In the new window, add the path to the existing network folder. The list of available directories can be viewed by clicking on the button "Overview...". In the end, press the button "OK".
The result will be
Click “OK”.
Access to DFS can be obtained from any address bar (Start-> Run, or from the address bar of any folder) using the template:
<server_ domain name><DFS_space_name>
For example:
laa.testMyDFS
Configure DFS Replication
To perform data replication, you need to add a second server to the same domain and install the server role "DFS Replication" using the server manager.
On the same server, create a folder and allow shared access to it. Data from the directory located on the domain controller server will be replicated to this folder.
When you open access later, in the folder properties menu you can see the network path to the directory.
We return to the domain controller and the DFS namespace deployed on it. Open the window "DFS Management", already familiar from the examples above. In the left part of the window, expand the tree to the created namespace. In the right part of the window, select "Add destination folder object...". In the new window, enter the address to the shared directory on another server (which was created earlier). Press the button “ OK ”.
The system will ask if you want to create a replication group. Press the button “ OK ”.
We are waiting for the completion of the progress. The result will be an open window "Folder Replication Wizard". You must verify the name of the replication group, as well as the name of the directory that will be replicated. Go to the next step by clicking on the button "Next".
At this stage, we check the paths to network directories and click "Next".
The next step is to select the main node from the drop-down list. This is the node from which data will be replicated. In the case of the example, the primary member of the server replication named WINSERV2016 is the server on which the domain controller is raised. A specific example once again reminds us of the need to determine friendly names for servers and other network nodes. Click “Next”.
Now you have to choose the connection topology between replication members. We select the available one - “Full grid", however, if you want to create your replication topology later, then choose "Notopology”. Click “Next”.
The configuration is coming to an end and at this step, you should decide on the frequency of data replication. Choose the option with continuous replication. The advantages of this method are that the data will be duplicated immediately. The disadvantage is that it loads the local network with large amounts of information, as well as the load on the hard drive.
The second option offers to configure replication on a schedule. The disadvantage of this method is that the data will be synchronized “later”. Select the desired option and click "Next".
The program offers a view of the selected parameters. If everything suits you, click the "Create" button.
Click the button "Close".
The system will remind you of replication delays. In order not to receive this message again, if desired, check the box in the appropriate place. Press the button “ OK ”.
Distributed file system configuration, as well as data replication, can be considered complete.