iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

iscsi发起程序chap

In this article, we will continue our journey to configuring a SQL Server AlwaysOn High availability configuration and failover nodes, by setting up iSCSI including an iSCSI initiator, setting up disk drives on notes, configuring our Quorum and finally installing the SQL Server cluster.

在本文中,我们将通过设置包括iSCSI启动器的iSCSI,在便笺上设置磁盘驱动器,配置Quorum以及最后安装SQL Server群集,来继续配置SQL Server AlwaysOn高可用性配置和故障转移节点的过程。

iSCSI安装 (iSCSI Installation )

iSCSI is storage protocol which creates storage to the client node and domain controller.

iSCSI是一种存储协议,可创建到客户端节点和域控制器的存储。

To install Go to Server manager > Tools > iSCSI

要安装,请转到服务器管理器>工具> iSCSI

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

Click on To install iSCSI target server, start the Add Roles and Features wizard

单击以安装iSCSI目标服务器,启动“添加角色和功能”向导

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

Click Next and Install. Once these features are installed, we will create iSCSI disk. We are creating these disks on the domain controller, but we can also create these disks on other nodes. If, however, the node server goes down, then the iSCSI configuration will also be down, so we will create a virtual disk configuration on the domain controller and other nodes which are configured as targets.

单击下一步并安装。 一旦安装了这些功能,我们将创建iSCSI磁盘。 我们正在域控制器上创建这些磁盘,但也可以在其他节点上创建这些磁盘。 但是,如果节点服务器关闭,则iSCSI配置也将关闭,因此我们将在域控制器和其他配置为目标的节点上创建虚拟磁盘配置。

Once we installed the iSCSI feature, it will get back to the main iSCSI page as below.

安装完iSCSI功能后,它将返回到iSCSI主页面,如下所示。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

As shown in the following fig. we will use the C drive to configure as the Target disk. Click Next

如下图所示。 我们将使用C驱动器将其配置为目标磁盘。 点击下一步

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the following screen, we need to specify the disk name. We can create a separate disk for Data and log. We will create a disk now for Data drive. we will specify a name like “data” and It will get saved in following the mentioned path.

在以下屏幕中,我们需要指定磁盘名称。 我们可以为数据和日志创建一个单独的磁盘。 现在,我们将为数据驱动器创建一个磁盘。 我们将指定一个名称,例如“ data”,并将其保存在上述路径中。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the following screen, we will specify a size for each disk. The total free space is 81.8 GB and out of that I am allocating 10 GB for Data for demo purpose. You can provide a size as per your local requirements.

在以下屏幕中,我们将为每个磁盘指定大小。 总可用空间为81.8 GB,其中我将为演示目的为数据分配10 GB。 您可以根据当地要求提供尺寸。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

Select the default option New iSCSI target as shown below and click Next

选择默认选项“ 新建iSCSI目标” ,如下所示,然后单击“ 下一步”。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

Specify the Target name and (optionally) a description and click Next

指定目标名称和(可选)描述,然后单击下一步

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the following screen, we will set-up an iSCSI initiator by assigning a private IP of a node server.

在以下屏幕中,我们将通过分配节点服务器的专用IP来设置iSCSI启动器。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

To add a node server to create the iSCSI initiator, click Add. Then when the Add iCSCI initiator dialog appears, we’ll need to select a method to identify the iSCSI initiator. To do this select Enter a value for a selected type, with Type as an IP and specify internal IP of node server SQL1 and SQL 2 in value field as shown in the following fig.

要添加节点服务器以创建iSCSI启动器,请单击“ 添加”。 然后,在“添加iCSCI启动器”对话框出现时,我们需要选择一种方法来识别iSCSI启动器。 为此,选择输入所选类型的值,将 Type作为IP并在值字段中指定节点服务器SQL1和SQL 2的内部IP,如下图所示。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

We can also verify disk path in C drive for the Data file, which we created while disk configuration step. Create the same iSCSI drive for a Log file, follow the same process to configure Log drive.

