This article explores the configuration of Windows failover clusters, storage controllers and quorum configurations for SQL Server Always On Availability Groups.

本文探讨了SQL Server Always On可用性组的Windows故障转移群集,存储控制器和仲裁配置的配置。

先决条件 (Prerequisites)

In this series of articles, we will configure the SQL Server always on availability groups from end to end for your learning purpose. We covered the following topics in the previous articles.

在本系列文章中,我们将始终在端到端的可用性组上始终配置SQL Server,以供您学习。 我们在先前的文章中介绍了以下主题。

  1. A comprehensive guide to SQL Server Always On Availability Groups on Windows Server 2016 Windows Server 2016上SQL Server Always On可用性组的全面指南

    1. We installed Oracle Virtual Box with three VM’s 我们用三个虚拟机安装了Oracle Virtual Box
    2. We did installation of Windows Server 2016 standard edition with desktop experience 我们完成了Windows Server 2016标准版的安装并具有桌面体验
    3. We covered VM network adapter configurations 我们介绍了VM网络适配器配置
  2. Configure Domain Controller and Active Directory for SQL Server Always On Availability Groups 为SQL Server Always On可用性组配置域控制器和Active Directory
    1. We installed and configured domain controller, active directory and DNS 我们安装并配置了域控制器,活动目录和DNS
    2. Assign static IP’s to all VMs 为所有虚拟机分配静态IP
    3. Join SQL Nodes in the MyDemoSQL.com domain 在MyDemoSQL.com域中加入SQL节点

To follow along better, try to go over these previous articles before proceeding with this one.

为了更好地跟进,在继续阅读本文之前,请尝试阅读这些先前的文章。

SQL Server Always On可用性组的故障转移群集配置 (Failover Cluster configuration for SQL Server Always On Availability Groups)

We require a minimum of two nodes failover cluster for the SQL Server always on availability groups. We can setup AG without cluster as well starting from SQL Server 2017, but it gives you limited AG functionality. It is out of scope topic for this article series.

对于始终在可用性组上SQL Server,我们至少需要两个节点故障转移群集。 从SQL Server 2017开始,我们也可以设置不带集群的AG,但是它给您有限的AG功能。 这是本系列文章的主题之外。

We prepared the following VMs for our demo purposes.

我们为演示目的准备了以下虚拟机。

Server Name

IP address

Role

VDITest3

10.0.2.15

Domain Controller and Active Directory

SQLNode1

10.0.2.21

Primary Node of SQL AG

SQLNode2

10.0.2.22

Secondary Node of SQL AG

服务器名称

IP地址

角色

VDITest3

10.0.2.15

域控制器和Active Directory

SQLNode1

10.0.2.21

SQL AG的主节点

SQLNode2

10.0.2.22

SQL AG的辅助节点

Now, we have a requirement to set up the Windows failover cluster for SQLNode1 and SQLNode2. To do so, launch Add Roles and Feature Wizard from the server manager. Enable the Failover Clustering feature in both the SQL nodes.

现在,我们需要为SQLNode1和SQLNode2设置Windows故障转移群集。 为此,请从服务器管理器中启动“添加角色和功能向导”。 在两个SQL节点中都启用故障转移群集功能。

Confirm the failover cluster installation for SQL Server Always On Availability Groups.

确认SQL Server Always On可用性组的故障转移群集安装。

Put a tick mark on Failover Clustering and click on Add Features to install the feature with dependency.

故障转移群集上打勾,然后单击添加功能以安装具有依赖关系的功能。

Review and confirm the installation. You can see it installs failover Cluster Management Tools along with the Failover Cluster Module for Windows PowerShell.

查看并确认安装。 您可以看到它安装了故障转移群集管理工具以及Windows PowerShell的故障转移群集模块。

It quickly installs the features on your respective server.

它可以在您各自的服务器上快速安装功能。

Once you enabled the feature on both nodes, search and launch failover clustering from the start menu. It currently shows no items found because we haven’t configured the cluster yet.

在两个节点上都启用该功能后,请从开始菜单搜索并启动故障转移群集。 由于我们尚未配置集群,因此当前显示未找到任何项目。

Before we proceeded further, check the ping response from SQLNode1 to SQLNode2 and vice-versa.

在继续进行之前,请检查从SQLNode1到SQLNode2的ping响应,反之亦然。

从SQLNode1到SQLNode2的Ping响应 (Ping response from SQLNode1 to SQLNode2)

