In this article, we will review how to configure SAN less SQL Server cluster in AWS EC2 instances using SIOS DataKeeper.

在本文中,我们将回顾如何使用SIOS DataKeeper在AWS EC2实例中配置SAN较少SQL Server群集。

SQL Server clustering is a high availability feature which failover the SQL Server resources to the secondary node in case of a failure in the primary node. The data is stored in the shared drive and will be accessible to the active node in the cluster. In case of failover, we do not need to transfer jobs, logins, linked server or server scoped triggers, etc. to the other node as the instance is the same.

SQL Server群集是一项高可用性功能,如果主节点发生故障,该功能会将SQL Server资源故障转移到辅助节点。 数据存储在共享驱动器中,并且群集中的活动节点可以访问该数据。 如果发生故障转移,我们不需要将作业,登录名,链接的服务器或服务器范围的触发器等转移到另一个节点,因为实例是相同的。

Please refer to the below image which shows the traditional SQL Server failover cluster using shared disks. The shared disks are active on the NODE1 which is active, and the SQL server services are running on NODE1. The users connect to the instance using a virtual SQL Server cluster name or IP address which routes the request to the active node in the cluster.

请参考下图,该图显示了使用共享磁盘的传统SQL Server故障转移群集。 共享磁盘在活动的NODE1上处于活动状态,并且SQL Server服务在NODE1上运行。 用户使用虚拟SQL Server群集名称或IP地址连接到实例,该名称或IP地址将请求路由到群集中的活动节点。

使用SIOS DataKeeperSQL Server群集 (SQL Server clustering using SIOS DataKeeper)

SIOS DataKeeper allows us to build the SQL Server cluster on cloud environments without the need for shared storage.

SIOS DataKeeper允许我们在云环境上构建SQL Server群集,而无需共享存储。

The data in the disk on the primary node is mirrored to the secondary node. Please refer to the below image for SAN less SQL Server cluster using SIOS DataKeeper.

主节点上磁盘中的数据已镜像到辅助节点。 请参考下图,了解使用SIOS DataKeeper的SAN较少SQL Server群集。

NODE1 will have its disk and NODE2 will have its disk. SIOS DataKeeper will replicate the data to the other node synchronously or asynchronously based on the option we choose.

NODE1将拥有其磁盘,而NODE2将拥有其磁盘。 SIOS DataKeeper将根据我们选择的选项将数据同步或异步复制到另一个节点。

The following are the steps involved in configuring the SAN less SQL Server cluster in AWS EC2 instances.

以下是在AWS EC2实例中配置SAN较少SQL Server群集所涉及的步骤。

  1. Launch two instances and add them to one domain 启动两个实例并将它们添加到一个域
  2. Configure windows failover cluster 配置Windows故障转移群集
  3. Attach a volume to both instances 将卷附加到两个实例
  4. Configure SIOS jobs to replicate the data 配置SIOS作业以复制数据
  5. Install the SQL Server failover cluster 安装SQL Server故障转移群集

Let go over these steps one by one.

让我们一步一步地完成这些步骤。

For demo purpose, I am launching a Windows server 2016 base from AWS console to installing active directory services and make it as a domain controller. For production servers please configure domain controller with all the security and firewall rules you need.

出于演示目的,我将从AWS控制台启动Windows Server 2016 base,以安装活动目录服务并将其用作域控制器。 对于生产服务器,请为域控制器配置所需的所有安全和防火墙规则。

Log in to the AWS and navigate to the EC2 console. Click on Launch an instance and search for Windows Server 2016 base image. Select the image as shown in the below image.

登录到AWS并导航到EC2控制台。 单击启动实例,然后搜索Windows Server 2016基本映像。 选择图像,如下图所示。

Choose the Instance type. In this case, I choose t2.medium Configure the instance details and add the storage. Choose the security group if you already have one or create a new one. While launching the instance choose the key pair and make sure you have the key pair which will be used to connect the instance later.

选择实例类型。 在这种情况下,我选择t2.medium配置实例详细信息并添加存储。 选择安全组(如果已有)或创建一个新的安全组。 在启动实例时,请选择密钥对,并确保您具有将在以后用于连接实例的密钥对。

After four or five minutes the instance will be available for use. For identification purposes, I am naming it as “Domain Controller”.

四,五分钟后,该实例即可使用。 为了便于识别,我将其命名为“域控制器”。

Now select the instance and click on Connect.

现在选择实例,然后单击“连接”。

Click on Get Password. upload the .pem which was used to launch the instance. Click on decrypt the password.

单击获取密码。 上载用于启动实例的.pem。 单击解密密码

RDP the instance using the public IP and the password of the instance. Launch Server Manager and click on Add roles and features.

