How to install and configure windows failover clustering in windows server 2008/R2

Understanding the concept

A failover cluster is a group of independent computers that work together to increase the availability of applications and services. The clustered servers (called as nodes) are connected by physical cables and by software. If one of the cluster nodes fails, another node begins to provide service so that users experience a minimum of disruptions in service. In an organization they put a lot of value on mission-critical servers and rely on them heavily to run their businesses. As a result, server downtime can be very costly. For example, Unexpected  down time of a heavily used e-mail, database server or any other service can easily lost productivity or lost business for every hour that it is unavailable. In this case clustering can be used as a way to achieve high availability of these services.

Before configuring windows clustering we must make sure that you meets the below requirement,

1. The failover cluster feature is not available in Windows Web Server 2008 or Windows Server 2008 Standard.
2. It is recommended to have a dedicated network interface for failover clustering. So in a clustered server it is will have its existing NIC and an additional one that we are adding for now. Its not necessary to have additional NIC card but MS highly recommend this.
3. Since we are adding additional NIC card it is necessary to assign IP address to those and make sure that these addresses are static(Do not assign IP address through DHCP).
4. It is necessary to assign an IP address for clustering as well. So make sure that you have an IP address which can be assigned to it. Please note that if you have different networks in your server, we need to assign each network with its own IP address.
5. Make sure that each servers which are going to take part in clustering is same edition. Means either all the servers should be either Enterprise or Datacenter edition.
6. The user which are going to perform this action should have proper privilege on active directory(Delegated control to add and remove computers and users in AD) or administrative privilege.
Refer the below link for more information http://technet.microsoft.com/en-us/library/cc771404.aspx .

Installation and Configuring Windows failover clustering

We must make sure that you have added the relevant storage disks to server. If you are mapping the storage through iSCSI, you must map it using iSCSI initiator. Once the disks are attached through it, open disk management and newly added disks will be listed. These disks will be in the state of offline. Right click on the disk and select Online and convert those disk into New spanned volume. Performing this steps will allow you to list the storages are available for cluster.  You need to do the same on all the servers which are going to take part in clustering. Those steps are required only if you are adding the storage disk to failover clustering now and note necessary for cluster basic configuration.

1. Now make sure that the feature Failover clustering and multipath I/O is installed on all the nodes that are going to be the part of failover clustering.
Open Server manager->Features->Add feature. Now on the window Select features tick the check boxes for Failover clustering and multipath I/O, click Next.

2. Click on the button Install and wait for this to complete. Once it is succeeded close the windows.

  

3. I would recommend you to reboot the servers which are installed with these features.
4. Please note that here I am configuring two servers as part of failover clustering(Server-1 and Server-2). There are 3 storage disk attached to my both the servers using iSCSI initiator.
Once the servers are up, Open Failover cluster manager from Administrative tools. Before the cluster configuration, we can check whether the current configurations on the servers(Which are going to be the part of cluster) are suitable for failover clustering. It is highly recommended to perform this test so that we can avoid the failures during the configuration or the issues that may arise after configuration. Validating cluster configuration wizard performs the tests in mainly 4 areas that are,
a) Inventory b) Network c)Storage d) System configuration
Inventory tests- Provide an inventory of the hardware, software, and settings (such as network settings) on the servers, and information about the storage.
Network tests- Validate that your networks are set up correctly for clustering.
Storage tests- Validate that the storage on which the failover cluster depends is behaving correctly and supports the required functions of the cluster.
System Configuration tests- Validate that system software and configuration settings are compatible across servers.
Refer the this link for more details http://technet.microsoft.com/en-in/library/cc772055.aspx .

In order to perform the test, Right click on Failover cluster manager and select Validate a configuration wizard. Click Next on before you begin window which is explained about the tests that we are going to do now.
5. Now you need to specify the servers which are going to be the part of clustering. Type the host name or IP address of each servers and press ENTER. Once the servers are added click Next to continue.