从SQLNode2到SQLNode1的ping响应 (Ping response from SQLNode2 to SQLNode1)

In case it does not work for you, disable the Windows firewall in both the nodes. Search for Windows Firewall in Start and disable all firewalls.

如果它对您不起作用,请在两个节点中都禁用Windows防火墙。 在“开始”中搜索Windows防火墙并禁用所有防火墙。

Note: Please do not disable the firewall in a production environment due to security reasons.

注意 :出于安全原因,请不要在生产环境中禁用防火墙。

始终在可用性组上验证SQL Server的配置 (Validate Configurations for SQL Server always on availability groups)

Click on the Validate Configurations in the Actions menu. You can read the description for learning purposes.

单击“ 操作”菜单中的“ 验证配置 ”。 您可以阅读说明以进行学习。

On the next page, add the nodes you want to add in the failover cluster. Here, I added both nodes for my cluster.

在下一页上,将要添加的节点添加到故障转移群集中。 在这里,我为集群添加了两个节点。

It performs various tests such as cluster configuration, network, Storage and Hyper-V configuration. We can perform limited tests as well, but it is good to perform all tests.

它执行各种测试,例如群集配置,网络,存储和Hyper-V配置。 我们也可以执行有限的测试,但是最好执行所有测试。

On the next page, it shows the servers for validation and lists down all tests it is going to perform.

在下一页上,它将显示用于验证的服务器,并列出了将要执行的所有测试。

It starts validations one by one for all rules. It shows the result of each test, whether passed, failed or any warnings.

它开始对所有规则进行验证。 它显示每个测试的结果,无论是通过,失败还是任何警告。

You can review the result of all test parameters in a cluster. Once reviewed, put a check on the Create the cluster now using validated nodes… It does not allow any additional nodes at this point. If you want, you can finish the process and revalidate the cluster servers.

您可以查看集群中所有测试参数的结果。 检查后,选中“ 立即使用已验证的节点创建集群...” ,此时不允许任何其他节点。 如果需要,可以完成此过程并重新验证群集服务器。

It launches the Create Cluster Wizard.

它启动创建群集向导。

On the next page, we define an access point for administrating the cluster. It is a cluster name and cluster IP address.

在下一页上,我们定义用于管理集群的访问点。 它是集群名称和集群IP地址。

Give a unique name for the cluster in your environment along with a virtual IP address. It should be in the IP range of the nodes network.

为您的环境中的群集提供唯一的名称以及虚拟IP地址。 它应该在节点网络的IP范围内。

The cluster configuration is now complete. Click Next to start the cluster build process.

集群配置现已完成。 单击“下一步”开始集群构建过程。

It forms the failover cluster from both SQL nodes specified.

它从指定的两个SQL节点组成故障转移群集。

Once the process is finished, launch the Failover cluster manager and view the nodes. It should show both nodes in the Up status.

该过程完成后,启动故障转移群集管理器并查看节点。 它应该显示两个节点都处于“启动”状态。

Click on Roles, and it is empty because we have not added any roles yet in this cluster. You can verify the cluster name as SQLAGCLU.MyDemoSQL.com

单击角色,它为空,因为我们尚未在此集群中添加任何角色。 您可以将群集名称验证为SQLAGCLU.MyDemoSQL.com

始终在可用性组上为SQL Server启用域控制器服务器上的iSCSI功能
(Enable iSCSI feature on Domain Controller server for SQL Server always on availability groups
)

In this article, we want to add the cluster storage from the domain controller server. For this purpose, connect to the DC server. Choose the iSCSI Target Server in the Add Roles and Features Wizard.

在本文中,我们要从域控制器服务器添加群集存储。 为此,请连接到DC服务器。 在“添加角色和功能向导 ”中选择iSCSI目标服务器。

Here we see, it installed the feature on the domain controller server.

在这里,我们看到它在域控制器服务器上安装了该功能。

We need to configure the iSCSI target server now. For this purpose, in the server manager, click on the File and Storage Services.

我们现在需要配置iSCSI目标服务器。 为此,在服务器管理器中,单击“ 文件和存储服务”

It opens another page with storage options. Click on the iSCSI from the menu located on the left-hand side.

它会打开另一个带有存储选项的页面。 从左侧菜单中单击iSCSI。

In iSCSI, it does not show any iSCSI virtual disks as now. It shows an option – To create an iSCSI virtual disk, start the New iSCSI virtual Disk Wizard.

