Distributed File System (DFS) is a technology that lets you group shared folders on different servers into one logically structured namespace. As the name suggests, the files are distributed across various file servers and locations, and you can use DFS to access the shared folders of those servers from a single path. The components of DFS are Namespace and Replication. This article covers the DFS Namespace. Additionally, we are using two servers running Windows Server 2022 (SR1-technig and SR2-technig) to install and configure the distributed file system namespace.
Install Distributed File System (DFS) on Windows Server 2022
The DFS technology is part of the File and Storage Services, and you need to install this role on your system. I will install the DFS Namespace using the Server Manager.
- Open Server Manager.
- Click Manage > Add Roles and Features.
- Click Next on the Welcome screen.
- Select Role-based or feature-based installation and click Next.
- Select the server where you want to install DFS and click Next.
- On the Server Roles page, expand File and Storage Services and select DFS Namespaces.
- Click Add Features and then click Next.
- On the Features page, select the features that you want to install and click Next.
- Click next on the Select feature wizard, and confirm the installation selection. Review the installation summary and click Install.
- Wait for a few seconds. The installation might take some time. Click Finish to close the wizard.
Note: You must install the Distributed File System (DFS) on all the servers where you want to implement DFS.
How to configure distributed file system namespace
After the installation, you can create your Namespace following the below procedures. But, first of all, let’s create a folder on each server and share them in the network. To do that, I create a new folder on each server and put a text file in it.
Once the installation is complete, you will need to configure the DFS namespace. Here are the steps on how to do it:
- Open the DFS Management console.
- Right-click Namespaces and select New Namespace.
- In the New Namespace Wizard, enter the namespace name and click Next.
- Select the type of namespace that you want to create and click Next.
- Select the servers that will host the namespace and click Next.
- Review the configuration settings and click Create.
The following are the real example:
- On server SR1-technig, I create a new folder SR1-Sales, and a text file SR1-TextFiles.
- On server SR2-technig, I create another folder, SR2-Sales, and a text file, SR2-TextFiles.
Moreover, I share these folders on the network. If you do not know how to share files on the network, please read the Share Files over the Network:
To see whether your folder is shared on the network, press the Windows +R buttons and write the \ServerName in the Run and enter. You see the shared folder appear.
How to create Distributed File System (DFS) Namespace
Once the namespace is created, you can start adding shared folders to it. Here are the steps on how to do it. Now let’s create a namespace by the name of Sales in the DFS Management.
- Right-click the namespace that you want to add the shared folder to and select New Folder.
- In the New Folder Wizard, enter the folder name and click Next.
- Select the shared folder that you want to add to the namespace and click Next.
- Review the configuration settings and click Create.
Following are the real scenario of adding shared folders to the namespace.
- In the server manager window, click on administrative tools.
- Find the DFS Management and open it.
- You see the two components of the DFS on the left-hand side; right-click on the Namespace> New Namespace.
- Write or browse the server’s name to host the Namespace and click next.
- Enter the name of the Namespace. I name the namespace Sales.
- Click on the Edit Settings button to customize the users’ permissions for the shared folders in the Namespace, and then click the Ok button. Click next.
There are two types of namespaces: domain-based namespaces and standalone namespaces. Domain-based namespaces can be stored on one or multiple namespace servers and in Active Directory Domain Services (AD DS). Standalone namespaces, on the other hand, are stored on one namespace server. If you choose to create a domain-based namespace, you will need to enable Windows Server 2008 mode.
- Select the type of Namespace and click next.
- After reviewing all the settings, click on the Create button.
- Finally, you have created the Namespace and now close the Wizard by clicking on the Close button.
Create DFS Folders
It is time to bring together all those shared folders from different servers under one Namespace in one server. To do that:
- In the DFS Management, open the Namespace.
- Right-click on the newly created Namespace and then New Folder.
- Click on the Add button to connect the folder to the target path.
- Browse for the target path, select the shared folder, and click the Ok button.
- Click on the Ok button to return to the New Folder Wizard, give the folder name, and click the Ok button.
- Again, right-click on the Namespace, Create New Folder > Add button, browse or write another server’s name, select their shared folder, give it a name, and then click on the OK button.
You can add multiple shared folders from multiple servers and add them into one Namespace.
Press Windows + R to open the Run dialog box. Type ComputerName and press Enter to check the new namespace you created. If you open that namespace folder in the network, you will see subfolders that are shortcuts to the folders you added to your namespace. These subfolders are linked to the shared folders on other servers. Now, you can access all of those shared folders from different locations under a single path.
In this article, you learned how to install the Distributed File System (DFS) namespace on Windows Server 2022 and configure the DFS namespace to group shared folders from different servers into one namespace. Since this article is already long, we will cover DFS replication in another session. Please feel free to share your thoughts and questions in the comment section below.