SIOS SANless clusters

SIOS SANless clusters High-availability Machine Learning monitoring

  • Home
  • Products
    • SIOS DataKeeper for Windows
    • SIOS Protection Suite for Linux
  • News and Events
  • Clustering Simplified
  • Success Stories
  • Contact Us
  • English
  • 中文 (中国)
  • 中文 (台灣)
  • 한국어
  • Bahasa Indonesia
  • ไทย

Archives for March 2018

Configure SQL server failover cluster instance In Microsoft Azure IAAS

March 9, 2018 by Jason Aw Leave a Comment

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

7/19/2016 Update – The steps below describe a deployment in Azure “Classic”. If you are deploying a SQL Cluster in Azure Resource Manager (ARM) then you should see my article here. https://clusteringformeremortals.com/2016/04/23/deploying-microsoft-sql-server-2014-failover-clusters-in-azure-resource-manager-arm/

Before we begin, we are going to make some assumptions that you are at least slightly familiar with failover clustering and Microsoft Azure and have already signed up for an Azure account. Throughout this Step-by-Step guide, we will refer to additional resources for additional reading. Included in this guide are screen shots and code examples. Azure is a rapidly developing product, so your experience may be different than that described. But you should be able to adapt and adjust as needed. I will attempt to keep this article up to date my adding additional comments as time progresses. The new Azure Portal is still in the Preview stage as of the writing of this article. Therefore, we will use the currently supported portal along with PowerShell in all of our examples.

At a high level, these are the following steps that need to be taken in order to create a highly available SQL Server deployment on Azure IaaS. If you already have a functioning domain in Azure IaaS you can skip items 1-3.

We will take a closer look at each of these steps below.

  • Create your Virtual Network
  • Create A Cloud Service
  • Create Storage Account
  • Create your Azure VMs and Storage
  • Configure Active Directory
  • Create a Cluster
  • Create Replicated Cluster Volume Resources
  • Install SQL into the Cluster
  • Create an Internal Load Balancer
  • Update the Client Listener

Overview

These instructions assume you want to create a highly available SQL Server deployment entirely within one Azure region. It is entirely possible to configure SQL Server clusters that span different geographic regions within Azure, or even Hybrid Cloud configurations that span from on premise to the Azure Cloud or visa-versa. It is not my intent to cover those types of configurations in this document. Instead, the configuration I will focus on the configuration is illustrated in in Figure 1.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS
Figure 1 – SQL Server Failover Cluster in Azure

This article will describe how to create a cluster that spans two different Fault Domains and Update Domains within an Azure region. Spanning different Fault Domains eliminates downtime associated with Unplanned Downtime. Spanning different Update Domains eliminates failures associated with Planned Downtime.

For additional overview information, you may want to watch the webinar I did on SQLTIPS that discusses this topic in detail. It can be viewed at http://www.mssqltips.com/sql-server-video/360/highly-available-sql-server-cluster-deployments-in-azure-iaas/

Create Your Virtual Network

In order for this to work, you will need to have all of your VMs within a Virtual Network. Creating a Virtual Network is pretty straight forward. The screen shots below should help guide you through the process.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

At this point I like to add the Google DNS Server address of 8.8.8.8. I have experienced weird connectivity issues when trying to download updates from Microsoft when using their default DNS servers. After we have downloaded all of the updates that these servers need we will come back and replace the DNS server IP address with the IP address of our AD controller. But for now, add 8.8.8.8 and all of your VMs provisioned in this Virtual Network will receive this as a DNS server via the DHCP service. This forum post describes the problem I have experienced without adding this DNS server entry. Before adding all of your servers to the domain I have found that you need to delete this 8.8.8.8 address and replace it with the IP address of the first domain controller that you create.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

You will see that I created one subnet in this Virtual Network and labeled it Public. Later on when we create our VMs we will use the Public network. While Azure recently added support for multiple NICs per VM, I have found that adding multiple subnets and NICs to an Azure VM can be problematic. The main problem is that each NIC is automatically assigned a Gateway address, which can causes routing problems due to multiple Gateways being defined on the same server.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

It will take a few minutes for your Virtual Network to be created.

Create A Cloud Service

Your VMs will all reside in the same “Cloud Service”. Good luck finding the definition of an Azure “Cloud Service”, since Azure overall is a “Cloud Service”. However, this is a very specific think specific to Azure IaaS that you need to create before you start deploying VMs. The screen shots below will walk you through the process.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Make sure you put the Cloud Service in the same Region as your Virtual Network.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Create Storage Account

