次の方法で共有


Creating an Active/Active SQL Cluster using Hyper-V: Part2 the Clustered Instances

In part 1 of this series I showed you how to configure the virtual storage required for the cluster. In this part I will show you how to create the SQL cluster as an Active/Passive cluster and in the next part I will show how to convert it to an Active/Active cluster.

Introduction

In this series of posts I will walk you through the processes of creating an Active/Active SQL server cluster using Hyper-V and Microsoft iSCSI target software for virtualized SAN. The target is to create first a storage server hosted on a normal Windows 2008 R2 server. Then connect to this server using two other machines as iSCSI initiators. Then I will create the windows cluster along with the DTC clustered service. A clustered SQL server instance will then be created. Finally another clustered SQL server instance will be created and Active/Active configuration of both instances will be applied.

Solution Architecture

The solution is fairly simple as per the below configuration.

clip_image002

Windows Cluster Configuration Steps

Now that we have configured the storage we can start the windows failover cluster configuration.

1- Install the windows failover clustering feature to both nodes from the add feature wizard.
clip_image004

2- Bring all shared storage online to the current node.

3- Open the cluster management console and click create cluster. Note that it would be preferable to disable all disks at this stage from the iSCSI target but the disk that will be used as the Quorum.
clip_image006

4- In the select servers page click browse and select the two nodes
clip_image008
clip_image010

5- Perform the cluster validation using the selection to run the cluster validation wizard
clip_image012

6- Select all tests
clip_image014

7- Review the validation and make sure there are no validation errors
clip_image016

8- Back to the create cluster wizard. Give the new cluster a name and an unused IP
clip_image018

9- The cluster is created and the first disk assigned to the first LUN is treated as the Quorum disk of the cluster
clip_image020

10- If you disabled all disks from the iSCSI target but the Quorum disk then you will need to add them as a new storage to the cluster once they are needed. It is advisable to add every disk you will use once you need it.

11- Go and enable the first disk that will be used for the first cluster DTC.
clip_image021

12- In the cluster management add the new storage.
clip_image023

13- Go to the Services and applications node and click Configure a new service or application and select the DTC service and then click next.
clip_image025

14- You can change the resource name if you want but you have to give it an unused IP
clip_image027

15- Select the disk
clip_image029

16- Click finish to the confirmation screen
clip_image031

17- Now the windows cluster is prepared and ready for SQL server installation with an instance of DTC.
clip_image033

SQL Server First Cluster Instance

1- Go to the iSCSI target and create or add the shared disk to be used by the SQL cluster
clip_image034

2- Open the SQL server setup and click on new SQL server cluster
clip_image036

3- Go through the normal setup process
clip_image038

4-
clip_image040

5- Enter the SQL cluster name and leave as the default instance (or name this instance if you require)
clip_image042

Please note that if you are using any virtualization technology other than Hyper-V and installed the guest additions, then you will need to uninstall these additions and restart the servers or the above step will fail and report that it cannot validate the above settings.

clip_image044

6-
clip_image046

7-
clip_image048

8-
clip_image050

9-
clip_image052

10-
clip_image054

11-
clip_image056

12-
clip_image058

13- This completes the installation of the first SQL cluster on the first node
clip_image060

14- Logon to the second SQL node and start the SQL setup and choose to add a new node to a failover cluster
clip_image062

15-
clip_image064

16-
clip_image066

17-
clip_image068

18-
clip_image070

19- Now that completes setting up the second node for this SQL cluster
clip_image072

SQL Server Second Cluster Instance

Now we will go through the installation of a second clustered SQL instance to be prepared as another active instance on the passive node later.

1- Go to the iSCSI target and create or add another shared disk to be used by the second SQL cluster
clip_image034[1]

2- Go to one of the nodes and then open the iSCSI initiator and then click again on auto configure of the volumes and devices.
clip_image073

3- Now open the disk management utility and create the active partition on this disk and format it using NTFS.

4- Open the windows cluster management and add this disk to the cluster.
clip_image075

5- Open the SQL server setup and click on new SQL server cluster
clip_image076

6- Go through the normal setup process
clip_image077

7-
clip_image078

8- Enter the SQL cluster name and the instance name as BCInst
clip_image080

Please note that if you are using any virtualization technology other than Hyper-V and installed the guest additions, then you will need to uninstall these additions and restart the servers or the above step will fail and report that it cannot validate the above settings.

clip_image081

9-
clip_image083

10- Choose the already added disk
clip_image085

11- Choose a unique IP for his cluster
clip_image087

12-
clip_image052[1]

13-
clip_image088

14-
clip_image089

15-
clip_image091

16- This completes the installation of the second SQL cluster on the first node
clip_image092

17- Logon to the second SQL node and start the SQL setup and choose to add a new node to a failover cluster
clip_image093

18-
clip_image064[1]

19- Choose the new cluster BCInst
clip_image095

20-
clip_image096

21-
clip_image097

22- Now that completes setting up the second node for this SQL cluster
clip_image098

 

In the next part I will show you how to configure the two created SQL instances in an Active/Active SQL configuration.

Comments