6. Here we have to select which and all the tests that we need to perform now. These tests are as described in step 4 and its sub parts. If this is the first time that you are running the test I would recommend to select Run all test, and click Next. Where as you can select and run only the test that are required,  this is mainly used when you find any error after the initial test and you need to check whether the corrections that you made has made any changes.
 7. Click Next on confirm window and it will start the test.

8. Once the tests are completed you will have the below window and you must review the test results. If the test results reports any errors you will not be able to configure the cluster and you must resolve those issues. You may have suggestions as well to resolve the issue. The test results will also contain warning messages as well, review the messages and try to resolve as much.
9. Assuming everything is well for you as well. Now you can start the cluster configuration, right click on Failover cluster manager and select create cluster wizard. Click Next on Before you begin.

10. Add the servers which are all going to be the part of clustering. Enter the host name or IP address of the server and press ENTER else you can browse the servers, Click Next.


11. Now you need to specify the cluster name that you would like to. You can specify the name as your wish and note that the NetBIOS name is limited to 15 characters and if it exceeds it will automatically reduce and get first 15 characters of specified name also there should not be any spaces in cluster name. Also as described in the requirements of clustering we should specify a IP address which will be referred as cluster IP. If you have more than one networks defined in your server, you must specify different cluster IP for each network.
Click on Network address and type the IP address, make sure that the IP is not provided by DHCP and it should be static, Click Next.
12. Click Next on confirmation window to start the cluster configuration and wait for some time to complete this operation.
13. Once the cluster is configured you will have the below window which indicates that the cluster configuration is  successfully completed. You can review the reports or click Finish to close the window.
14. Performing the above steps will complete the cluster configuration which defines which are all the servers are going to act as failover servers.  I hope the step 1 has helped you to add the shared disk to your server(Using iSCSI). Now those disks are to be added to cluster so that it can act as failover.
Expand the newly created cluster and right click on the folder structure Storage. Select Add storage and If the disk are configured properly as cluster storage then those will list out automatically without any other change. Here I have 3 disks created so it will list and I am selecting all those as the part of clustering, click OK.

 Now you can see the disks that are available and they are part of cluster.


15. Now we need to configure quorum of the cluster. Quorum configuration of a cluster defines the number of failure that the cluster can sustain.  It is essential that the cluster stop running if too many failures occur or if there is a problem with communication between the cluster nodes. Quorum can be defined in four way depending on your configurations. We will discuss about it in below steps.
To start with quorum configuration right click on the cluster that you have created now->More actions->Configure cluster quorum settings. Click Next on before you begin window.


16. As described above here we need to specify which quorum configuration is required for you and its based on your nodes that are defined as part of failover clustering. I hoe you are clear with why do we need quorum in clustering. Now let us see its configuration types. There are four ways to achieve this,

Node Majority - This configurations are recommended only when you have odd number of nodes(servers) . That is,  when you have configured your failover clustering with odd number of servers you must go for this option. The number of failures that can sustain for clusters under this configuration is half the number of nodes minus one. For example, If you have seven servers in cluster it can have maximum of three node failures.
Node and Disk Majority- It is recommended when you have an even number of nodes(servers). The number of failures that this cluster can opt is based on disk witness.
If the disk witness remains online it can sustain failures of half the nodes. For example, an eight node cluster in which the disk witness is online could sustain four(8/2=4) node failures.
If the disk witness goes offline the cluster can sustain failures of half the nodes minus one. For example, a six node cluster with a failed disk witness could sustain two (3-1=2) node failures.
Node and File Share Majority- It works in a similar way to Node and Disk Majority, but instead of a disk witness, this cluster uses a file share witness. Note that if you use Node and File Share Majority, at least one of the available cluster nodes must contain a current copy of the cluster configuration before you can start the cluster. Otherwise, you must force the starting of the cluster through a particular node.
 No Majority: Disk Only- This is the least considered configuration and not recommended. It can sustain failures of all nodes except one (if the disk is online). However, this configuration is not recommended because the disk might be a single point of failure.