我们还可以在磁盘配置步骤中创建的数据文件的C盘中验证磁盘路径。 为日志文件创建相同的iSCSI驱动器,然后按照相同的过程配置日志驱动器。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

Setting up an iSCSI Initiator

设置iSCSI启动器

Log in to each node and set-up the iSCSI Initiator in the server manager to start the iSCSI service. When we click iSCSI initiator, we will get pop-up message so click Yes to start. We need to repeat the same process to start the service on the other nodes as well.

登录到每个节点并在服务器管理器中设置iSCSI Initiator以启动iSCSI服务。 当我们单击iSCSI Initiator时 ,我们将弹出消息,因此请单击“ 是”开始。 我们还需要重复相同的过程以在其他节点上启动服务。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the iSCSI Initiator properties dialog, we need to specify the Internal IP of the domain controller where disks are located and click Connect. Repeat the same process to specify the IP address of the domain controller to create an iSCSI initiator for the other nodes.

在iSCSI Initiator属性对话框中,我们需要指定磁盘所在的域控制器的内部IP,然后单击连接 。 重复相同的过程以指定域控制器的IP地址,以为其他节点创建iSCSI启动器。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

在节点上设置磁盘驱动器 (Setting up Disk drives on Nodes)

In this step, we will need to bring the iSCSI targets disk which we created previously online, log in to each node and Go to Disk Management setting as follows.

在此步骤中,我们需要使之前创建的iSCSI目标磁盘联机,登录到每个节点,然后按以下步骤转到“ 磁盘管理”设置

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

Right-click on the unallocated drive and click New Simple volume which will open the disk configure wizard. Specify a name of the drive, letter of a drive, space we need to allocate, and once configured, it will bring it online and it will be available for use.

右键单击未分配的驱动器,然后单击“ 新建简单卷” ,这将打开磁盘配置向导。 指定驱动器的名称,驱动器的字母,我们需要分配的空间,配置后,它将使其联机并可供使用。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

As we can see, the Data drive is brought online with 10 GB, the size which we specified in the iSCSI disk configuration. We will repeat the same process for other unallocated drives.

如我们所见,数据驱动器以10 GB的大小联机,这是我们在iSCSI磁盘配置中指定的大小。 对于其他未分配的驱动器,我们将重复相同的过程。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

仲裁配置 (Quorum Configuration)

Quorum configuration is another important step in the cluster environment as it it allows the cluster to keep running even nodes may be down in the failover cluster.

仲裁配置是群集环境中的另一个重要步骤,因为它允许群集继续运行,即使故障转移群集中的节点可能出现故障也是如此。

In the failover cluster, we have multiple nodes. If we have a two-node cluster and both node servers are at different data centers locations, and the network is down in data centers, the nodes will not able to communicate with each other. When they are not able to communicate, each node will think the another node is not available, so each node will take responsibility and become the primary server

在故障转移群集中,我们有多个节点。 如果我们有一个两节点群集,并且两个节点服务器都位于不同的数据中心位置,并且网络位于数据中心中,则这些节点将无法相互通信。 当他们无法通信时,每个节点都会认为另一个节点不可用,因此每个节点将负责并成为主服务器。

As both nodes simultaneously self-configure primary, this causes the cluster to split into two parts. As both nodes are working, it creates a data loss situation. This is commonly referred to as a “Split-brain” situation.

由于两个节点同时自配置主节点,因此这导致群集分为两部分。 由于两个节点都在工作,因此会造成数据丢失的情况。 这通常被称为“裂脑”情况。

To prevent such a split-brain situation, the Quorum model which implements a voting system in cluster nodes of the cluster resource, was introduced.

为了避免出现这种情况,引入了Quorum模型,该模型在群集资源的群集节点中实现了投票系统。

There are four quorum models in the cluster