使用公共IP和实例密码对实例进行RDP。 启动服务器管理器 ,然后单击添加角色和功能

Click Next and select roles based or feature-based installation and click Next. Select a server from the pool and click Next.

单击下一步,然后 选择基于角色的安装或基于功能的安装,然后单击下一步。 从池中选择服务器,然后单击“ 下一步”

Select Active Directory domain services and click Next, Next and Install.

选择Active Directory域服务,然后单击“ 下一步” ,“ 下一步”和“ 安装”。

Once the installation is completed, close the window and click on Promote this server as a domain controller.

安装完成后,关闭窗口,然后单击“将其升级为域控制器”

Select Add a new forest and enter the domain name. Click Next.

选择添加新林并输入域名。 单击下一步。

Enter the password and click Next.

输入密码,然后单击下一步

Click Next. Enter the NetBIOS name and click Next. Specify the paths for the AD database and logs.

单击下一步 。 输入NetBIOS名称,然后单击“ 下一步” 。 指定AD数据库和日志的路径。

Once the prerequisites check is successful, click on Install. Once the installation completes the server will reboot.

前提条件检查成功后,单击“ 安装”。 安装完成后,服务器将重新启动。

After reboot, RDP to the server again. Launch Active Directory Users and Computers. Create a new user and add it Administrators and Domain Controllers, Domain Computers, Domain Administrators group.

重新引导后,再次将RDP连接到服务器。 启动Active Directory用户和计算机 。 创建一个新用户并将其添加到“ 管理员域控制器” ,“域计算机”,“ 域管理员”组中。

启动两个实例并将它们添加到一个域 (Launch two instances and add them to one domain)

In this demo, I am setting up a two-node SQL Server cluster. So, I am launching two new nodes and join them to the domain we created above. These two nodes will be part of the cluster.

在此演示中,我将设置一个两节点SQL Server群集。 因此,我要启动两个新节点,并将它们加入到上面创建的域中。 这两个节点将成为群集的一部分。

There are two ways to launch the instances. One is launching the instances using EC2 console and install SIOS DataKeeper with your license. The other way is subscribing to SIOS DataKeeper in the AWS Market place and launch the instance from there. This way EC2 instance comes with SIOS pre-installed.

有两种启动实例的方法。 一种是使用EC2控制台启动实例,然后使用许可证安装SIOS DataKeeper。 另一种方法是在AWS Market地方订阅SIOS DataKeeper并从那里启动实例。 这样,EC2实例预装了SIOS。

In this demo, we will use a subscription model.

在此演示中,我们将使用订阅模型。

To subscribe for SIOS data keeper, Navigate to AWS Market Place subscriptions. Click on Discover products.

要订阅SIOS数据管理员,请导航至AWS Market Place订阅 。 单击发现产品

Search for SIOS DataKeeper and click on SIOS DataKeeper on Windows Server 2016.

搜索SIOS DataKeeper,然后在Windows Server 2016上单击SIOS DataKeeper

Click on Continue to Subscribe and Accept Terms.

单击继续以 订阅并接受条款。

Once the subscription is successful, click on Continue to Configuration.

订阅成功后,单击继续配置。

Select the region, software version and click on Continue to Launch.

选择区域,软件版本,然后单击继续启动

Choose Launch through EC2 and click on Launch.

选择通过EC2启动,然后单击启动

Select the instance type. In this case, I choose m5d.large and click on Configure Instance Details.

选择实例类型。 在这种情况下,我选择m5d.large并单击Configure Instance Details

Enter the number of instances as 2, select the subnet and click on Add Storage. You can also launch instances individually in multiple availability zones.

输入实例数为2,选择子网,然后单击Add Storage 。 您还可以在多个可用性区域中分别启动实例。

Add storage, tags, select the security groups and launch the instances.

添加存储,标签,选择安全组并启动实例。

RDP to the instances we launched, Navigate to Control Panel -> Network and Internet -> Network and sharing center.

RDP到我们启动的实例,导航到控制面板->网络和Internet->网络和共享中心。

Click on the network adaptor -> Properties -> double click on Internet Protocol Version 4.

单击网络适配器->属性->双击Internet协议版本4。

Open the command prompt and enter ipconfig to know the IP address of the node and modify the ipv4 properties as shown in the below image. Select use the following IP address and enter the same IP address, subnet mask, default gateway of the node. Enter the private IP of the domain controller in the Preferred DNS server.

打开命令提示符,然后输入ipconfig以了解该节点的IP地址,并修改ipv4属性,如下图所示。 选择“使用以下IP地址”,然后输入相同的IP地址,子网掩码,节点的默认网关。 在“ 首选DNS服务器”中输入域控制器的专用IP。

Click ok and apply the changes. Now join the node to the domain.