Before you begin provisioning VMs you must create a Storage Account. Follow the steps below to create a storage account.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Make sure you create a Storage Account in the same Location as your Virtual Network

Create Your Azure VMS And Storage

If you have not downloaded and installed Azure PowerShell yet, do that now. Also, make sure you set your default subscription and CurrentStorageAccountName.

We will start with provisioning the first VM which will become the Domain Controller (DC). In our example, we will also use the DC as a file share witness, so we will create an Availability Set that will include the Domain Controller and the two nodes in the cluster. The following is an example script which will create the VM and assign it a “Static Address”.

$AVSet=”SQLHA”

$InstanceSize=”Large”

$VMName=”DC1″

$AdminName=” myadminaccount”

$AdminPassword=”mypassword”

$PrimarySubnet=”Public”

$PrimaryIP=”10.0.0.100″

$CloudService=”SQLFailover”

$VirtualNetwork=”Azure-East”

$ImageName=”a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201412.01-en.us-127GB.vhd”

$image = Get-AzureVMImage -ImageName $ImageName

$vm = New-AzureVMConfig -Name $VMName -InstanceSize $InstanceSize -Image $image.ImageName –AvailabilitySetName $AVSet

Add-AzureProvisioningConfig –VM $vm -Windows -AdminUserName $AdminName -Password $AdminPassword

Set-AzureSubnet -SubnetNames $PrimarySubnet -VM $vm

Set-AzureStaticVNetIP -IPAddress $PrimaryIP -VM $vm

New-AzureVM -ServiceName $CloudService –VNetName $VirtualNetwork –VM $vm

Tech Note – I say “Static IP Address”, but it really just creates a DHCP “Request”. I call it a DHCP “Request” and not “Reservation” because it really is only a best effort request. If this server is offline and someone starts a new server, the DHCP server could hand out this address to someone else, making it unavailable when this server is turned on.

Once you create your 1st VM you are ready to create the two SQL VMs used in the cluster. You will see that I tried to make the script easy to use by allowing you to specify the different variables. I highlighted the variables you need to change for each VM.

$AVSet=”SQLHA”

$InstanceSize=”Large”

$VMName=”SQL1″

$AdminName=”myadminaccount”

$AdminPassword=”P@55w0rd”

$PrimarySubnet=”Public”

$PrimaryIP=”10.0.0.101″

$CloudService=”SQLFailover”

$VirtualNetwork=”Azure-East”

$ImageName=”a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201412.01-en.us-127GB.vhd”

$image = Get-AzureVMImage -ImageName $ImageName

$vm = New-AzureVMConfig -Name $VMName -InstanceSize $InstanceSize -Image $image.ImageName –AvailabilitySetName $AVSet

Add-AzureProvisioningConfig –VM $vm -Windows -AdminUserName $AdminName -Password $AdminPassword

Set-AzureSubnet -SubnetNames $PrimarySubnet -VM $vm

Set-AzureStaticVNetIP -IPAddress $PrimaryIP -VM $vm

New-AzureVM -ServiceName $CloudService –VNetName $VirtualNetwork –VM $vm

Run the script once again to provision the 2nd cluster node

$AVSet=”SQLHA”

$InstanceSize=”Large”

$VMName=”SQL2″

$AdminName=” myadminaccount”

$AdminPassword=”mypassword”

$PrimarySubnet=”Public”

$PrimaryIP=”10.0.0.102″

$CloudService=”SQLFailover”

$VirtualNetwork=”Azure-East”

$ImageName=”a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201412.01-en.us-127GB.vhd”

$image = Get-AzureVMImage -ImageName $ImageName

$vm = New-AzureVMConfig -Name $VMName -InstanceSize $InstanceSize -Image $image.ImageName –AvailabilitySetName $AVSet

Add-AzureProvisioningConfig –VM $vm -Windows -AdminUserName $AdminName -Password $AdminPassword

Set-AzureSubnet -SubnetNames $PrimarySubnet -VM $vm

Set-AzureStaticVNetIP -IPAddress $PrimaryIP -VM $vm

New-AzureVM -ServiceName $CloudService –VNetName $VirtualNetwork –VM $vm

