Distributed File System

Source: Internet
Author: User

The distributed filesystem (Distributed file System,dfs) can provide file access efficiency, improve file availability, and reduce the burden on the server.

Distributed File System Overview

The following functions are available when the same files are stored on multiple servers on the network through a distributed file system.

    • provides file access efficiency : When a client accesses a file through DFS, DFS directs the client to access the file from the server closest to the client, giving the client quick access to the desired file. In fact, DFS is a list of servers that provide clients with the files required by the client, but DFS will be the closest server to the client, such as the client's same AD DS site (Active Directory Domain Services site). At the top of the list so that the client has priority access to the file from this server.
    • Improve file Availability : Even if the server at the forefront of the server list fails unexpectedly, the client can still get the required files from the next server in the list, which means that Dfs provides troubleshooting.
    • Server load Balancing : Each client gets a list of servers that may not be in the same order, so the servers they access may not be the same, which means that different clients may be able to access the required files from different servers, reducing the burden on the server.
Schema for Dfs

Windows Server 2012 is configured for DFS by using both the file and the DFS namespace in the Access Services role to DFS Replication. The following is a description of each component in DFS.

    1. DFS Namespaces : You can set up shared folders that reside within different servers through DFS namespaces and present them to clients in a tree-like structure of a virtual folder. The DFS namespace is divided into the following two types.
    • domain namespace : It stores the settings data for the namespace to the memory buffers of AD DS and the command space server. If you create more than one namespace server, it also has the ability to debug namespaces. The

      Adds a domain namespace called Windows Server 2008 mode starting with Windows Server 2008, and the previous legacy domain namespace is referred to as Windows S. The Windows Server 2008 mode domain namespace supports access-based enumeration (access-based Enumeration,abe, or translated as an Access enumeration), which determines whether a user sees files and folders within a shared folder based on the user's permissions. This means that when a user browses a shared folder, he only sees files and folders that have access to them.

    • stand-alone namespace : It stores the namespace's settings data to the namespace server's registry (Registry) and memory buffers. Because the stand-alone namespace can only have one namespace server, there is no troubleshooting of namespaces unless a server cluster is used.
    1. Namespace Server : The server that is used to control the namespace (Host Namespace). In the case of a domain namespace, this server can be a member server or a domain controller, and you can set up multiple namespace servers, or, in the case of a stand-alone namespace, this server can be a member server, with a controller or stand-alone server, but only one namespace server.
    2. namespace root : It is the starting point for the namespace, such as the name of the root directory is public, the name of the namespace is \\contoso.com\public, and it is a domain namespace. Its name begins with a depressed. If this is a stand-alone namespace, the name of the namespace begins with the computer name, such as \\server1\public. The

      is shown by the figure that this namespace root is a shared folder that is mapped to a namespace server, which by default is%systemdrive%\dfsroots\public, which must be located on an NTFS disk partition.

    3. folder and folder destination : The targets for these virtual folders are mapped to shared folders within other servers. When a client browses to a folder, DFS redirects the client to the shared folder that the folder target is mapped to. A total of 3 folders, respectively, are described below.
    • Pictures: This folder has two targets, which are mapped to the C:\Pictures shared folder of the server Server2 C:\Pictures and Server3, which has the wrong function of the folder. For example, when a client reads a file within a folder pictures, even if Server2 fails, it can still read the file from Server3 C:\Pictures. Of course Server2 's C:\Pictures and Server3 's C:\Pictures are stored in the same file (synchronous).
    • Database: This folder has two targets, which are mapped to the D:\database shared folder of the server Server3 C:\database and Server4, and it also has the ability to debug folders.
    • Reports: This folder has only one destination and is mapped to the D:\Reports shared folder of the server Server4, because there is only one target, so there is no troubleshooting function.
    1. DFS Replication : The two targets of the folder pictures in the figure map to the shared folder where the files provided to the client must be synchronized, and this synchronization operation can be run automatically by the DFS Replication service. The DFS Replication service uses a compression calculus technique called remote differential compression, which detects where files are being changed, so copying a file only replicates the changed area, not the entire file, which can reduce the burden on the network.

      If the target server for the stand-alone namespace is not joined to a domain, the files whose targets are mapped to the shared folder must be manually synchronized.

      Legacy Windows systems are responsible for replicating DFS folder replication with the Sysvol folder of the domain controller through the File Replication service (Files Replication service,frs). However, the DFS Replication service is now responsible for as long as the domain functional level is more than Windows Server 2008.

Replication topology

Dfs can choose from the following topologies to copy files.

    • hub and spoke: it treats one server as a hub and creates a connection to all other servers (pivots). The file is copied from the hub to all pivots and also copied from the pivot point to the hub. The pivot point does not copy files directly to each other.
    • fully interlaced (full Mesh): It creates a connection between all servers, and the files are copied from each server to all other servers.
    • Custom Topology : You can create your own logical connection relationships between servers, that is, you specify the server, and only the servers that you specify will copy files.