单击确定应用更改。 现在将节点加入域。

Similarly, on node2 change the IP address, subnet mask, default gateway, and the preferred DNS server.

同样,在node2上更改IP地址,子网掩码,默认网关和首选DNS服务器。

Join the node2 to the domain. After joining the node, it restarts.

将node2加入域。 加入节点后,它将重新启动。

RDP to node1 and launch failover cluster manager. Add both nodes which will be part of the cluster and click Next.

RDP到node1并启动故障转移群集管理器。 添加将成为群集一部分的两个节点,然后单击下一步。

Enter the name of the cluster and give it an IP address.

输入集群的名称并为其提供IP地址。

Uncheck the Add all the eligible storage to the cluster and click Next. We can add storage later using SIOS DataKeeper.

取消选中将所有符合条件的存储添加到群集中,然后单击下一步 。 我们稍后可以使用SIOS DataKeeper添加存储。

Once the cluster setup is done you would see both nodes in the failover cluster manager.

完成集群设置后,您将在故障转移集群管理器中看到两个节点。

将卷附加到两个实例 (Attach a volume to both the instances)

We need to create two volumes and associate one to each node. Navigate to AWS EC2 console. Click on volumes and Create Volume.

我们需要创建两个卷,并将每个卷关联一个。 导航到AWS EC2控制台。 单击卷并创建卷

Select the created volume and click on Actions dropdown. Click on attach volume and associate it to node1.

选择创建的卷,然后单击“ 操作”下拉列表。 单击附加卷并将其关联到node1。

Similarly, create another volume and attach it to the node2 which will be used in the SQL Server cluster.

同样,创建另一个卷并将其附加到将在SQL Server群集中使用的node2。

RDP to node1 and open disk management. The newly attached volume shows up as below. Click ok.

RDP到node1并打开磁盘管理 。 新连接的卷显示如下。 单击确定

Right-click on the disk and click on New Simple Volume.

右键单击磁盘,然后单击“ 新建简单卷”

Assign the letter to drive and Click Next.

将字母分配给驱动器,然后单击下一步。

Format and assign the label. Click Next.

格式化并分配标签。 单击下一步

Similarly, on node2 make a volume and give the same label and drive letter.

同样,在node2上创建一个卷,并提供相同的标签和驱动器号。

配置SIOS DataKeeper作业以复制数据 (Configure SIOS DataKeeper jobs to replicate the data)

On node1 launch the SIOS DataKeeper. Click on Connect to server.

在节点1上,启动SIOS DataKeeper。 单击连接到服务器。

Enter node1 and click on Connect.

输入node1并单击Connect。

Similarly, Connect to node2. Once both nodes are connected, click on create the job. Enter the job name and the description.

同样,连接到node2。 连接两个节点后,单击创建作业 。 输入工作名称和描述。

Choose the source and the drive you want to mirror. Click Next.

选择源和要镜像的驱动器。 单击下一步

Choose the target server and the drive. Click Next.

选择目标服务器和驱动器。 单击下一步

Choose the synchronization mode and click on Done.

选择同步模式,然后单击完成。

Once the mirroring is created, it asks if you want to add the volume to the failover cluster. Click Yes.

创建镜像后,它会询问您是否要将卷添加到故障转移群集。 单击是。

Now the disk will be shown in the failover cluster manager. We can see node1 is the owner node of the disk.

现在,该磁盘将显示在故障转移群集管理器中。 我们可以看到node1是磁盘的所有者节点。

If you want to add more disks you need to create jobs for them and add the volume to the failover cluster.

如果要添加更多磁盘,则需要为其创建作业并将卷添加到故障转移群集。

On node2, the disk is locked.

在节点2上,磁盘已锁定。

Now we have windows failover cluster and the cluster storage needed so that we can proceed and install the SQL Server cluster instance.

现在,我们有了Windows故障转移群集和所需的群集存储,以便我们可以继续并安装SQL Server群集实例。

安装SQL Server故障转移群集实例 (Install SQL Server failover cluster instance)

Login to the node1 and locate the setup files to install the SQL Server failover cluster.

登录到node1并找到安装文件以安装SQL Server故障转移群集。

Please refer to the below articles for step by step installation of the SQL Server failover cluster.

请参考以下文章,以逐步安装SQL Server故障转移群集。

SQL Server 2014 – Install a clustered instance – step-by-step (1/3)

SQL Server 2014 –安装群集实例–分步(1/3)

SQL Server 2014 – Install a clustered instance – step-by-step (2/3)

SQL Server 2014 –安装群集实例–分步(2/3)

SQL Server 2014 – Install a clustered instance – step-by-step (3/3)

SQL Server 2014 –安装群集实例–分步(3/3)