You see that each of these VMs are all placed in the same Availability Set, which I called “SQLHA”. By placing the VMs in the same Availability Set you take advantage of Fault Domains and Update Domains as described here. http://blogs.technet.com/b/yungchou/archive/2011/05/16/window-azure-fault-domain-and-update-domain-explained-for-it-pros.aspx

Once you have created your VMs, your Azure Portal should look like this.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Words Of Wisdom About Fault Domains

Fault Domains are a great concept; however Microsoft dropped the ball by not guaranteeing (As of Jan 2015) that you will always get three fault domains per Availability Set. In fact, most of the time I only get two Fault Domains. If you wind up with just two Fault Domains you will want to consider putting your File Share Witness in a different region just to be 100% sure that you don’t have a majority of your cluster votes sitting in the same rack. Once Windows Server 10 is GA this will no longer be a problem as you will be able to use a Cloud Witness instead of a File Share Witness. If you would like to see three Fault Domains be the standard, follow this link and VOTE for that idea on Azure idea website.

Configure Active Directory

First we will connect to DC1 via RDP and enable active directory. Use the “Connect” button to download the RDP connection to DC1. Use the username and password that you specified when you created your Azure VM. Promote DC1 to a Domain Controller.

INSIDER TIP – I HAVE ALSO FOUND THAT DNS RESOLUTION WORKS BEST IF YOU REMOVE ALL DNS FORWARDERS ON THE DNS SERVER AND JUST USE ROOT HINTS. AZURE CAN SOMETIME HAVE PROBLEM RESOLVING MICROSOFT WEB PROPERTIES IF YOU USE THEIR DNS SERVERS ARE FORWARDERS.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS
Figure 2 – Remove all forwarders for reliable name resolution

Create A Cluster

Once you have configured DC1 as a Domain Controller, you will connect to SQL1 and SQL2 and add them to the domain. However, before you do that, you will need to change the DNS Server of the Virtual Network to that of the DC1 Server (10.0.0.100) and reboot both SQL1 and SQL2. Once SQL1 and SQL2 have 100.0.0.100 as their DNS Server you will be able to join the domain.

Once you are joined to the domain you will have to complete steps illustrated below to create a SQL Server Failover Cluster Instance (FCI).

First, enable .Net 3.5 Framework on each node.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

If you find that .Net Framework cannot be installed, refer to my tip about DNS.

Enable Failover Cluster

Now that .Net 3.5 is enabled, you will then need to enable the Failover Cluster Feature on both SQL1 and SQL2.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Validation

Once the cluster feature is enabled, you will need to create the cluster. The first step is to run cluster Validation. I am assuming you are familiar with clustering, so I will just post a few of the screen shots and make note of things you need to consider.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

The Validation will complete, but there will be some warnings. Most of the warnings will be around storage. You can ignore those as we will be using replicated storage rather than a shared disk. Also, you may get a warning about the network. You can also ignore that warning as we know that Azure has network redundancy built in at the physical layer.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Create Cluster Access Point

11/24/2015 UPDATE – I have found that creating a cluster via Powershell avoids all this issues described in the GUI steps show below because you can specify the IP Address of the Cluster as part of the creation process. The two PowerShell commands below replace all the steps show in the GUI screen shots that follow in this section. Make sure the StaticIaddress parameter

Test-Cluster –Node Server1, Server2

New-Cluster –Name MyCluster –Node Server1, Server2 –StaticAddress 10.0.0.200

If you ran the Powershell Script above then you can skip the rest of this section and jump right to the next section on creating the file share witness.

I would advise creating the Click Finish to start the cluster creation process. First choose a name for the cluster.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

You will see that there are some warnings if you click View Report. You can ignore the warning as we will be creating a File Share Witness.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

You may get the following message after the cluster creates. “The action ‘Validate Configuration…’ did not complete.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Fix Cluster Access Point IP Address

The underlying issue here is that the cluster is not resolving the cluster name properly due to an IP address conflict. What you will find is that Azure DHCP actually gives out a duplicate IP address to the cluster computer object that you just created. This is just one of the weird Azure idiosyncrasies that you will have to deal with as shown below.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

You may need to open the Failover Cluster GUI on SQL2 in order to connect. Once you are able to connect to the cluster you will see that the cluster grabbed the same IP address as one of the cluster nodes. This of course causes IP address conflicts.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

What we need to do is change the 10.0.0.102 IP address to another IP address not used in this subnet.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