In my case I have two nodes so I will select the second option and click Next. You must decide the selection based on your cluster configuration.
17. Now you need to specify the storage which will contains a copy of the cluster configuration, called as disk witness. Select the node which is required to act as your witness disk and click Next(Here the disk will be listed that are added to our cluster storage as per step 14). Note that if you have select Node and File Share Majority you need to specify the shared location.
18. Now you will have the window to confirm the actions. Review the details and click Next.

 19. The quorum configuration will start and you will have the below windows. Once it is completed you can review the details and click Finish to close window.


So that completes the Windows failover clustering installation and configuration. You can confirm whether the clustering has completed successfully by taking one node as offline(Shutdown/restart) or right click the active node and from more actions Stop cluster service and on another node login and check if the disks are available.

How to do an in-place upgrade of Windows server 2008 R2 to Windows server 2012/2012R2

1. Make sure that your current hardware supports Windows server 2012 as per the MS recommendation.

Important: Make sure that the replication between all your DC are working properly, else you will fails to complete the below operations.
2. Before performing the upgrade, you must prepare your forest and domain for the changes. It can be achieved by using the command 'ADPREP'. ADPREP is a command line utility which will extends  the Active Directory schema, and updates permissions as necessary to prepare a forest and domain for a domain controller. In order to run the commands you must locate it from your server installation CD. Insert your Windows server 2012 installation CD and locate the directory using command prompt. In my case the installation CD is located in D drive and command will be cd D:\support\adprep press ENTER or open the directory and drag and drop the tool adprep from the location(D:\support\adprep) into command prompt.

a) Now run this command in your forest root server and prepare the forest for upgrade.
adprep /forestprep press ENTER. You will have warning message before this operation, type C and press ENTER to continue with the operation( You must be a member Schema Admins and Enterprise Admins groups to perform this action)


      Once the operation is completed you will have the below screen.
     


b) Now  prepare your domain for upgrade. On the same command prompt type adprep /domainprep and press ENTER. This operation will complete comparatively faster than the forest preparation.

More information of using the ADPREP is available in http://technet.microsoft.com/en-in/library/dd464018(v=ws.10).aspx
3. Replicate these changes to your additional domain controllers as well. On command prompt type RepAdmin /SyncAll /AdeP and press ENTER. Wait few seconds to complete and make sure succeeds.
4. Completing the above steps makes your server to be capable for upgrade. Now reboot your server from Windows server 2012 installation CD or open the CD drive and double click on SETUP.EXE to start with OS installation/upgrade.
5. Click on Install now and continue.


6. Here you need to specify either you want to perform a windows update before upgrade process or not. It is
recommended to perform windows update before upgrade process, else you can skip this. I have my latest update installed so skipping this operation by selecting No Thanks.

 7. Enter the product key and click Next to continue.


8. Select the operating system that you want to install and click Next. Note that you will not be able to upgrade from a lower edition to higher edition of OS. Means, if you have windows server 2008 R2 standard edition installed then you will not be able to upgrade to Datacenter edition of 2012. Here my existing server is datacenter edition so I will select as Windows server 2012 datacenter(Server with GUI).
  
9. Accept the License terms and click Next.
  
10. Next step actually determines whether it’s an installation or Upgrade. Click Upgrade: Install windows and keep files, settings and application.


11. Now it will perform a compatibility check and this must be passed in order to continue. If it detects any applications to be uninstalled or any other changes requires it will show and you need to exit and make the necessary changes.
Note: Upgrade process will fail if we need to make any changes before upgrade and it can be viewed on Compatibility report window. Also the report will be saved automatically on your desktop for you reference.
Assuming everything is OK and click Next to continue,


12. The upgrade process will start and we need to wait until the operation completes. The server will restart multiple times during this process.




 13. Now that’s it the upgrade process. Please note that this may take few hours to complete based on the features and application that is already existing on your server. For me it has taken about 1.5 hours to complete this operation but again it depends on your hardware efficiency. Please note that during the automatic reboot of your server it will prompt with Windows boot manager, you do not want to interrupt the operation and it will continue automatically.

