SQL – Creating a SQL Server AlwaysOn on Amazon EC2, Part 2

In Part 1 we have prepared servers and underlying network for the Failover Cluster installation. By now we are in the following state:

Cluster4

Failover Cluster is a Windows feature, so we just need to enable/install it:
Cluster0
Wizard will ask for a few configuration parameters.
First, we need to select nodes participating in a cluster:
Cluster1Then we can give cluster a name and assign IP addresses that will be used by the Cluster itself.
Cluster2As you can see the above IPs are the second IPs of the first interfaces configured/allowed preveously through the Amazon.

We do not need a shared storage, therefore we can just finish this wizard.
As a result we should see an operational windows failover cluster with two nodes:

Cluster5Notice that one of the IP addresses is offline – this is correct. But if you see status of “Failed” then check resources’ properties:

Cluster6Cluster object must have been created in AD:

Cluster14To make sure cluster is fully operational we can try moving it’s core resources to another node and back:

Cluster7If you open the properties of the cluster resource [this is in the CLUSTER CORE RESOURCES section on the main page] you might see DNS Status being not OK:

Cluster15When Cluster was established it also needed to create an A DNS record for the Cluster name – CLUSTER2 in my case. Cluster also modifies this A record every time resource goes from one node to another because IP address is changing. If you go to the DNS you won’t see a record for the Cluste name eather:

Cluster18What I have discovered is that having a secondary DNS set to Amazon creates this issue. Making sure that there is only AD DNSes configured solved the issue. The record was automatically created and modified next time the cluster resources were moved to another node.

Cluster19Also bear in mind that Amazon scripts adds additional suffixes to the network configuration when a Windows instance is started.

Cluster20We need one more thing – we need a Quorum to make this two node cluster a failure awair.
File share witness will do the job. I’m gonna use my Domain Controller for that.
I’ve created a shared folder C:\Cluster and gave the “Full control” NTFS permissions to the cluster name – CLUSTER2$:
Cluster11Now we can point our cluster to that share:
Cluster8Cluster9Cluster12As a result we end up with the following configuration:

Cluster13At last we are ready to deploy our SQL Server with a cool AlwaysOn feature, but this is going to be shown in Part 3 🙂

Advertisements

Leave a Comment here

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s