You will see I picked 10.0.0.200 as my address. This address is NOT reserved in the DHCP scope as there is currently no way to control the DHCP scope or add reservations. I just pick an address at the upper end of the DHCP scope and make sure that I don’t provision enough VMs within this subnet to ever reach that IP address.

Now that the Cluster IP address is fixed you will be able to connect to the cluster using Failover Cluster Manager from either node.

Create File Share Witness

Next we will create a File Share Witness for the cluster quorum. For a complete description of cluster quorums read my blog post on MSDN press, http://blogs.msdn.com/b/microsoft_press/archive/2014/04/28/from-the-mvps-understanding-the-windows-server-failover-cluster-quorum-in-windows-server-2012-r2.aspx

The file share witness will be created on the Domain Controller. Essentially you need to create a file share on DC1 and give read/write permissions to the cluster computer account “sioscluster”. Make sure to make these changes to both the Share and Security permissions as shown below.

The following steps are done on DC1.

Create a new folder.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Make sure you search for Computer objects and pick the cluster computer object name, in our case, SIOSCLUSTER

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Make sure you give it Change permissions.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

You also need to change the Security to allow the cluster computer object Modify permissions on the folder.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Once you create the shared folder, you will add the File Share Witness using the Windows Server Failover Cluster interface on either of the nodes as shown below.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Install DataKeeper

DataKeeper Cluster Edition from SIOS Technology is needed in order to provide the replication and cluster integration that will allow you to build a failover cluster instance without shared storage. First, you will install DataKeeper Cluster Edition on both of the nodes of your cluster. Run through the setup as shown below.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

For demonstration purposes I used the domain administrator account. The only requirement is that the user account used is in the local administrator group in each server.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Create A DataKeeper Volume Resource

After you install the software on each cluster node (SQL1 and SQL2) you are ready to create you first replicated volume resource. Launch the DataKeeper GUI on either node and follow the steps below to create a DataKeeper Volume Resource.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

After you connect to both servers, click on the Server Overview Report. It should look like the following.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

You’ll notice that you are connected to both servers, but there are no volumes listed. Next we will need to add additional storage to each cluster node. Do this through the Azure portal as shown below.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

After you have added the additional volume to each VM and created a formatted partition, you DataKeeper GUI should look like this.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

You are now ready to launch the Create a Job Wizard and create the DataKeeper Volume resource as shown below.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Create the job and give it a name and optional description.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Install SQL Into The Cluster

Now that you have the cluster configured and a DataKeeper Volume in Available Storage, you are ready to begin the SQL Server Cluster Installation. This process is exactly the same as if you were installing a SQL Server Failover Cluster Instance using shared storage. Since the DataKeeper Replicated Volume resource is a Storage Class resource, failover clustering treats it like a Physical Disk resource. Follow the steps pictured below to install SQL Server into the cluster.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

You can use SQL Server 2014 Standard Edition to build a 2-node Failover Cluster. In this scenario DataKeeper can also replicate Data to a 3rd node, but that node cannot be part of the cluster. If you want to create a 3+ node cluster you will need to use SQL Server 2014 Enterprise Edition. Earlier versions of SQL work perfectly fine as well. I have tested SQL 2008 through SQL 2014.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Before clicking Next, click on the Data Directories tab.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Once SQL is installed on the first node, you will then need to run the installation on the second node.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Create An Internal Load Balancer

Once the cluster is configured, you will need to create the internal load balancer(ILB) which will be used for all client access. Clients that connect to SQL Server will need to connect to the ILB instead of connecting directly to the cluster IP address. If you were to try to connect to the cluster directly at this point you would see that you cannot connect to the cluster from any remote system. Even SQL Server Management Studio will not be able to connect to the cluster directly at this point.

Run this Powershell Command from your local desktop to create your Internal Load Balancer (ILB).

# Define variables

$IP = “10.0.0.201” # IP address you want your Internal Load Balancer to use, this should be the same address as your SQL Server Cluster IP Address

$svc=”SQLFailover” # The name of your cloud service

$vmname1=”sql1″ #The name of the VM that is your first cluster node

$epname1=”sql1″ #This is the name you want to assign to the endpoint associated with first cluster node, use anything you like

$vmname2=”sql2″ #The name of the VM that is your second cluster node

$epname2=”sql2″ #This is the name you want to assign to the endpoint associated with second cluster node, use anything you like

$lbsetname=”ilbsetsqlha” #use whatever name you like, this name is insignificant

$prot=”tcp”