How to install and configure Network load balancing in Windows server 2008

Understanding the concept

In simple words I must say the network load balancing(NLB) technology distributes traffic across TCP/IP network. Hence using NLB increases availability, scalability, and load-balancing performance of your applications on network. Each host runs a separate copy of the desired server applications (such as applications for Web, FTP, and Telnet servers). NLB distributes incoming client requests across the hosts in the cluster. The load weight to be handled by each host can be configured as necessary. You can also add hosts dynamically to the cluster to handle increased load. In addition, NLB can direct all traffic to a designated single host, which is called the default host. When we configure NLB between two servers we have two static IP address those servers and a commonly shared IP address assigned as cluster IP.  The machines all run an algorithm that determines whose turn is next at responding to requests.  They also exchange heartbeats with one another, so they all know if one server goes down then it won’t allocate any more requests to him(By default, when a host fails to send heartbeat messages within five seconds, it has failed) and you can have up to 32 machines in a cluster.

For more information refer the below links,

Configuring NLB cluster

Note :NLB does not support Dynamic Host Configuration Protocol (DHCP). NLB disables DHCP on each interface that it configures, so the IP addresses must be static. We must have another static IP address which should be assigned as cluster IP. So make sure that you have it before this process.

1. You must install the feature NLB on all servers which and all need to be take part in NLB clustering. In order to achieve that, From Server manager select Features->Add features and select Network load balancing, Click Next to continue.


2. Click on install button and close the installation results window once it succeeds.




3. To configure the cluster open NLB window. Start->Administrative tools->Network load balancing manager.
4. Now you need to create the cluster and its hosts which will handle the traffic. Right-click Network Load Balancing Clusters->Select New Cluster or Cluster->New to start.
5.  In the Host text box type the name or IP address of the host that is going to be the member of your NLB(If you are adding the server which is a remote host, make sure that the feature NLB is installed on that server as well, follow the above steps to achieve this), and then click Connect.


You may fail to connect to another server if the NLB feature is not installed on another server. Select the interface you wish to use for cluster and click Next.
6.  In Host Parameters, select a value in Priority which will  be Unique for each host . The host with the lowest numerical priority among the current members of the cluster handles all of the cluster's network traffic that is not covered by a port rule. You can override these priorities or provide load balancing for specific ranges of ports by specifying rules on the Port rules  defines on step 9.
Also you can add a dedicated IP address if required by clicking Edit button, Click Next.


7. In Cluster IP Addresses, click Add and type the cluster IP address that is shared by every host in the cluster. NLB adds this IP address to the TCP/IP stack on the selected interface of all hosts that are chosen to be part of the cluster, Click Next.


8. In Cluster Parameters, select values in IP Address and Subnet mask and type the full Internet name that users will public domain name that users request for access(Its going to be your NLB cluster name as well). If your are configuring NLB for a website you can specify that as your website name itself else leave as blank. Microsoft recommends to use Unicast operation mode for cluster operation, hence leave the cluster operation mode default and click Next.


9. The next step defines the most vital part which will help you to define the traffic across the cluster nodes. If you wish to control the server loads automatically you can click on Finish which will create the cluster node now. Let us consider the scenario that either of your server is having higher hardware configuration and obviously that server will be able to handle more load, so this can be achieved by defining the port requests. Means, the request from defined ports will hit to the defined server and the rest will go to another server. Click on Edit, Now define the port range that is required redirect to this host.

