Install and Configure Distributed File System (DFS) on Windows Server 2012 R2
The Distributed File System (DFS) provides a simplified view of file resources in Windows Server across multiple servers and sites while enabling efficient replication of folder contents between servers. In this article, we are going to show you the installation and configuration of distributed files system (DFS) in Windows Server 2012 R2.
Install and Configure Distributed File System (DFS)
For the testing purpose of DFS configuration, at least you must have two Windows Serve 2012 R2 installed in your lab. Here I have installed both of them in Hyper-V. If you didn’t, just read Install Windows Server 2012 R2 post. The first Server is the domain controller (DC). It has installed Active Directory, DNS Server, DHCP Server and will install file server with DFS-N and DFS-R. The second server will be a member of the DFS Server.
Installing and configuring DFS-N
So let’s install the installing and configuring DFS Namespaces and replication roles in firs Server (DC). In the real world, don’t install too many roles in one server. So we are in the testing Lab.
1. Log in to DC Server as domain admin and go to server manager dashboard. I assume that you already can install Server roles and features.
2. Click Manage then click Add Roles and Features. On the add roles and features page, select Rule-based or feature-based installation and click Next.
3. On the Server Selection page do noting, just click Next.
4. On the Server Roles page expand the Files and Storage Services then expand File and iSCSI Services. Now select DFS Namespace, DFS Replication and File Server Resources Manager. Accept the default features as well then click Next.
5. On the Features, page leaves the default settings and click Next.
6. Click Install on the Confirmation page in order to install DFS. It will take a minute to complete the installation task.
7. When the installation process has finished, click Close and go for configuration.
OK, the Distributed File System installation has finished successfully.
Install Distributed File System (DFS) with PowerShell
Try to install the File Server, DFS-N and DFS-R on the member server. It is better to do it with the PowerShell command line. It will help you to understand the process of installing DFS with PowerShell.
The second server must be joined to a domain, change the default name and set static IP address.
1. Log in to a second server (FS2) as domain admin and open Windows PowerShell.
2. Type “get-windowsfeatures -name fs*” and hit enter to show the File Server and DFS components.
The result shows that no roles are installed yet.
3. So try to install with the following Install-WindowsFeature command.
Install-WindowsFeature -Name FS-DFS-Namespace,FS-DFS-Replication -IncludeManagementTools
When the installation finished successfully, execute the Get-WindowsFeature -Name fs* again to the changes result.
OK, the File Server and Distributed File System are installed on both servers. Now it’s time to create a namespace for servers.
Create a DFS NameSpace
1. On the DC Server open the DFS Management from Server Manager Dashboard and Tools menu.
2. On the DFS Management console click New Namespace on the Actions menu to open the New Namespace Wizard.
3. Type the server name you want to use it as namespace host and click Next. I set on dc1 server.
4. On the namespace setting page, type a name (public) then click Edit Settings.
5. Select Administrators have full access: other users have read and write permission on the Edit namespaces Settings page then click OK to apply changes.
On the Namespace setting page click Next.
6. Select the Domain-based namespace on the Namespace Type page then click Next.
7. Once review the information and click Create to create the namespace on Review Settings and Create namespace page.
8. Finally, click Close to close the namespace processing wizard page.
Remember, namespace creating should be done without errors.
The namespace created successfully. Now try to add another namespace server to replicate with each other.
Add a Namespace Server
Let’s add the second server (FS2) as the second file server in order to replicate the shared resources between file servers.
1. Go to DFS Management page, expand Namespaces then select the created namespace and Namespace Servers tab.
2. Click add a namespace server form action menu. Type the name of second files server and click Edit Settings.
3. Select the Administration have full access: other users have read and write permission on the edit permission settings page and click OK twice to add the namespace server without any errors.
The result should be like a screenshot.
Add Shared Folders to Root Namespace
We need a shared folder within our both file servers. This shared folder keeps shared files and resources. So let’s create the folders and share them.
1. From File and Storage Services on the Server Manager dashboard, right-click on the main page and click New Share to create a shared folder.
2. Select the Type a custom path on the Share Location page and type the location of the folder in which you want to share it then hit Next.
3. Specify the share name and description then click Next. I ask you the path does not exist, just click OK to create the folder.
4. Select Enable access-based enumeration option and click Next.
5. On the Permission page click Next. If you want to set permission to a domain user, click customize permissions and set permission for domain users group and domain admins group.
6. Click Next on Management Properties page. On the Quota page set a quota for the path if you want then click Next. On the Confirmation page click Create then click Close to complete the task.
Now you have successfully created a shared folder for DC server, but need to create the same folder for the second server (FS2) as well. Try to create a folder and simply share it like simple file sharing then set modify permission to domain admins group and domain users group.
Add Folder to DFS-N and Configure Replication
Try to add the two shared folders to the DFS namespace server. These tow folder will keep the shared resources and replicate.
1. From the DFS Management console, click New Folder from the action menu and add the shared folders of both file servers like the screenshot.
When done, just click OK and replication configuration will start.
2. For configuring replication between tow file servers click Yes on the Replication page.
3. Simply click Next on the Replication Group and Replication Folder Name page.
4. On Replication Eligibility page click Next.
5. Select the first server (DC1) as a primary member server and click Next.
6. Select the Full Mesh topology on the Topology Selection page and hit Next.
7. Leave the default setting on the Replication Group Schedule and Bandwidth then click Next.
8. Do note on the Review Settings and Create Replication Group only click Next to go to the next page.
9. On the Confirmation page. Click Close and close the page.
Finally, the configuration should finish successfully. Expand namespace to Files and see the result.
To test the replication between the first file server and second file server, just copy a file to a shared folder (Files) from the first server and see the file should be on the second server as well.
Install and Configure DFS on Windows Server 2016 – Video Tutorials
That is it a simple practice to install and configure Distributed File System on Windows Server 2012 R2. Hope you get something from distributed file system article and ask your related questions to the distributed file system through comment are.
Thank you, if everyone will benefit from this paper use
That’s a great article and also so helpful!
Thanks for sharing it!
if i delete data server 1, so data server 2 also deleted?
No.