在iSCSI中,它不会像现在一样显示任何iSCSI虚拟磁盘。 它显示一个选项– 要创建iSCSI虚拟磁盘,请启动“新建iSCSI虚拟磁盘向导”。

Click on the hyperlink, and it launches iSCSI virtual disk wizard.

单击超链接,它会启动iSCSI虚拟磁盘向导。

In the Virtual disk location, select the volume. We have only C drive available in the VM, so it shows that drive information including used and free space.

在虚拟磁盘位置,选择卷。 VM中只有C驱动器可用,因此它显示驱动器信息,包括已用和可用空间。

Specify an iSCSI virtual disk name. You can give it any name as per your preference. It creates a .vhdx file in the C:\iSCSI directory.

指定iSCSI虚拟磁盘名称。 您可以根据自己的喜好给它起任何名字。 它在C:\ iSCSI目录中创建一个.vhdx文件。

Specify a size for the virtual disk. You can configure a fixed or dynamic size. We should use a fixed size virtual disk for better performance.

指定虚拟磁盘的大小。 您可以配置固定大小或动态大小。 我们应该使用固定大小的虚拟磁盘以获得更好的性能。

We do not have any existing iSCSI target, so select the option to create a new iSCSI target.

我们没有任何现有的iSCSI目标,因此选择创建新iSCSI目标的选项。

Specify a target name for the iSCSI.

指定iSCSI的目标名称。

On the next page, we define the servers which will have access to the virtual disk. You can specify the node IP address and add it to the console.

在下一页上,我们定义可以访问虚拟磁盘的服务器。 您可以指定节点IP地址并将其添加到控制台。

Similarly, search for the SQLNod2 IP address and add it.

同样,搜索SQLNod2 IP地址并将其添加。

We get both SQL Nodes as part of the virtual disk access list.

我们将两个SQL节点都作为虚拟磁盘访问列表的一部分。

Click Next and confirm your selections for the iSCSI target.

单击“下一步”并确认对iSCSI目标的选择。

Click Create. We created the iSCSI targets successfully.

单击创建。 我们成功创建了iSCSI目标。

We configured the iSCSI target on the domain controller server. We need to use iSCSI initiator wizard on both the nodes to reflect the virtual disks on the failover cluster.

我们在域控制器服务器上配置了iSCSI目标。 我们需要在两个节点上使用iSCSI启动器向导来反映故障转移群集上的虚拟磁盘。

Connect to the SQLNode1 and launch the iSCSI initiator from the Server Manager -> tools -> iSCSI initiator.

连接到SQLNode1并从服务器管理器->工具-> iSCSI启动器启动iSCSI启动器。

In the iSCSI initiator, it asks for an iSCSI target.

在iSCSI启动器中,它要求一个iSCSI目标。

Our iSCSI target is on the domain controller server, so specify the IP address of DC. It is 10.0.2.15 in my case. Click on Quick Connect after specifying the IP address.

我们的iSCSI目标位于域控制器服务器上,因此请指定DC的IP地址。 在我的情况下是10.0.2.15。 指定IP地址后,单击快速连接

It shows you a list of iSCSI targets available on the specified IP address. We already have configured one iSCSI target, so select the discovered target and click done.

它显示了指定IP地址上可用的iSCSI目标的列表。 我们已经配置了一个iSCSI目标,因此选择发现的目标并单击完成。

Now, launch the Computer Management and click on Disk Management. In the disk management, it shows you the available Storage.

现在,启动计算机管理,然后单击磁盘管理。 在磁盘管理中,它显示可用的存储。

In the below screenshot, we see a root drive along with a 10 GB unallocated space. It is the same virtual disk of 10 GB that we configured earlier.

在下面的屏幕截图中,我们看到一个根驱动器以及一个10 GB的未分配空间。 它与我们先前配置的10 GB虚拟磁盘相同。

Right-click on this disk and choose New Simple Volume. It opens the simple volume configuration wizard.

右键单击该磁盘,然后选择“ 新建简单卷” 。 它打开简单的卷配置向导。

In the volume size, we can specify a different size for the volume, but it cannot exceed the virtual disk maximum size we specified earlier.

在卷大小中,我们可以为卷指定其他大小,但不能超过我们先前指定的虚拟磁盘最大大小。

On the next page, assign a volume label and select the option to format this volume.

在下一页上,分配卷标签,然后选择格式化该卷的选项。

Finish the wizard, and it shows up the drive, as shown below.

完成向导,它会显示驱动器,如下所示。

将磁盘添加为群集资源 (Add the disk as a cluster resource)