In Protocols, select TCP as the specific TCP/IP protocol that a port rule should cover. Only the network traffic for the specified protocol is affected by the rule. Traffic not affected by the port rule is handled by the default host. I would prefer the request through TCP/IP and UDP to hit on the same server, hence selected as Both.
In Filtering mode, select Multiple host which specifies that multiple hosts in the cluster handle network traffic for this port rule.
In Affinity ( It is the mode that determines how the servers are going to balance the load, for more http://technet.microsoft.com/en-in/library/cc733056.aspx )Select Single and click OK->Finish. Wait for few seconds to complete the configuration.


10. The below screen describes the steps that will happen during the configuration of NLB.


Steps 3 to 9 has helped us to create the cluster and one of its host. In a NLB structure we will have multiple host to handle the traffic and in order to add the another host,
Right click on the newly created cluster and select Add Host To Cluster. The above steps will help you as required(Except step 8 as we have already created the cluster). Once it succeeds you will have the below structure.

How to do a bare metal recovery of windows server 2008

Understanding the concept

Bare metal recovery(BMR) is a restore option which has introduced in windows server backup 2008 servers.  When you are using this restoration method, the backed up data is available in a form which allows one to restore a server from "bare metal", i.e. without any requirements as to previously installed software or operating system. When you create a full server backup it will automatically includes the components for bare metal recovery(Including system state and all the local disks) . If its a custom backup make sure that when you select the bare metal recovery option, you will have to select system state and all your disk drives as well. BMR typically only protects the operating system drive by default, this means if your server has multiple disks you will need to protect the data on those drives as well. It is also similar to System State in that it contains the components needed to get the operating system. The key difference between imaging a server or having the System State backed up on a server is that BMR can restore like an image but to dissimilar hardware. This means you can take the BMR and restore it on an entirely different hardware platform from the platform the server was originally running on.

Advantages of using bare metal recovery are, 
  • The backups can be restored to entirely new hardware.
  • It is faster that the manual backup process.
  • BMR is prone to lesser errors as human intervention in the backup process is minimized.
  • It saves a lot of administrative efforts during a disaster as all the settings/ configuration remains intact and the trouble of re-installing  individual software , operating systems manually can be avoided.

Let us consider the scenario that I need to perform bare metal recovery of my second server(server-2)and the backup is saved on another server(serer-1).

Performing bare metal recovery

1. Make sure that your backup is capable of performing bare metal recovery. Add item this in custom backup or full backup.
You can perform the bare metal recovery only if you have the backup with any of the below option.

Custom backup
  OR on Full backup 

Now let us see how to perform the bare metal recovery of the server,

2. Insert the operating system installation media into the server CD drive and boot from CD. You will have to select the language that you would like to continue, Select the desired and click Next.


3. Select the option Repair your computer and now we will have the windows for bare metal recovery.



4. Here you have multiple option to select the backup source . ie, If you have the backup on the same hard disk which is inserted now it will automatically detect and list it . If the backup is in a tape drive you must install the driver and click Load drivers to install the same, but make sure that you have the driver copied and attached to server with any of the optical media(CD/HDD/USB). Once the tape driver's driver is installed, on next step it will automatically list the available backups. In my case I have my backup saved on another server so it will generate a warning message(step 5). Now click on Next to continue,



5. If you do not have the backups saved on your server's local disk or on a tape drive you will have the warning message as shown below, click cancel in the re-image your computer window.


6. Since we have the backup located in another server you can point out that at coming steps. Click Next to continue,


7. Click on Advanced button and select the first option Search for a system image on the network.


8. Click YES on re-image your computer window and network share name that the server's backup exists, Click OK .



9. Type the user name and password to connect with the server  and it will automatically detect the backup available on specified server(Make sure that the backup folder is shared on that server). Select the most recent backup and it will enable the button to click Next.


10. Select the date and time of the backup that you want to restore and click Next to continue.


11. When you perform bare metal recovery it will format and repartition the entire HDD connected. This will help to all disks on this computer to match the layout of the system image. You can still exclude any of the HDDs if required. It is recommended to format and repartition all the hard disks if you are doing bare metal recovery on entirely new hardware or hard disk. By clicking Advance, you will see a window that allows you to control whether you want restart upon completion also allows you to perform a hard disk scan to check and possibly repair errors. Assuming this as default and click Next after your selection,


10. Click on Finish and Yes on re-image your computer window to start the bare metal recovery process


11. You will have the below windows when the restoration process continues.



12. Once the restoration is completed it will reboot the server and you can logon as usual.