18 December, 2010

Configuring DFS {Distributed File System}

Distributed File System

Data is an integral part of any profession. Data comprises of 2 Parts - Storage and Access

Storage - Data can be stored on local hard drive, removable device or more securely on NAS/SAN. Administrators knows that more the data is critical, more important it is to keep the data on various locations so as to provide backup and fail over in case of any failure. What if the data is stored on a central drive and that drives fails? The answer is simple. A Backup. But then how much time will it take to restore the backup and during that time will my users be able to access that data ? No.....

The answer to this is what I keep multiple copies of that data on different drives. Cool... But how can I make sure that the data is in Sync. This is taken care by File Replication Service which replicates my data

Access - Data when present on another server can bee accessed by multiple ways

1. IP Address of the Server : \\192.168.1.1\MyLink1
2. Name/FQDN of the Server : \\win2k3-dc1\MyLink1
3. Mapped Drive : M: (\\win2k3-dc1\MyLink1)

Now lets talk about the disadvantages associated with all the above 3 ways to access the data

1. IP Address of the Server : \\192.168.1.1\MyLink1

Firstly, we have to give the IP address of our server to our users thereby making it more prone to attacks. Secondly, my users have to remember the IP address of all the servers where my data reside
Thirdly, they along with the IP they have to remember the complete path of the data
Fourthly, when ever the IP address of my server changes, my users have to be notified

2. Name/FQDN of the Server : \\Win2k3-dc1\MyLink1

Firstly we have to give the name of our server to our users thereby making it more prone to attacks Secondly, my users have to remember the name of all the servers where my data reside
Thirdly, they along with the name of the server also have to remember the complete path of the data

3. Mapped Drive : M: (\\Win2k3-DC1\MyLink1)

The maximum numbers of Mapped Drives can be 23 keeping the fact in mind that users machine will have at least one hard drive, one floppy drive and one CD drive to which an alphabet would already been assign.
Now, what if we have more than 23 shares to be accessed by the users. In this case, the map drives will be short in number

To overcome all these limitation, Microsoft came up with DFS (Distributed File System), there giving only a single link to the users to access all the data i.e \\domainname\Root or \\contoso.com\MyRoot

More ever, we now had an option to segregate the data according to process, departments, positions - "Hierarchical Distribution of Data"
Hierarchical Distribution is achieved by using a Root and Links in DFS

Root : Starting Point of DFS. It can store data or links. It is recommended to store links in Root and data in Links

Links : Created under Root so as to create hierarchy. Different links can be created for different processes in a company like one link for HR, one for Marketing and so on. Links can also be created for different Positions like a link for the Managers, another Link for Engineers (Even though you can put all the data in one link or even on Root but would you like your engineer to view the salary slip of your Manager... :))


Before creating Root and Links in DFS, Create folders for a root and for links


Creating the same folders on Server B


There are 2 types of Root:

1. Domain
2. Standalone

(Difference between Domain Root & Standalone Root: http://www.adshotgyan.com/2010/12/domain-root-standalone-root-in-dfs.html)


The name of the Root is the Name of your Domain. You cannot change the name of the Root here


Specify the name of the server which will store the data of the Root




Specify a Name for a Root. The name that you will specify here will be a part of the Root.
Domain Name + Root Name
Contoso.com  + MyRoot

DFS : \\contoso.com\MyRoot



For redundancy, you can create a Root Target which will ALSO host the Root and its data





Now we have a Root (\\contoso.com\MyRoot). Now when User needs to access the data, they can browse to \\contoso.com\MyRoot

But is this the real location of this Root? No.
The real location for this Root \\contoso.com\MyRoot is \\win2k3-dc1\MyRoot & \\win2k3-dc2\MyRoot

Users will never come come to know the real location of the Root. The real location is known as Referral.
So users will access \\contoso.com\MyRoot and they will get either a Referral from \\win2k3-dc1\MyRoot or a Referral from \\win2k3-dc2\MyRoot



As stated earlier, we can either store all our data on the root itself or we can create links to store the data
Links are created to bifurcate the data so that users get only the data which they require


Specify a Link Name and the Path (Folder on the drive where the actual data will be stored)



Note that the folder has to be created and shared prior to creating a link
We do not get any option to create and share a folder while creating a link in DFS



Just like we created a Target for the Root, here we can create a Target for the Link as well


While creating the Target, you will get an option t enable Replication. Note that this option was not there when we added another Target for the Root. This is because Microsoft does Recommends to create Links to store the data and then enabled replication on the links so that the data remains in Sync.

Please note that if data is stored on Root, then enable the Replication on the Root. But in this scenario, do NOT create any links. This is for the fact that since we have enabled replication on the root, so the data will replicate using FRS. Now if we create links in the Root, then it will tend to replicate the links as well. But the links are already replicated when we configure Root Targets. So now FRS will tend to replicate Links twice there by creating Morphed folders

So, in case you have stored the data on the Root and enable replication directly on the Root, then do not create links inside that Root

The best way is to create a Root, then Links inside that Root, Store the data in those Links and enable replication on those Links






Select the server that you wants to be the Initial Master

Initial Master: The server selected as the Initial Master will be treated as Authoritative for the data for this Initial Replication. Once the Initial Replication is completed, both the servers will be at par

Ex: Suppose we have 3 Files on Win2k3-DC1 and 2 Files on Win2k3-DC2. Now we configure Win2k3-DC1 as Authoritative. This means that all the 3 Files from Win2k3-DC1 will replicate to Win2k3-DC2 and the 2 Files on Win2k3-DC2 will be removed/deleted.

In case you have existing data, the choose this option very carefully as this will delete the data on the server which is NOT selected as Initial Master


Select the type of Topology that you want to Use

1. Ring
2. Hub and Spoke
3. Full Mesh
4. Custom


Notice the "Round" sign that now appears on the links. This shows that Replication is enabled on these Links