To add this disk as a cluster resource, open the failover cluster manager and click on Storage -> Disks. Currently, It does not show any clustered disk in the console.

要将此磁盘添加为群集资源,请打开故障转移群集管理器,然后单击存储->磁盘。 当前,它在控制台中不显示任何群集磁盘。

Click on Add Disk, and it shows up the virtual disk we created earlier.

单击添加磁盘,它将显示我们之前创建的虚拟磁盘。

It adds the cluster disk in the failover cluster manager as shown below.

它将群集磁盘添加到故障转移群集管理器中,如下所示。

群集仲裁配置 (Cluster Quorum configuration)

Quorum is an essential and critical component of a Windows failover cluster. A quorum keeps running the failover cluster based on the majority of votes in the group. It uses a voting mechanism to check for the node’s majority. It also helps to avoid a split-brain scenario where none of the nodes owns the resources.

仲裁是Windows故障转移群集的重要组成部分。 仲裁将根据组中的大多数票数继续运行故障转移群集。 它使用表决机制来检查节点的多数票。 这也有助于避免出现裂脑的情况,在这种情况下,任何节点都不拥有资源。

We have the following quorum configurations in the Windows server.

Windows服务器中具有以下仲裁配置。

  • Node Majority 节点多数
  • Node and Disk Majority 节点和磁盘多数
  • Node and File Share Majority 节点和文件共享占多数
  • No Majority 没有多数
  • Dynamic Quorum configuration 动态仲裁配置

I suggest you go through the article Windows Failover Cluster Quorum Modes in SQL Server Always On Availability Groups to understand this in detail.

我建议您仔细阅读SQL Server Always On可用性组中的Windows故障转移群集仲裁模式一文,以详细了解此内容。

Now, right-click on the Cluster name and go to More Actions -> Configure Cluster Quorum Settings.

现在,右键单击群集名称,然后转到“其他操作”->“ 配置群集仲裁设置”。

It launches the cluster quorum wizard with a brief introduction.

它将启动群集仲裁向导并进行简要介绍。

Select the option Advanced quorum configuration from the quorum confirmation options.

从仲裁确认选项中选择选项高级仲裁配置

We can decide which nodes can do voting in a failover cluster configuration. By default, it selects all failover cluster nodes for voting eligibility.

我们可以决定在故障转移群集配置中哪些节点可以进行投票。 默认情况下,它将选择所有故障转移群集节点以具有投票资格。

Select the file share witness as a quorum witness on the next page.

在下一页上选择文件共享见证作为法定见证。

Before we proceed for the next step, create a file share in the domain controller VM and permit the Windows account by which we log in to SQL nodes. Ideally, you should not create the file share on the cluster nodes because in case that particular node goes down, file share witness also goes down.

在继续下一步之前,请在域控制器VM中创建文件共享,并允许我们使用Windows帐户登录SQL节点。 理想情况下,不应在群集节点上创建文件共享,因为如果特定节点发生故障,文件共享见证也将发生故障。

Specify the shared folder path as a file share path.

将共享文件夹路径指定为文件共享路径。

Review your configuration and confirm to proceed further.

查看您的配置并确认以继续。

It has successfully configured the file share witness in our failover cluster configuration, as shown below.

它已成功在我们的故障转移群集配置中配置了文件共享见证,如下所示。

You can connect to the failover cluster manager, and it shows the file share witness in the console.

您可以连接到故障转移群集管理器,它在控制台中显示文件共享见证。

结论 (Conclusion)

In this article, we configured the failover clusters on the virtual machine we created earlier. It also shows the iSCSI and file share witness quorum for SQL Server Always On Availability Groups. It completes the underlying foundation or infrastructure for always on configuration. In the next article, we will install SQL Server 2019 and configure an AG group.

在本文中,我们在之前创建的虚拟机上配置了故障转移群集。 它还显示了SQL Server Always On可用性组的iSCSI和文件共享见证仲裁。 它为始终在线的配置奠定了基础或基础架构。 在下一篇文章中,我们将安装SQL Server 2019并配置一个AG组。

目录 (Table of contents)