结论 (Conclusion)

In this article, we explored to launch instances with SIOS subscription and created mirrored drives using SIOS which will be used as a clustered storage. In case you have any questions, please feel free to ask in the comment section below.

在本文中,我们探索了使用SIOS订阅启动实例的过程,并使用SIOS创建了将用作集群存储的镜像驱动器。 如果您有任何疑问,请随时在下面的评论部分中提问。

翻译自: https://www.sqlshack.com/how-to-configure-san-less-sql-server-clusters-in-aws-ec2-using-sios-datakeeper/

如何使用SIOS DataKeeper在AWS EC2中配置较少SANSQL Server群集相关推荐

  1. 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 ...

  2. aws rds监控慢sql_AWS RDS SQL Server中的初始Windows身份验证配置

    aws rds监控慢sql In this article, we will be exploring the process of enabling Windows authentication i ...

  3. AWS EC2文件上传

    AWS EC2 申请配置.文件上传.nginx安装部署.tomcat安装和项目部署.域名绑定 文章目录 AWS EC2 申请配置.文件上传.nginx安装部署.tomcat安装和项目部署.域名绑定 A ...

  4. 如何使用Node.js和CloudFormation在AWS Lambda中构建和部署GraphQL服务器

    介绍 (Introduction) I have been building GraphQL APIs in a Serverless environment for over 3 years now ...

  5. oracle ldom ipmp,在 Logical Domains 环境中配置 IPMP

    在 Logical Domains 环境中配置 IPMP Oracle VM Server for SPARC 软件支持对虚拟网络设备使用基于链路的 IP 网络多路径 (IP network mult ...

  6. aws ec2时间_AWS中自动化的三大领域,以避免支付过多的云账单

    AWS是全球最常用的云服务之一. Gartner Magic Quadrant将AWS评为最大的IaaS提供商.每个可能的域都由企业使用AWS服务. 全球约有 1,000,000家公司正在使用AWS作 ...

  7. AWS — AWS EC2

    目录 文章目录 目录 EC2 ENA(Elastic Network Adapter) EC2 在 AWS Regions 中,EC2 提供了安全.可调整大小的计算能力. AWS 提供了许多用于优化 ...

  8. 亚马逊AWS EC2云实例AMI安装LNMP环境(1)——Nginx安装

    概括:这里选择亚马逊EC2的Linux AMI实例,该Linux服务器是亚马逊预配置的Linux环境,内置多个YUM源,属于亚马逊首推的稳定Linux服务器.默认登录用户名为ec2-user,执行ro ...

  9. 亚马逊AWS EC2云实例AMI安装LNMP环境(3)——Mysql5.5

    概括:这里选择亚马逊EC2的Linux AMI实例,该Linux服务器是亚马逊预配置的Linux环境,内置多个YUM源,属于亚马逊首推的稳定Linux服务器.默认登录用户名为ec2-user,执行ro ...

最新文章

  1. cmake 注意事项
  2. 微软宣布加入 OpenJDK,打不过就改变 Java 未来!
  3. c语言使用zlib实现文本字符的gzip压缩与gzip解压缩
  4. YbtOJ-交换游戏【树链剖分,线段树合并】
  5. 开放源代码_开放式代码本质的10种方式
  6. k3梅林单线双拨教程_斐讯 K3 路由器刷入 OpenWrt LEDE 固件教程,支持多拨及去广告...
  7. CNC模具编程的工作流程
  8. fluidsim元件库下载_FluidSIM下载
  9. 软件体系结构风格复习总结
  10. 配电网重构知识及matlab实现
  11. ElasticSearch服务器的搭建与使用
  12. Android rom开发:recovery取消校验Vbmeta version和framework matrix
  13. 防止amazon账号关联,你真需要注意的这些点
  14. Web 页面如何添加水印?
  15. RNA-seq + 下游分析:一条龙代码
  16. [@vue/compiler-sfc] defineProps is a compiler macro and no longer needs to be imported
  17. 简网越过阅读,重新定义个性化
  18. 第一部分 思科九年 一(1)
  19. 百魂战记服务器维护了多久,为什么百魂战记进不去,百魂战记怎么注册不了
  20. C#音乐播放器(可播放wav mp3格式)

热门文章

  1. 清华大学 ucore-lab0 MacOS
  2. 什么是立即执行函数,有什么作用?
  3. JS获取JSON对象数组某个属性最大值
  4. HDU-2553-N皇后问题
  5. 关于html中css无法作用的问题
  6. eslint配置及rule解释
  7. webpack4导入全局sass文件
  8. JavaScript数据结构——图(Graph)
  9. CSS基本知识之盒子模型
  10. 大家有哪些被骗的很惨的经历?