How To Configure Failover Cluster In Windows 2008 R2
Intro
On July 9, 2019, support for SQL Server 2008 and 2008 R2 will end. That means the end of regular security updates. However, if you motion those SQL Server instances to Azure or Azure Stack (I volition only refer to both every bit Azure for the balance of the guide), Microsoft will give y'all three years of Extended Security Updates at no additional charge. If you lot are currently running SQL Server 2008/2008 R2 and y'all are unable to update to a later version of SQL Server earlier the July 9th deadline, you lot will want to have reward of this offering rather than running the risk of facing a future security vulnerability. An unpatched instance of SQL Server could pb to data loss, downtime or a devastating data breach.
One of the challenges you will face when running SQL Server 2008/2008 R2 in Azure is ensuring high availability. On premises you may be running a SQL Server Failover Cluster (FCI) instance for high availability, or possibly you are running SQL Server in a virtual machine and are relying on VMware HA or a Hyper-V cluster for availability. When moving to Azure, none of those options are available. Downtime in Azure is a very real possibility that you lot must take steps to mitigate.
In guild to mitigate the possibility of downtime and qualify for Azure's 99.95% or 99.99% SLA, you have to leverage SIOS DataKeeper. DataKeeper overcomes Azure's lack of shared storage and allows y'all to build a SQL Server FCI in Azure that leverages the locally attached storage on each instance. SIOS DataKeeper non only supports SQL Server 2008 R2 and Windows Server 2008 R2 as documented in this guide, information technology supports whatsoever version of Windows Server, from 2008 R2 through Windows Server 2019 and any version of SQL Server from from SQL Server 2008 through SQL Server 2019.
This guide will walk through the procedure of creating a two-node SQL Server 2008 R2 Failover Cluster Example (FCI) in Azure, running on Windows Server 2008 R2. Although SIOS DataKeeper besides supports clusters that span Availability Zones or Regions, this guide assumes each node resides in the aforementioned Azure Region, but dissimilar Fault Domains. SIOS DataKeeper will be used in identify of the shared storage normally required to create a SQL Server 2008 R2 FCI.
Pre-Requisites
Active Directory
This guide assumes you have an existing Active Directory Domain. You can manage your own Domain Controllers or employ Azure Active Directory Domain Services. For this tutorial nosotros will connect to a domain called contoso.local. Of form y'all will connect to your own domain when following this tutorial.
Open Firewall Ports
– SQL Server:1433 for Default Case
– Load Balancer Health Probe: 59999
– DataKeeper: these firewall rules are added to the Windows host based firewall automatically during installation. For details on which ports are opened consult the SIOS documentation.
– Keep in mind, if you accept any network based security in place that blocks ports between the cluster nodes you lot will need to account for these ports at that place as well.
DataKeeper Service Account
Create a Domain business relationship. Nosotros will specify this business relationship when we install DataKeeper. This account will need to be added to the Local Administrators grouping on each node of the cluster.
Create the get-go SQL Server Instance in Azure
This guide volition leverage the SQL Server 2008R2SP3 on Windows Server 2008R2 image that is published in the Azure Marketplace.
When yous provision the first instance you will have to create a new Availability Ready. During this process be sure to increase the number of Fault Domains to 3. This allows the two cluster nodes and the file share witness each to reside in their ain Error Domain.
If you don't already have a virtual network configured, allow the creation wizard to create a new one for you.
In one case the instance is created, go in to the IP configurations and brand the Private IP address static. This is required for SIOS DataKeeper and is best practise for clustered instances.
Brand sure that your virtual network is configured to ready the DNS server to be a local Windows Advertising controller to ensure you volition be able to bring together the domain in a later step.
After the virtual machines are provisioned, add together at least two additional disks to each case. Premium or Ultra SSD are recommended. Disable caching on the disks used for the SQL log files. Enable read-only caching on the disk used for the SQL data files. Refer to Performance guidelines for SQL Server in Azure Virtual Machines for additional information on storage best practices.
Create the 2nd SQL Server Instance in Azure
Follow the same steps every bit to a higher place, except be certain to place this instance in the same virtual network and Availability Set that you created with the 1st example.
Create a File Share Witness (FSW) Instance
In social club for the Windows Server Failover Cluster (WSFC) to work optimally yous are required to create another Windows Server instance and place it in the same Availability Set every bit the SQL Server instances. Past placing it in the same Availability Fix you ensure that each cluster node and the FSW reside in different Fault Domains, ensuring your cluster stays on line should an unabridged Fault Domain become off line. This instances does non require SQL Server, information technology tin can exist a uncomplicated Windows Server as all it needs to do is host a simple file share.
This example will host the file share witness required past WSFC. This example does not need to be the same size, nor does it require whatever additional disks to be fastened. It's but purpose is to host a simple file share. It can in fact exist used for other purposes. In my lab surround my FSW is as well my domain controller.
Uninstall SQL Server 2008 R2
Each of the two SQL Server instances provisioned already have SQL Server 2008 R2 installed on them. However, they are installed every bit standalone SQL Server instances, not clustered instances. SQL Server must be uninstalled from each of these instances earlier we tin install the cluster instance. The easiest mode to practise that is to run the SQL Setup as shown beneath.
When you run setup.exe /Action-RunDiscovery y'all will come across everything that is preinstalled
setup.exe /Activity=RunDiscovery Running setup.exe /Action=Uninstall /FEATURES=SQL,AS,RS,IS,Tools /INSTANCENAME=MSSQLSERVER kicks off the uninstall procedure
setup.exe /Activeness=Uninstall /FEATURES=SQL,Every bit,RS,IS,Tools /INSTANCENAME=MSSQLSERVER Running setup.exe /Action-RunDiscovery confirms the uninstallation completed
setup.exe /Action-RunDiscovery Run this uninstallation process again on the second instance.
Add instances to the Domain
All 3 of these instances volition demand to exist added to a Windows Domain. As mentioned in the Prerequisites department, you must take access to join an existing Windows Active Directory. In our case, we are joining a domain called contoso.local.
Add Windows Failover Clustering Feature
The Failover Clustering Feature needs to be added to the two SQL Server instances
Add-WindowsFeature Failover-Clustering Install Convenience Rollup Update for Windows Server 2008 R2 SP1
In that location is a disquisitional update ( kb2854082) that is required in order to configure a Windows Server 2008 R2 instance in Azure. That update and many more are included in the Convenience Rollup Update for Windows Server 2008 R2 SP1. Install this update on each of the two SQL Server instances.
Format the Storage
The additional disks that were attached when the 2 SQL Server instances were provisioned need to be formatted. Do the post-obit for each volume on each case.
Microsoft best practices says the following…
"NTFS allocation unit of measurement size: When formatting the data disk, it is recommended that you use a 64-KB allocation unit of measurement size for data and log files also as TempDB."
Run Cluster Validation
Run cluster validation to ensure everything is prepare to be amassed.
Import-Module FailoverClusters Test-Cluster -Node "SQL1", "SQL2"
Your report will contain WARNINGS about Storage and Networking. You can ignore those warnings equally nosotros know at that place are no shared disks and only a single network connection exists between the servers. You lot may also receive a alarm almost network binding lodge which tin can also be ignored. If you run into any ERRORS you lot must address those earlier you continue.
Error trying to run Cluster Validation?
I accept encountered this error on a few occasions and I'm still trying to sort out under what conditions this occurs. Occasionally yous will observe that exam-cluster fails to run as described in the forum post.
Test-Cluster Unable to Validate a Cluster Configuration. The operation has failed. The action validate a configuration did not consummate There is an error in XML document (5, 73). Attempt by method Microsoft.Xml.Serialzation.GeneratedAssembly.XmlSerialzationReaderClusterPrep.Config.Read4_As...Bolean) to access method MS.Internal.ServerClusters.Validation.TestAssemblyCollection.Add(MS.Internal.ServerClusters.5....Failed If this happens to you, I have found the following fix recommended in the forum post works for me.
Inside C:\Windows\System32\WindowsPowerShell\v1.0 make a re-create of powershell_ise.exe.config file (brand a re-create inside C:\Windows\System32\WindowsPowerShell\v1.0)- rename it to powershell.exe.config Open it with notepad- delete electric current config line and paste: <?xml version="ane.0" encoding="utf-8" ?> <configuration> <system.xml.serialization> <xmlSerializer useLegacySerializerGeneration="true"/> </system.xml.serialization> </configuration> - relieve and run test-cluster While this fix will allow you to run test-cluster from Powershell, I take found that running Validate through the GUI still throws an fault, even with this ready. I take a query in to Microsoft to see if they take a solution, but for at present if y'all need to run cluster Validation you may take to use Exam-Cluster in Powershell.
Create the Cluster
Best practices for creating a cluster in Azure would be to use Powershell to create a cluster, specifying a static IP accost. Powershell allows us to specify a Static IP Address, whereas the GUI method does non. Unfortunately, Azure's implementation of DHCP does not piece of work well with WSFC, so if you use the GUI method you will wind up with a indistinguishable IP accost as the Cluster IP Address that will demand to be fixed earlier the cluster is usable.
All the same, what I have found is that the typical New-Cluster powershell command with the -StaticAddress command doesn't work. To avoid the problem of the indistinguishable IP address, we take to resort to the cluster.exe utility and run the post-obit command.
cluster /cluster:cluster1 /create /nodes:"sql1 sql2" /ipaddress:10.0.0.100/255.255.255.0
Add the File Share Witness
Adjacent we demand to add together the File Share Witness. On the 3rd server we provisioned equally the FSW, create a folder and share it equally shown below. Yous will demand to grant the Cluster Name Object (CNO) read/write permissions at both the Share and Security levels as shown below.
Once the share is created, run the Configure Cluster Quorum wizard on one of the cluster nodes and follow the steps illustrated beneath.
Install DataKeeper
Install DataKeeper on each of the two SQL Server cluster nodes equally shown below.
This is where we volition specify the Domain account we added to each of the local Domain Administrators group.
Configure DataKeeper
Once DataKeeper is installed on each of the ii cluster nodes you are ready to configure DataKeeper.
NOTE – The most common fault encountered in the post-obit steps is security related, most ofttimes by pre-existing Azure Security groups blocking required ports. Please refer to the SIOS documentation to ensure the servers can communicate over the required ports .
First you must connect to each of the two nodes.
If everything is configured properly, yous should then see the following in the Server Overview written report.
Next, create a New Job and follow the steps illustrated below
Cull Yes hither to register the DataKeeper Book resources in Available Storage
Complete the to a higher place steps for each of the volumes. Once you are finished, you should see the following in the WSFC UI.
You are at present ready to install SQL Server into the cluster.
Note – At this point the replicated volume is only attainable on the node that is currently hosting Available Storage. That is expected, so don't worry!
Install SQL Server on the beginning node
If you desire to script the installation, I have included the instance below of a scripted cluster installation of SQL Server 2008 R2 into the offset node of cluster. The script to add a node to existing cluster is found further down in the guide.
Of course adjust for your environment.
c:\SQLServerFull\setup.exe /q /ACTION=InstallFailoverCluster /FEATURES=SQL /INSTANCENAME="MSSQLSERVER" /INSTANCEDIR="C:\Programme Files\Microsoft SQL Server" /INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server" /SQLSVCACCOUNT="contoso\admin" /SQLSVCPASSWORD="xxxxxxxxx" /AGTSVCACCOUNT="contoso\admin" /AGTSVCPASSWORD="xxxxxxxxx" /SQLDOMAINGROUP="contoso\SQLAdmins" /AGTDOMAINGROUP="contoso\SQLAdmins" /SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS" /FAILOVERCLUSTERGROUP="SQL Server 2008 R2 Group" /FAILOVERCLUSTERDISKS="DataKeeper Volume E" "DataKeeper Volume F" /FAILOVERCLUSTERIPADDRESSES="IPv4;10.0.0.101;Cluster Network 1;255.255.255.0" /FAILOVERCLUSTERNETWORKNAME="SQL2008Cluster" /SQLSYSADMINACCOUNTS="contoso\admin" /SQLUSERDBLOGDIR="East:\MSSQL10.MSSQLSERVER\MSSQL\Log" /SQLTEMPDBLOGDIR="F:\MSSQL10.MSSQLSERVER\MSSQL\Log" /INSTALLSQLDATADIR="F:\MSSQL10.MSSQLSERVER\MSSQLSERVER" /IAcceptSQLServerLicenseTerms If yous prefer to use the GUI, only follow along with the screenshots beneath.
On the offset node, run the SQL Server setup.
Cull New SQL Server Failover Cluster Installation and follow the steps as illustrated.
Choose just the options you need.
Please annotation, this document assumes y'all are using the Default instance of SQL Server. If you apply a Named Case you need to make certain you lock downwards the port that information technology listens on, and employ that port afterwards on when you lot configure the load balancer. Yous also will need to create a load balancer dominion for the SQL Server Browser Service (UDP 1434) in lodge to connect to a Named Case. Neither of those ii requirements are covered in this guide, but if you require a Named Instance information technology will work if you lot do those two additional steps.
Here you will need to specify an unused IP address
Go to the Information Directories tab and relocate information and log files. At the end of this guide we talk about relocating tempdb to a not-mirrored DataKeeper Volume for optimal performance. For now, simply proceed it on i of the amassed disks.
Install SQL Server on the second node
Below is an case of the command yous tin can run to add an additional SQL Server 2008 R2 node into an existing cluster.
c:\SQLServerFull\setup.exe /q /ACTION=AddNode /INSTANCENAME="MSSQLSERVER" /SQLSVCACCOUNT="contoso\admin" /SQLSVCPASSWORD="xxxxxxxxx" /AGTSVCACCOUNT="contoso\admin" /AGTSVCPASSWORD="xxxxxxxx" /IAcceptSQLServerLicenseTerms If yous prefer using the GUI, follow along with the following screenshots.
Run the SQL Server setup over again on the second node and cull Add node to a SQL Server Failover Cluster.
Congratulations, you lot are almost done! Nevertheless, due to Azure'southward lack of support for gratuitous ARP, we will need to configure an Internal Load Balancer (ILB) to assist with client redirection as shown in the following steps.
Update the SQL Cluster IP Address
In social club for the ILB to function properly, you must run run the following command from one of the cluster nodes. It SQL Cluster IP enables the SQL Cluster IP address to answer to the ILB wellness probe while too setting the subnet mask to 255.255.255.255 in order to avoid IP address conflicts with the health probe.
cluster res <IPResourceName> /priv enabledhcp=0 address=<ILBIP> probeport=59999 subnetmask=255.255.255.255 Note – I don't know if it is a fluke, merely on occasion I have run this control and information technology looks like information technology runs, but it doesn't consummate the job and I take to run it once more. The style I can tell if information technology worked is by looking at the Subnet Mask of the SQL Server IP Resource, if information technology is not 255.255.255.255 and then y'all know it didn't run successfully. It may simple be a GUI refresh issue, then yous tin also try restarting the cluster GUI to verify the subnet mask was updated.
After it runs successfully, take the resource offline and bring it dorsum online for the changes to accept effect.
Create the Load Balancer
The last step is to create the load balancer. In this case nosotros are bold you are running the Default Case of SQL Server, listening on port 1433.
The Individual IP Address you define when you Create the load balancer will be the verbal same address your SQL Server FCI uses.
Add just the two SQL Server instances to the backend pool. Practise Non add the FSW to the backend pool.
In this load balancing rule you must enable Floating IP
Validate the Cluster
Before you continue, run cluster validation one more time. The Cluster Validation report should return just the same network and storage warnings that it did the first time you ran it. Assuming in that location are no new errors or warnings, your cluster is configured correctly.
Edit sqlserv.exe Config File
In directory C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn we created a sqlps.exe.config file and sqlservr.exe.config with the following lines in the config file:
<configuration> <startup> <supportedRuntime version="v2.0.50727"/> </startup> </configuration> These files, by default, will not exist and may be created. If this file(south) already exists for your installation, the <supportedRuntime version="v2.0.50727″/> line but needs to exist placed with the <startup>…</startup> sub-section of the <configuration>…</configuration> section. This should be done on both servers.
Test the Cluster
The nearly simple test is to open up SQL Server Direction Studio on the passive node and connect to the cluster. If yous are able to connect, congratulations, you lot did everything correct! If you can't connect don't fear, you wouldn't be the commencement person to brand a mistake. I wrote a blog commodity to assistance troubleshoot the issue. Managing the cluster is exactly the aforementioned every bit managing a traditional shared storage cluster. Everything is controlled through Failover Cluster Manager.
Optional – Relocate Tempdb
For optimal performance it would be advisable to motion tempdb to the local, non replicated, SSD. However, SQL Server 2008 R2 requires tempdb to be on a clustered disk. SIOS has a solution called a Non-Mirrored Volume Resource which addresses this issue. It would be advisable to create a non-mirrored volume resources of the local SSD drive and motion tempdb there. However, the local SSD drive is non-persistent, so you must take care to ensure the folder holding tempdb and the permissions on that folder are recreated each fourth dimension the server reboots.
Later on you create the Non-Mirrored Volume Resources of the local SSD, follow the steps in this commodity to relocate tempdb. The startup script described in that commodity must be added to each cluster node.
For More Data
As always, if yous take questions or comments you can exit them in the comment section beneath or accomplish me on Twitter @daveberm
Source: https://clusteringformeremortals.com/2019/04/19/step-by-step-how-to-configure-a-sql-server-2008-r2-failover-cluster-instance-on-windows-server-2008-r2-in-azure/
Posted by: tateworactagoine.blogspot.com

0 Response to "How To Configure Failover Cluster In Windows 2008 R2"
Post a Comment