A comprehensive guide to SQL Server Always On Availability Groups on Windows Server 2016
Configure Domain Controller and Active Directory for SQL Server Always On Availability Groups
Configure failover clusters, storage controllers and quorum configurations for SQL Server Always On Availability Groups
Install SQL Server 2019 on Windows Server 2016 with SQL Server Always On Availability Groups
Add a new node into existing SQL Server Always On Availability Groups
Configure Managed Service Accounts for SQL Server Always On Availability Groups
Windows Server 2016上SQL Server Always On可用性组的全面指南
为SQL Server Always On可用性组配置域控制器和Active Directory
为SQL Server Always On可用性组配置故障转移群集,存储控制器和仲裁配置
在Windows Server 2016和SQL Server Always On可用性组上安装SQL Server 2019
将新节点添加到现有SQL Server Always On可用性组中
为SQL Server Always On可用性组配置托管服务帐户

翻译自: https://www.sqlshack.com/configure-failover-clusters-storage-controllers-and-quorum-configurations-for-sql-server-always-on-availability-groups/

为SQL Server Always On可用性组配置故障转移群集,存储控制器和仲裁配置相关推荐

  1. 在Windows Server 2016和SQL Server Always On可用性组上安装SQL Server 2019

    In this article, we will proceed with configuring a SQL Server Always On Availability Groups and per ...

  2. sql server父节点_将新节点添加到现有SQL Server Always On可用性组中

    sql server父节点 This is the 5th article in the series of a comprehensive guide to SQL Server Always On ...

  3. SQL Server Always On可用性组中的Windows故障转移群集仲裁模式

    This article gives an overview of Windows Failover Cluster Quorum modes that is necessary for SQL Se ...

  4. 为SQL Server Always On可用性组配置托管服务帐户

    This article is a 6th article in the series for SQL Server Always On Availability Groups. It covers ...

  5. Windows Server 2016上SQL Server Always On可用性组的全面指南

    In this article, we will configure a SQL Server Always On Availability Group on the Windows Server 2 ...

  6. SQL Server Always On可用性组中的数据同步

    This article describes the data synchronization process on SQL Server Always On Availability Groups ...

  7. 配置故障转移群集,livemigration系列之七

    配置故障转移群集          在上文中创建了故障转移群集后,我们接下来对故障转移群集进行配置,主要是配置故障转移群集使用的仲裁磁盘和群集共享卷.在Server1的"Administra ...

  8. aws ec2 选择可用区_在AWS EC2上配置SQL Server Always On可用性组

    aws ec2 选择可用区 In this article, we will review how to set up multi-subnet Always On Availability grou ...

  9. 思科模拟器划分子网实验报告_模拟多子网群集以设置SQL Server Always On可用性组–实验设置

    思科模拟器划分子网实验报告 In this article, we are going to see how to create a multi subnet cluster spanning acr ...

最新文章

  1. WebMagic实现分布式抓取以及断点抓取
  2. java:方法覆盖与方法重载
  3. DevExpress组件之——TreeList组件
  4. 政府会给我们补贴吗?
  5. 巧用组策略技术禁用办公室QQ聊天
  6. nginx中文件路径表示方法
  7. python 图片地址_python解码data:image开头的图片地址
  8. 慎用PHP $_REQUEST数组
  9. ISAKMP:(1006):deleting node 1202729771 error TRUE reason Delete Larval
  10. vue 导入excel解析_VUE中导入excel文件
  11. 删除按钮_系统小技巧:一站式完成系统“删除”性维护
  12. 【小松教你手游开发】【unity实用技能】InvalidOperationException: ou
  13. 针式打印机设置连续打印不分页_打印机的应用与耗材介绍
  14. PHP7通过yum源安装及性能测试
  15. 解决办法:undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'
  16. pycharm汉化包下载
  17. 精通反激电源变压器及电路设计-自己的笔记
  18. oracle连接plsqldev
  19. 显示器性能测试软件,MonitorTest(显示器性能测试软件) V4.0.1001 官方版
  20. stm32 I2C总线入门笔记

热门文章

  1. swift 字符串转int_Swift Tips Streamline 如何假装写过 Swift
  2. sumif三个条件怎么填_玩转excel求和函数,sumif/sumifs常用案例讲解
  3. 图论算法及其matlab实现_BLDC有感FOC算法理论及其STM32软硬件实现
  4. sql2008安装时提示参数不能为空_PHP命令行脚本接收传入参数的三种方式
  5. 定义一个没有参数的函数、输出python3次_Python函数参数详解,三天让你掌握python,不再是小白
  6. 动态修改css 规则
  7. Intellij IDEA连接Spark集群
  8. 云计算学习(5-1)云平台产品介绍-华为的FusionCloud产品
  9. 小股神助A股股民畅享经济发展红利
  10. 1201-统计数字问题