$locport=1433

$pubport=1433

$probeport=59999

$ilbname=”sqlcluster” #this is the name your clients connect to, it should coincide with you SQL cluster Name Resource

$subnetname=”Public” #the name of the Azure subnet where you want the internal load balancer to live

# Add Internal Load Balancer to the service

Add-AzureInternalLoadBalancer -InternalLoadBalancerName $ilbname -SubnetName $subnetname -ServiceName $svc –StaticVNetIPAddress $IP

# Add load balanced endpoint to the primary cluster node

Get-AzureVM -ServiceName $svc -Name $vmname1 | Add-AzureEndpoint -Name $epname1 -LBSetName $lbsetname -Protocol $prot -LocalPort $locport -PublicPort $pubport -ProbePort $probeport -ProbeProtocol tcp -ProbeIntervalInSeconds 10 –DirectServerReturn $true -InternalLoadBalancerName $ilbname | Update-AzureVM

# Add load balanced endpoint to the secondary cluster node

Get-AzureVM -ServiceName $svc -Name $vmname2 | Add-AzureEndpoint -Name $epname2 -LBSetName $lbsetname -Protocol $prot -LocalPort $locport -PublicPort $pubport -ProbePort $probeport -ProbeProtocol tcp -ProbeIntervalInSeconds 10 –DirectServerReturn $true -InternalLoadBalancerName $ilbname | Update-AzureVM

Assuming the script ran as planned, you should see the following output.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

 

Update The Client Listener

Once the internal load balancer is created we will need to run a Powershell script on SQL1 to update the SQL Server Cluster IP address. The script references the Cluster Network name and the IP Resource Name. The pictures below show you were to find both of these names in Failover Cluster Manager.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

The script below should be run on one of the cluster nodes. Make sure to launch Powershell ISE using Run as Administrator.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

# This script should be run on the primary cluster node after the internal load balancer is created

# Define variables

$ClusterNetworkName = “Cluster Network 1” # the cluster network name

$IPResourceName = “SQL IP Address 1 (sqlcluster)” # the IP Address resource name

$CloudServiceIP = “10.0.0.201” # IP address of your Internal Load Balancer

Import-Module FailoverClusters

# If you are using Windows 2012 or higher, use the Get-Cluster Resource command. If you are using Windows 2008 R2, use the cluster res command which is commented out.

Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{“Address”=”$CloudServiceIP”;”ProbePort”=”59999″;
SubnetMask=”255.255.255.255″;”Network”=”$ClusterNetworkName”;
”OverrideAddressMatch”=1;”EnableDhcp”=0}

# cluster res $IPResourceName /priv enabledhcp=0 overrideaddressmatch=1 address=$CloudServiceIP probeport=59999 subnetmask=255.255.255.255

Assuming your script ran as expected, the output should look like below. You see that in order for the changes to be applied, you will need to bring your cluster resource offline once and then bring it online.

Step-By-Step: How To Configure A SQL Server Failover Cluster Instance (FCI) In Microsoft Azure IaaS

Firewall

Open TCP port 59999, 1433 and 1434 are open on the firewall of each server.

Summary

Now that the cluster is created you can connect to the SQL Failover Cluster Instance via the Internal Load Balancer, using the name sqlcluster or directly to 10.0.0.201.

Find such articles about SQL server failover cluster instance useful, do read our other blog posts.

Reproduced with permission from Clusteringformeremortal

 

Filed Under: Clustering Simplified Tagged With: cluster, SQL Server, SQL Server Failover Cluster, SQL Server Failover Cluster Instance

Azure As A Cloud Backup Service Your Windows Clients

March 9, 2018 by Jason Aw Leave a Comment

Azure As A Cloud Backup Service Your Windows Clients

Just announced this week, Azure can now be used for Windows 7/8 client backups. The first 5 GB are free, then it is $0.20 per GB. You can get about 105 GB (compressed) per month for about $20. That is half the price of MozyHome. What do you all use for your offsite backups for your home PC?

Reproduced with permission from https://clusteringformeremortals.com/2014/12/18/azure-as-a-cloud-backup-service-your-windows-clients/

Filed Under: Clustering Simplified Tagged With: Azure, cloud backup, Windows

Azure Storage Service Interruption…Time For Disaster Recovery Plan

March 8, 2018 by Jason Aw Leave a Comment

Azure Storage Service Interruption…Time For Disaster Recovery Plan