Depending on the bandwidth of the company's network, the geographical location of the network and the organization structure of the company, decide which topology to use. Regardless of which topology you choose, you can enable or disable the connection relationship between the two servers yourself, for example, if you do not want Server2 to copy files to Server3, you can disable Server2 to Server3 one-way connection.

Note: The various topological connection relationships in the hardware are not really connected in this shape, but rather are copied by using the logical connection relationships that these shapes describe when copying files.

System Requirements for DFS

A stand-alone namespace server can be played by a domain-controlled, member-server, or stand-alone server, while a domain namespace server can be played by a domain-controlled or member-server.

The server participating in DFS Replication must be in the same AD DS forest, and the replicated folders must reside within the NTFS disk partition (Refs,fat32 and fat are not supported.) The antivirus software must be compatible with DFS and, if necessary, contact the antivirus software vendor to confirm compatibility.

If you want to set the mode of the domain namespace to Windows Server2008 mode, the domain functional level must be at least Windows Server 2008, and all domain namespace servers must be at least Windows Server2008.

Distributed File System Example Demo

We will contact you to create a domain namespace as shown, and three servers are win Ser Data. While Server1 is a domain control, Server2 and 3 are member servers, create this domain environment first.

The name of the namespace in the figure, public, because it is a domain namespace, so the full name will be \\contoso.com\public, which maps to the C:\DFSRoots\Public folder of the namespace server Server1. The settings data for the namespace is saved to the memory buffer of the AD DS Server1 with the namespace server. In addition, a folder picture was created, which has two targets, pointing to the shared folder of Server2 and Server3, respectively.

Installing related components for DFS

The roles that each server plays are not exactly the same, so the services and features that you need to install are different.

    • Server1: Figure Server1 is a namespace server that needs to install the DFS namespace service (DNS Namespace service), but because this computer is also domain controlled, domain control automatically installs and enables the service by default. So there is no need to manually install it, we will use this server to manage DFS, so we need to install the DFS Management tool ourselves.
    • Server2 and Server3: The two target servers need to replicate files from each other pictures shared folders, so they all need to install the DFS Replication service. When you install the DFS Replication service, the system automatically installs DFS management tools so that you can manage Dfs on Server2 and Server3.
Installing the DFS Management tool on Server1

Add roles and Features-select features-Remote server Administration Tools-Role management tools-File Services tools-dfs management Tools

Installing the required DFS components on Server2 and Server3

Installing the DFS service on Server2 and 3: File and Storage Services-file and iSCSI services-dfs replication

Create a shared folder on Server2 and Server3

Create the C:\pictures folder on both Server2 and 3 and set it as a shared folder, assuming the share name is pictures, give everyone the read \ Write share permission, and copy some files in the pictures of Server2. Used to verify that these files can indeed be automatically copied to Server3 through the DFS mechanism.

Note: In real-world environments, security should be ensured through appropriate permissions, and this is an experiment, so set everyone up.

Create a new namespace
    1. In DC1, on the DFS Management page, click New namespace to the right of the namespace.

    1. Select DC1 as a namespace server

    1. Set namespace names (for example, public)

Note: The system is created by default on the%systemdrive% disk of the namespace server Dfsroots\public

Shared folder, share is named public, all users have read-only permissions, and if you want to change the settings, you can click Edit Settings.

    1. Select the domain namespace and the Windows Server 2008 mode is selected by default. Because the domain name is contoso.com, the name space name of the site is \\contoso.com\public.

    1. Check settings are correct click Create

    1. After the completion of the interface

Create a folder

Create the Dfs folder pictures shown, whose two targets are mapped to \\server2\pictures and \\server3\pictures, respectively.

Create a folder pictures and map the target to the\\Server2\Pictures
    1. Click New Folder

    1. Set the folder name and click Add Path to enter folder destination.

Clients can access files within the mapped shared folder through the path to the preview namespace in the background map.

Add another target and map it to the\\Server4\Pictures
    1. Continue to click Add to set the new destination path for the folder

    1. Select No, the next backdoor replication group and replication settings do not buy the replication settings between the description two targets

    1. After the completion of the interface

The destination of the folder pictures is mapped to both \\Server2\Pictures and Server3 shared folders. Later, if you need to increase the target, you can click Add Folder target on the right.

Replication group and replication settings

If a Dfs folder has multiple destinations, the files within the shared folder for these target mappings must be synchronized. We can let these targets automatically copy files to synchronize. However, you need to set these target servers to the same replication group and make the appropriate settings.

    1. Click the Copy folder to the right of the folder pictures

    1. Click Next, using the default replication group name and folder name (or set your own name).

    1. The servers that are eligible to participate in replication are listed below

    1. Select the primary member (for example, Server2), and when Dfs first starts performing the copy file operation, the files within this primary member are copied to all other destinations.

Note: DFS will replicate the primary member's files to other targets only when the copy work is performed for the first time, and subsequent replication work is replicated according to the selected replication topology.

    1. After selecting the replication topology, click Finish (You must have 3 or more servers participating in replication before you can select a distributed topology).

    1. You can select 24x7 and use full bandwidth for replication. You can also copy further settings by specifying the date and time

    1. When you are sure that the settings are correct, click Create

    1. Click OK