群集中有四个仲裁模型

  • Node Majority – Each node has a vote. This is suitable for an Odd number of nodes

    多数节点 –每个节点都有一个投票。 这适用于奇数个节点
  • Node and Disk Majority – This is suitable for an even number of nodes. The disk provides a vote to get a majority of votes

    多数节点和磁盘 –这适用于偶数个节点。 磁盘提供一个投票以获得多数票
  • Node and File Share Majority – This is the same as Node and Disk Majority, only a file share used instead

    多数节点和文件共享 –与多数节点和磁盘相同,只使用文件共享
  • No Majority – In this model, Disk is enough to form the quorum

    多数 –在此模型中,磁盘足以构成仲裁

If a Quorum is not available, and some nodes are down, the cluster will not run, and it will go down. The quorum will keep running the cluster based on the majority of votes in the group. Let’s say we have three nodes in cluster SQL1, SQL2, and SQL3. This means we have an odd number of clusters and each node will get one vote. In case any node failed then we will have two votes. So out of three votes, the group got two votes which represents the majority. so the failover cluster will keep running even if one node failed.

如果仲裁不可用,并且某些节点已关闭,则群集将无法运行,并且将关闭。 仲裁将基于组中的大多数票数继续运行群集。 假设我们在群集SQL1,SQL2和SQL3中有三个节点。 这意味着我们有奇数个群集,每个节点将获得一票。 如果任何节点发生故障,那么我们将有两票。 因此,在三票中,该组获得了代表多数的两票。 因此,即使一个节点发生故障,故障转移群集也将继续运行。

Let’s say, we have a two-node cluster, SQL1 and SQL2, which is an even numbered node cluster, and one of the nodes, SQL2, fails. In this case, we will have only one vote for SQL1, which is not a majority to keep the cluster running, so in this case the disk will take precedence, providing one more vote to provide majority. So, in this case, SQL1 and the disk will together provide two votes which form the majority, so in this way the quorum will keep cluster running. This is referred to as Node and Disk Majority.

假设有两个节点群集SQL1和SQL2,这是偶数节点群集,而其中一个节点SQL2发生故障。 在这种情况下,对于SQL1,我们只有一票,这不是保持群集运行的多数票,因此,在这种情况下,磁盘将具有优先权,再提供一票以提供多数票。 因此,在这种情况下,SQL1和磁盘将一起提供占多数的两个投票,因此,仲裁将使群集保持运行。 这称为“节点和磁盘多数”。

To set-up to Failover cluster > Right Click > More actions > Configure cluster Quorum settings.

设置故障转移群集>右键单击>更多操作>配置群集仲裁设置

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

Go to Failover Cluster name > More setting > Select Quorum configuration option as following Fig

转到故障转移群集名称>更多设置>选择仲裁配置选项,如下图

Select Advanced quorum configuration and witness selection, in this option, we will decide the quorum management option and witness option settings.

选择高级仲裁配置和见证选择,在此选项中,我们将决定仲裁管理选项和见证选项设置。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the voting configuration, we need to select nodes which assign votes.

在投票配置中,我们需要选择分配投票的节点。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the witness selection, we will select as a disk witness as we have even number of nodes, so the disk witness will participate in voting and provides vote majority.

在见证人选择中,由于节点数为偶数,因此我们将选择磁盘见证人,因此磁盘见证人将参与投票并提供多数票。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In this section, we will select disk a drive for the disk witness

在本节中,我们将选择磁盘驱动器作为磁盘见证服务器

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

SQL Server群集安装 (SQL Server Cluster Installation )

I am going to use SQL Server 2012 SP1 for SQL Server cluster installation. Please note that the SQL Cluster installation is different than traditional SQL Server installation.

我将使用SQL Server 2012 SP1进行SQL Server群集安装。 请注意,SQL Cluster安装不同于传统SQL Server安装。

Normally, we would Install using first option New SQL Server stand-alone installation, but in a cluster installation, we need to select New SQL Server failover cluster installation as follows.

通常,我们将使用第一个选项“ 新建SQL Server独立安装”进行安装 ,但是在群集安装中,我们需要选择“ 新建SQL Server故障转移群集安装” ,如下所示。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

Click Next and perform few steps like accept terms and condition, select update window, Let the complete process till next window.