Yesterday evening Pacific Standard Time, Azure storage services experienced a service interruption across the United States, Europe and parts of Asia, which impacted multiple cloud services in these regions.

As part of a performance update to Azure Storage, an issue was discovered that resulted in reduced capacity across services utilizing Azure Storage, including Virtual Machines, Visual Studio Online, Websites, Search and other Microsoft services.

Read the whole report on the Azure blog. http://azure.microsoft.com/blog/2014/11/19/update-on-azure-storage-service-interruption/

So what does this outage mean to those thinking about a cloud deployment? Global “interruptions” of this magnitude certainly cannot occur on any regular basis for any cloud provider. Especially if it intends to remain in the cloud business, whether they are Microsoft, Amazon, Google or other. However, as a cloud architect or person responsible for a cloud deployment, you have a responsibility to your customer to have a “Plan B” in your back pocket. Time to plan for disaster recovery in case the worst case scenario actually happens.

What Is A Good Disaster Recovery Plan?

Plan B involves having a documented procedure for recovering data and services in an alternate location in the event of a wide spread outage that impacts a cloud provider’s ability to deliver their service. This plan is important even if you had a highly resilient cloud deployment designed to keep running even in the event of localized outages within a region, availability zone or fault domain.

Data Recovery, Application Recovery, and Client Access

At a high level you should be concerned about three things: Data Recovery, Application Recovery, and Client Access. There are many ways to address these concerns, some more automated than others. Some with a better Recovery Time Objective (RTO) and Recovery Point Objective (RPO) than others.

What Configuration To Beat The Outage?

It was just last week that I blogged about how to create a multisite cluster that stretched between the AWS cloud and the Azure cloud. This type of configuration is just what is needed in the event of an outage of the magnitude that we just experienced yesterday in the Azure cloud.

Azure Storage Service Interruption…Time For “Plan B”
Figure 1 – Example of a Cloud-to-Cloud Multisite Cluster Configuration

“Cloud-To-Cloud” Replication Model

Another alternative to the “cloud-to-cloud” replication model is utilizing your own datacenter as a disaster recovery site for cloud deployment. It is advantageous to have physical ownership of your data. But it would mean you are back in the business of managing a datacenter. This can negate some of the benefit of a pure cloud deployment.

Azure Storage Service Interruption…Time For “Plan B”
Figure 2 – Hybrid Cloud Deployment Model

If you are not ready to go full on cloud, make use of the cloud as a disaster recovery site. This is probably the easiest and most cost effective way to implement an offsite datacenter for disaster recover. Start taking advantage of what the cloud has to offer without fully committing to moving all workloads into the cloud.

Azure Storage Service Interruption…Time For “Plan B”
Figure 3 – Using the Cloud as a Disaster Recovery Site

DataKeeper Cluster Edition

The illustrations shown above make use of the host based replication solution called DataKeeper Cluster Edition to build multisite SQL Server clusters. However, DataKeeper can be used to keep any data in sync. Either between different cloud providers or in the hybrid cloud model.

Reminder! Have A Plan B

Microsoft is not alone in dealing with cloud outages as outages have impacted Google, Microsoft, Amazon, DropBox and many others just this year alone. Having a “Plan B” in place is a must have anytime you are relying on any cloud service.

Reproduced with permission from https://clusteringformeremortals.com/2014/11/20/azure-storage-service-interruptiontime-for-plan-b/

Filed Under: Clustering Simplified Tagged With: Azure storage, data recovery, disaster recovery

Windows Server 10 Storage Replica Configuration And Failover Cluster

March 7, 2018 by Jason Aw Leave a Comment

Windows Server 10 Storage Replica Configuration And First Impressions

Exciting New Feature – Storage Replicas!

One of the most exciting new features in Windows Server 10 announced by Microsoft is Storage Replicas. It is described by Microsoft here: http://technet.microsoft.com/en-us/library/dn765475.aspx#BKMK_SR. And further down the article, I’ll also look at failover clusters.

“Storage Replica (SR) is a new feature that enables storage-agnostic, block-level, synchronous replication between servers for disaster recovery, as well as stretching of a failover cluster for high availability. Synchronous replication enables mirroring of data in physical sites with crash-consistent volumes ensuring zero data loss at the file system level. Asynchronous replication allows site extension beyond metropolitan ranges with the possibility of data loss.

What value does this change add?

Storage Replication enables you to do the following:

Provide an all-Microsoft disaster recovery solution for planned and unplanned outages of mission-critical workloads.

Use SMB3 transport with proven reliability, scalability, and performance.

Stretch clusters to metropolitan distances.

Use Microsoft software end to end for storage and clustering, such as Hyper-V, Storage Replica, Storage Spaces, Cluster, Scale-Out File Server, SMB3, Deduplication, and ReFS/NTFS.

Help reduce cost and complexity as follows:

Hardware agnostic, with no requirement to immediately abandon legacy storage such as SANs.

Allows commodity storage and networking technologies.

Features ease of graphical management for individual nodes and clusters through Failover Cluster Manager and Microsoft Azure Site Recovery.

Includes comprehensive, large-scale scripting options through Windows PowerShell.

Helps reduce downtime, and increase reliability and productivity intrinsic to Windows.

Provide supportability, performance metrics, and diagnostic capabilities.”

What About Other Use Cases?

They mention a lot of use cases “… Hyper-V, Storage Replica, Storage Spaces, Cluster, Scale-Out File Server, SMB3, Deduplication, and ReFS/NTFS”. I’m not even sure what they mean by listing technologies such as ReFS/NTFS, Deduplication, SMB3, Storage Replica, Storage Spaces. These seem more like features rather than use cases, which I’m going to assume they are.

But let’s look at some of the other use cases they mentioned: Hyper-V, Cluster, Scale-out-File Server. I can easily imagine how Storage Replica is going to enhance these use cases by enabling shared nothing Scale-Out-File Servers and multisite clusters, including Hyper-V, SQL Server, File Servers, etc. In some cases it can also enable SANLess local area network clusters, allowing clusters to be built without requiring a shared Physical Disk resource.

Let’s Look At Failover Clusters

In my first look at this solution, I decided to focus on what I know and love, failover clusters. To keep things easy I decided I was going to focus on building a simple two node traditional file server (not scale out file server). I will start with three fresh VMs in an entirely pure Windows Server 10 domain.

Getting Started

It was easy enough to download the ISO’s and then install onto my 3 VMs went surprisingly fast. Promoting a DC was a pretty similar experience to 2012 R2. Although I think it was made a little more obvious that you have to actually run the DCPromo after the AD feature was installed.

I got my domain installed and my basic two node cluster with no resources built without a problem. Next, I used VMware Fusion as my Hypervisor since it supports nested Hypervisors (a feature sorely lacking in Hyper-V for testing and demo by the way). Then, I added a few additional VMDK files to each VM in my cluster and formatted them as E: and F: on each VM, figuring these would be my replica volumes. Another point to note, I had not defined resources yet and the cluster had no shared storage. Perfect, ready to start configuring Storage Replica!

And The Replication Process Kicks Off

So I fire up the Failover Cluster Manager and start poking around to see how I could start the replication process. There was absolutely nothing in the UI that I could find that said, Replica, Replication or anything even close to that. Because the documentation hadn’t shipped and the bits had only become available a few hours ago I was on my own to figure it out, despite my desperate Twitter searches for a how to blog. No problem I said, I’m a cluster MVP and my specialty is replication and multisite clusters so I’ll figure this out.

After a little searching I find that there is a new feature called Windows Volume Replication.

Windows Server 10 Storage Replica Configuration And First Impressions

Uh. What’s Happening?

Great, so I enable that on both nodes thinking this is going to be great, but still nothing is jumping out at me in the Windows Failover Cluster UI that says “Configure Replica”. Scratching my head some more and trying to reach out to a few smart people I still had no clue. Then it dawned on me…”maybe it only supports Cluster Disk?” Now the feature announcement says “supports commodity storage”. To me that means any old hard drive in my PC or in this case the attached virtual disk on my VMs. As it turns out, I was correct; the disk has to appear in the cluster as a Physical Disk Resource in Available Storage.

Getting Somewhere Finally

OK, not the greatest requirement, but I continued plugging away. To get some disks that could be added as Physical Disk Resources attached to my VMs I enabled the iSCSI target role on my DC and create two iSCSI Virtual Disks for each of my VMs. Now remember, this is not like a regular cluster so each of these virtual disks were only assigned to one VM, they were not shared.

Windows Server 10 Storage Replica Configuration And First Impressions

One each VM I used the iSCSI initiator to connect to these disks, initialized, onlined and formatted them. I then used Failover Cluster Manager to add them to the cluster.