This dialog box reminds you that if there are multiple domain controllers in the domain, the above settings will take a while to replicate to other domain controllers, and other servers participating in replication will take some time to obtain these settings from the domain controller. In summary, the server participating in the replication takes a while to start the replication process.

    1. Because our Server2 is the primary member, later when DFS first performs a copy operation, the files within \\Server2\Pictures are copied to \\Server3\Pictures. Is that Server3 has been copied to completion.

Note: On the first copy, the system will move the files that existed in \\Server3\Pictures into the folder dfsprivate\preexisting, but because Dfsrprivate is a hidden folder, So if you want to see this folder, you need to show hidden files.

From the second start of the copy operation, you will follow the replication topology to determine how replication is made, for example, if the replication topology is set to interleaved, when you copy a file to a shared folder on any one server, the DFS Replication service copies the file to all other servers.

Replication topology and scheduling settings

If you want to modify replication settings, you can change replication settings by using the actions pane on the right, such as increasing the server participating in replication, adding replication folders, creating replication connections between servers, changing the replication topology, creating diagnostic reports, and so on.

Regardless of what the replication topology is, you can enable or disable the connection relationship between the two servers yourself, for example, if you do not want Server3 to copy the files to Server2, Disable Server3 to Server2 one-way connection: Click Link-double-click Send Member server3-uncheck enable replication on this connection .

You can also filter files or subfolders by double-clicking the pictures under the copied folder, and the filtered files or subfolders will not be copied. Can I use wildcard characters when filtering? or *, for example *.tmp, to exclude all files with a. tmp extension.

Testing the DFS functionality from the client is healthy

We use the WIN8 client to illustrate how to access DFS files. The computer maps the network drive first.

Note: If you want to access a standalone DFS, change the domain name to a computer name, such as \\server5\public\pictures.

How to know if the file accessed is located in Server2 or SERVER3, you can open Computer Management in Server2 and 3 to see where your users and computer names appear on the platform.

Once you know the server is connected, shut down the server and then go to the WIN8 computer to access the files within the pictures, and you will find that you can also access the files within the pictures because Dfs has been redirected to another server (with a slight delay).

Add more than one namespace server

Multiple namespace servers can be installed within the DFS schema of the domain name space to increase availability. All namespace servers must be subordinate to the same domain.

First, the new namespace server must have the DFS namespace service installed by adding roles and features within Server Manager. The DFS namespace is checked in the role interface.

Note: When you install the DFS namespace service, the system automatically installs the DFS management tool so that you can manage DFS through this server.

Next, you can add a namespace server to the DC1 to enter the server name.

Client-side Reference settings

When a DFS client accesses a resource in a namespace, the domain controller or namespace server provides a reference list (referrals) to the client, which contains the target server that owns the resource, and the client tries to access the required resources from the server that is located at the front of the list. If this server fails to provide services due to a failure, the client will be directed to the next target server in the list.

If a target server must suspend the service for any reason, such as shutting down maintenance, you should avoid the client being redirected to this server, that is, do not let the server appear in the reference list, and set the method to click the Disable folder target in the namespace against the server.

How do you determine the order of the target servers in the reference list, which can be referred to by right-clicking on the namespace-property-. The diagram provides the cache duration, sorting method, and client failback settings.

Cache duration

When the client obtains the list of references, it caches the list in the client computer, which can be obtained directly from the buffer in the future when the client needs this list, and does not need to be applied to the namespace server or domain control to provide efficiency. However, this list has a certain expiration date, which is 300 seconds by default.

Set the order of destination servers in the reference list

In the list of references that the client obtains, the destination server is ranked in the list in the following order.

    1. If the target server is in the same AD DS site as the client, the server is listed first, and if there are multiple servers, the servers are randomly ranked first.
    2. If the target server is located in a different AD DS site than the client, the servers are arranged after the aforementioned servers (the same site as the client), and the following arrangements exist between the servers.
    • minimum costs (lowest cost): If these servers are located in different AD DS sites, the lowest site connection cost takes precedence. If the costs are the same, they are randomly arranged.
    • random order: These servers are arranged in random order regardless of which AD DS site the destination server is in.
    • exclude targets outside the client site (exclude targets outsideof client's site): These servers are not listed in the reference list as long as the target server is in a different AD DS site than the client.

Note: The reference setting for a namespace is inherited by the folder and folder target under it, but it can also be set directly for the folder, and its settings override the settings inherited by the namespace. You can also set the target for a folder, and its settings override settings that are inherited by namespaces and folders.

Client fail back

When a preferred destination server accessed by a DFS client fails to provide services for any reason, the client will go to the next target server in the list, and the client will continue to access the server that is not the best (for example, it is at another high-cost site), even if the preferred server that was previously failed is back to normal. If you want the original preferred restore after the client can automatically go back to this server, check the client failure recovery to the preferred target .

Note: Once back to the original server, all newly accessed files will be read from this preferred server. However, files that were previously opened from a non-preferred server will continue to be read from that server.

Distributed File System

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.