单击“ 下一步”并执行几个步骤,例如接受条款和条件,选择“更新”窗口,然后完成整个过程,直到下一个窗口。

At the Install failover Cluster rules step, all operations completed, at this step, we may get an error for cluster service, WMI service not running so ensure those services are running on SQL nodes.

在“ 安装故障转移群集规则”步骤中,所有操作都已完成,在此步骤中,我们可能会收到群集服务错误,WMI服务未运行,因此请确保这些服务正在SQL节点上运行。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

At Setup Roles step, Select SQL Server Feature Installation, in which we need to perform the installation as per feature based like SQL Server reporting services, SQL Server analysis services, SQL Server Integration services etc.

在“ 设置角色”步骤中,选择“ SQL Server功能安装”,在其中我们需要根据功能执行安装,例如SQL Server报告服务,SQL Server分析服务,SQL Server集成服务等。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

At the Feature selection step, we will select features as per our need and then click Next

功能选择步骤,我们将根据需要选择功能,然后单击下一步。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the Instance Configuration step, a network name for the new SQL Server failover cluster is required

在“ 实例配置”步骤中 ,需要新SQL Server故障转移群集的网络名称

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the Disk space requirement step, the SQL server installer specifies disk drive size requirement. If enough space is not available, then it will suggest a minimum amount of drive space required to proceed with the installation.

在“ 磁盘空间需求”步骤中,SQL Server安装程序指定磁盘驱动器大小需求。 如果没有足够的空间,则将建议进行安装所需的驱动器空间最少。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the Cluster Resource Group step, SQL Server resources placed on disk. We can specify an existing group name or specify a new group name.

在“ 群集资源组”步骤中,将SQL Server资源放置在磁盘上。 我们可以指定现有的组名或指定新的组名。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the Cluster Disk selection step, we need to select a shared disk which used in the SQL Server cluster group.

在“ 群集磁盘”选择步骤中,我们需要选择一个在SQL Server群集组中使用的共享磁盘。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the Server configuration step, we need to create a service account on the domain controller and allow administrator permission on each node.

服务器配置步骤中,我们需要在域控制器上创建一个服务帐户,并在每个节点上允许管理员权限。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the Server configuration step, we need to select the collation

服务器配置步骤中,我们需要选择排序规则

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

In the Database engine configuration step, we will select authentication mode either windows or Mixed mode. We have selected mixed mode authentication, specify the password and add current user as an administrator as below

数据库引擎配置步骤中,我们将选择Windows或混合模式的身份验证模式。 我们选择了混合模式身份验证,指定了密码,并将当前用户添加为管理员,如下所示

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

Click Next. The installation process will start. We need to follow the same process to install SQL Server cluster installation on other node servers.

单击下一步 。 安装过程将开始。 我们需要遵循相同的过程在其他节点服务器上安装SQL Server群集安装。

iscsi发起程序chap_iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装

摘要 (Summary)

In this article, we walked thru the steps of setting up iSCSI including an iSCSI initiator, setting up disk drives on notes, configuring our Quorum and finally installing the SQL Server cluster. These steps will get us closer to creating our SQL Server AlwaysOn configuration

在本文中,我们逐步完成了设置iSCSI(包括iSCSI启动器),在便笺上设置磁盘驱动器,配置Quorum以及最终安装SQL Server群集的步骤。 这些步骤将使我们更接近创建SQL Server AlwaysOn配置

目录 (Table of contents)

Domain Controller and Domain Client Node setup for AlwaysON High Availability
iSCSI, iSCSI Initiator, Quorum Configuration and SQL Server Cluster Installation
Configuring a SQL Server AlwaysOn High Availability Group
用于AlwaysON高可用性的域控制器和域客户端节点设置
iSCSI,iSCSI发起程序,仲裁配置和SQL Server群集安装
配置SQL Server AlwaysOn高可用性组

翻译自: https://www.sqlshack.com/iscsi-iscsi-initiator-quorum-configuration-and-sql-server-cluster-installation/

iscsi发起程序chap