Finally, I see some new options for replication.

I still struggled for a while to get the Replication enable button to even become selectable.

Must Know!

Here are the IMPORT things you need to know to get this show on the road:

  • The Disk must be Physical Dis Resources in the cluster. This means they must support SCSI3 reservations and must pass cluster validation.
  • The Disk must be GPT, not MBR
  • Each Disk you want to replicate must have an associated Disk to be used for the “Log File”. I assume this is where they queue data when replication is interrupted or in asynchronous mirrors where the data can be slightly behind
  • You must add the disk (just the data disk, not the log disk) to a cluster resource BEFORE your can enable replication. You cannot enable replication on a disk that is sitting in Available Storage
  • Your Source and Target Servers must have the same size disks and volume letters

Enabling Replication

Once you do that you will finally be able to enable Replication.

Like I said, you will need to choose a source log disk that needs to be in available storage. Microsoft recommends a SSD disks. I don’t know how big it should be. I assume the bigger it is the longer replication can be interrupted before you consume all the space and break your mirror.

Next step is to choose the Disk on your target server. If you get a message like “No Storage Available” you probably need to move “Available Storage” so that the target disk is Online on the Secondary server.

Make sure nothing in the Technical Preview the Move Available Storage seems to be broken if you choose “Select Node”. However, if you choose “Best Possible Node” and things seem to work. Available Storage will come online on the SECONDARY server.

Now all Available Storage should be online on the SECONDARY server.

 

And a disk for the target’s log file

This looks like a nice feature, especially for WAN replication. Apparently you can seed to destination disk, avoiding a full sync over the WAN.

The next screen just confirms everything…

Failover Cluster Manager – When All Is Said And Done

Your cluster should look like this. You’ll probably notice that the Replication status displays “Unknown”. I’m assuming that is a bug that will be addressed later.

Failover Cluster Manager

The Other Bug

I noticed that the File Share creation wizard that is available via the Failover Cluster Manager doesn’t seem to work. It just closes unexpectedly after you launch it. However, you can create shares on the active node using File Manager and it will automatically be added to the cluster.

Some basic testing seems to indicate that Failover Cluster Manager works fine. Just be careful that you know which of your volumes are the replicated data volumes and which ones are the log volumes. Data written to the log files is not replicated, so if you make a mistake (like I did) you may think replication is not working.

And finally, after all this trial and error I come to find that Microsoft has started to post at least a few pointers on how to make this work. Check out the requirements in this post from Ned Pyle, Storage Replica PM.

http://social.technet.microsoft.com/Forums/windowsserver/en-US/f843291f-6dd8-4a78-be17-ef92262c158d/getting-started-with-windows-volume-replication?forum=WinServerPreview&prof=required

My Thoughts…

I reserve my thoughts until I have some more time to play with this feature…

Reproduced with permission from https://clusteringformeremortals.com/2014/10/04/windows-server-10-storage-replica-configuration-and-first-impressions-windows10/

Filed Under: Clustering Simplified Tagged With: failover cluster, storage replica, storage replication

  • « Previous Page
  • 1
  • …
  • 3
  • 4
  • 5

Recent Posts

  • Transitioning from VMware to Nutanix
  • Are my servers disposable? How High Availability software fits in cloud best practices
  • Data Recovery Strategies for a Disaster-Prone World
  • DataKeeper and Baseball: A Strategic Take on Disaster Recovery
  • Budgeting for SQL Server Downtime Risk

Most Popular Posts

Maximise replication performance for Linux Clustering with Fusion-io
Failover Clustering with VMware High Availability
create A 2-Node MySQL Cluster Without Shared Storage
create A 2-Node MySQL Cluster Without Shared Storage
SAP for High Availability Solutions For Linux
Bandwidth To Support Real-Time Replication
The Availability Equation – High Availability Solutions.jpg
Choosing Platforms To Replicate Data - Host-Based Or Storage-Based?
Guide To Connect To An iSCSI Target Using Open-iSCSI Initiator Software
Best Practices to Eliminate SPoF In Cluster Architecture
Step-By-Step How To Configure A Linux Failover Cluster In Microsoft Azure IaaS Without Shared Storage azure sanless
Take Action Before SQL Server 20082008 R2 Support Expires
How To Cluster MaxDB On Windows In The Cloud

Join Our Mailing List

Copyright © 2025 · Enterprise Pro Theme on Genesis Framework · WordPress · Log in