This is a step-by-step guide on how to set up a failover cluster in Windows Server 2008R2, in a test lab. A cluster is a group of independent computers that work together to increase the availability of applications and services, such as file server service or print server service. Physical cables and software connect the clustered servers (called nodes) so that if one fails another can take its place.
- To setup a failover cluster you need to have certain requirements met:
» The nodes in the cluster must have at least two NICs each. One for the production environment, and one for heartbeat signal between cluster nodes.
» The nodes in the cluster must have access to shared storage, be it iSCSI, SAN, NAS etc.
» An AD domain, where the nodes must be members of the same domain.
» There are also other AD related requirements, but basically you just need a user account with administrative privileges on the nodes, and Create Computer objects and Read All Properties permissions in the container/OU that is used for computer accounts in the domain.
- Software you will need to perform this exercise
» VirtualBox (or your virtualization Product of Choice)
» Windows Server 2008R2
» StarWind iSCSI SAN Free Edition
1. Installation of VirtualBox and Virtual Machines
1.1 Download and install VirtualBox, the installation procedure is quite straightforward, so I’m not going to write in details about that. Now create three virtual machines, with 1GB ram and 20GB disk each.
Server01: Domain Controller, will need 2 NICs
Server02: Cluster node, will need 3 NICs
Server03: Cluster node, will need 3 NICs
Give Server02 and Server03 three NICs each, while Server01 will only have two.
The NICs will serve the following purpose;
Production – The clients will connect to the cluster through this NIC
iSCSI – The nodes of the cluster will connect to the shared storage on Server01 through this NIC
Heartbeat – The heartbeat signal between the two nodes will be sent through this NIC
1.2 Mount the Server 2008R2 ISO on the three virtual machines, and install Server 2008R2 Enterprise edition (Full Installation). Failover Clustering feature is included in Enterprise and Datacenter editions of 2008R2 only. You can install Standard Edition on Server01, if you like, it does not make a difference.
1.3 Rename the three computers to Server01, Server02 and Server03 in Windows. Then give them the following IP addresses,
Server01: Nic1, ip=192.168.0.10, subnetmask=255.255.255.0, DNS preferred=192.168.0.10 Nic2, ip=192.168.1.10, subnetmask=255.255.255.0
Server02: Nic1, ip=192.168.0.20, subnetmask=255.255.255.0, DNS preferred=192.168.0.10 Nic2, ip=192.168.1.20, subnetmask=255.255.255.0 Nic3, ip=192.168.2.20, subnetmask=255.255.255.0
Server03: Nic1, ip=192.168.0.30, subnetmask=255.255.255.0, DNS preffered=192.168.0.10 Nic2, ip=192.168.1.30, subnetmask=255.255.255.0 Nic3, ip=192.168.2.30, subnetmask=255.255.255.0
1.4 Install the Guest Additions for VirtualBox, and restart the servers.
2. Installation of Active Directory
2.1 Install Active Directory on Server01.
Step-by-step guide on how to to create the first domain controller in a new Windows Server 2008R2 forest.
2.2 On Server01, open properties of NIC2 (the one designated to iSCSI), then browse to properties of ipv4, click Advanced, make these changes
2.3 On Server 01, click Start → Administrative Tools → DNS → right-click Server01 → Properties, and then make these changes
2.4 Join Server02 and Server03 to the domain.
3. Installation of StarWind iSCSI SAN Free Edition
3.1 Install StarWind iSCSI SAN Free Edition on Server01. You will use it to create iSCSI targets, and shared storage. Each service/application in the cluster will require its own shared storage.
3.2 After having created a target and storage on Server01, connect Server02 and Server03 to the target and the storage. Remember to use the 192.168.1.10 ip address of Server01 to connect to the iSCSI target.
3.3 Initialize the disk, bring it online and create a single volume, formatted with NTFS on Server02 only.
Here I have created a volume labeled Shared Storage, and assigned it the drive letter E: on Server02.
4. Installation of Failover Clustering Feature
Install the Failover Clustering feature on Server02 and Server03. You can either create a new domain account (remember the permissions it needs), or use the built-in Administrator account of the domain, to log on to the servers.
4.1 Start Server Manager → Features → Add Features → Choose Failover Clustering → Next → Install → Close
5. Validate and create the cluster
5.1 Click Start → Administrative Tools → Failover Cluster Manager
5.2 Right-click Failover Cluster Manager → Validate a Configuration
5.3 This will start the Validate a Configuration Wizard, click next
5.4 Click Browse
5.5 Write Server02;Server03, and then click Check Names, click OK
5.6 Click Next
5.7 Click Next → Next, the wizard will run all tests
5.8 When all tests are finished, you will be presented with a report. You can view the report, by clicking View Report (obviously)
As you can see, I received some warnings on the network configuration of the servers. If you click the Network link in the report, you can see a description of the warning.
Since this is not a production environment, but just a test lab, you can easily ignore all such warnings of trivial matter. The other warning you will receive is about drivers being unsigned. Once again, just ignore warnings of such trivial matters. All validation reports will be saved at %systemroot%\Cluster\Reports, so you can view the reports any time you like.
5.9 Click Create the cluster now using the validated nodes
5.10 The Create Cluster Wizard starts, click Next
5.11 Type the name you want to assign to the cluster, and then give it an IP address. As you remember, Nic1 was for the production environment, therefore untick the checkmark for the other two Nics and only assign the cluster an address in the 192.168.0.0/24 segment, such as 192.168.0.50 for example. Click Next twice, and the cluster will be installed.
5.12 Click Finish on the Summary page, and you are presented with the cluster you just created
6. Configure Quorum Type on the Cluster
6.1 As you can see in the previous screenshot, the Quorum Configuration is Node and Disk Majority. Since we currently have only one shared disk, we can not use this Quorum configuration, because that disk is being used as Quorum disk. So lets just change it to Node and File Share Majority.
6.2 First we must create a file share on Server01, and give it the appropriate share and NTFS permissions. On Server01 create a folder called Cluster01, right-click it and choose properties. On the Sharing tab, click Advanced Sharing, choose to share the folder and click Permissions. Click Add
6.3 Click Object Types
6.4 Tick off for Computers
6.5 Write Cluster01, click OK
6.6 Give the Cluster01 Virtual Computer Object, Full Control permissions. Click OK twice
6.7 Now choose the Security tab, and give the Cluster01 Virtual Computer Object, Full control permissions here as well
6.8 On Server02, in Failover Cluster Manager, right-click Cluster01, choose More Actions, and then choose Configure Cluster Quorum Settings
6.9 This will start the Configure Cluster Quorum Wizard, click Next
6.10 Choose Node and File Share Majority
6.11 Write the path to the share we created in step 6.2, or browse to it, then click Next, Next again, and Finish.
7. Configure Service or Application
7.1 For this test lab’s purpose, lets configure the File Server service on the cluster. But before we can do that, we need to add the File Services role on both nodes.
7.2 Start Server Manager -> Roles -> Add Roles -> Add the File Services role -> On Role Services, choose File Server and File Server Resource Manager -> Next -> Next -> Install
7.3 Now that the File Services role has been added on both nodes, head back to Failover Cluster Manager
7.4 In Failover Cluster Manager, Right-click Services and applications, and choose Configure a Service or Application
7.5 In the Wizards first page, click Next
7.6 Choose File Server, and then click Next
7.7 Give your new File Server a name and an IP address. This is the name clients will use to connect to the file server
7.8 Select Available shared storage (this is the storage we set up in Starwind iSCSI SAN). Next -> Next -> Finish
7.9 And thats it, you now have a clustered file server clients can connect to, and which will automatically failover to the second node, if the first node fails.
7.10 If you start AD Users and Computer, you will see two virtual computer objects that have been created for Cluster01, and Fileserver01
Microsoft Technet: Overview of Failover Clusters