server 2016 cluster failover cluster deployment

Bowen directory
First, what is a failover cluster?
Second, the requirement failover cluster
three fault detection
IV deploy failover, cluster

First, what is a failover cluster?

1, Failover Cluster Overview

With the development of Internet applications, many companies are increasingly dependent on online services to create value. These important online services in general have a very demanding applications, a single server is unable to meet such demanding requirements, can only use cluster technology.

Windows operating system provides a new technical solution, which is integrated in Windows server operating system, known as failover clustering. Failover cluster mainly refers to a group of independent computers, cluster servers (nodes) can be connected via a network and software to work together to enhance the availability of services and applications. Failover a storage device connected to all the nodes, i.e., the cluster comprises a shared storage device. Share common data storage device for data storage and arbitration cluster. Two-node failover cluster as shown below:
server 2016 cluster failover cluster deployment
In order to ensure the integrity, failover cluster data on a shared storage device only one node has ownership of shared storage devices. Only when the node fails to transfer ownership or human, it will have ownership of the shared storage device by the next node. This determines the different failover clustering and network load balancing cluster in function, that is generally only provide users with a service node (active state) within a failover cluster, the remaining nodes in the backup state. When the active node goes down because of a failure, it will be replaced by the next node it continues to provide services for users and nodes within the network load balancing cluster can provide users with services.

2, failover clustering features

  • Failover clustering can provide high availability of services for applications through the failover resources. It focuses on maintaining client access to applications and system services.

  • Failover cluster can support up to 64 nodes and 8,000 virtual machines.

  • It can be used locally or Microsoft Azure cloud as a witness arbitration.

  • Failover clustering requires shared storage devices.

Second, the failover cluster requirements

By default failover cluster must meet the requirements of the hardware, software, network infrastructure and institutions, and the need for a proper domain account with administrative privileges.

1. Hardware Requirements

  • Server: It is recommended to use a set of identical or similar configuration comprises a computer, and requires compatible with Windows server 2016.

  • Network adapter and cable (for network communication): Cluster failover solutions of other components, as is also required network hardware and compatible Windows server 2016, such With iSCSI, network configuration must be dedicated to network communication or the iSCSI, and not both.

  • A storage device controller or a corresponding adapter.

  • Shared storage device: must be compatible with Windows server 2016, and should contain at least two separate volumes. The witness disk for a volume, another volume will contain the files needed for the cluster roles. If the native shared storage disk, dynamic volume can not be set to only use basic disks, and recommend the use of NTFS file system.

2, the network infrastructure requirements and accounts

  • Network Settings: recommended to use the same adapter, and the same communication is provided on the adapter. Also, compare settings between the network adapter and the switch it is connected, in order to ensure that the settings do not conflict.

  • IP address: If the cluster's private network does not use routing to another device, then try to ensure that each of these private networks uses a unique subnet, do not specify the same network segment for different purposes.

  • DNS: a cluster server must use DNS for name resolution, you can use the DNS dynamic update protocol.

  • Domain role: All servers in the cluster recommendations in the same active directory domain. Here is recommended that all servers are members of a cluster server, DC not configured cluster nodes.

  • Account for administering the cluster: When you first create a cluster or add a cluster server, you must log on to the domain use all the cluster servers account with administrator privileges.

Third, fault detection

Fault detection and prevention failover clustering provides the key advantage of. When a cluster node or application fails, failover clustering can work or failure of the system is distributed to the surviving cluster node responds by restarting the failed application. Failover cluster failure detection and prevention include bi-directional failover, application failover, parallel recovery, and automatic fault recovery.

Cluster failure detection nine hundred twenty-one each resource or service node and dynamically transfer applications, data files and resources available to the cluster server is normal, and then restart them. Therefore, database, file sharing, and application resources can maintain high availability to users and client applications.

Mainly through failover cluster heartbeat, cluster arbitration failure is detected.

1, the heartbeat

Each node of the cluster each other regularly use a dedicated cluster network switching device sends a message (by default sent once every 5 seconds each), as long as the cluster nodes still working, will keep, periodically send a message to the cluster the rest of the nodes, all of the private network is called a heartbeat message information, for transmitting the heartbeat message is referred to as heartbeat. Heartbeat communication, each node can check the availability of other nodes and applications.
If a backup node fails, it will be allowed within a given period of time in any one of several ways to prove that it is still in normal operation, and can communicate with other normal nodes. If you can not prove it, then it will be removed at this time cluster.
If the active node fails, within a specified period (the default is two cycles, i.e., 10 seconds) backup node does not receive a heartbeat message, it will perform a failover, taken over by the backup cluster node to provide services.

2, arbitration

By the cluster members can work when no vote when the failover cluster, by default, each cluster node can vote, in addition, arbitration witness can cast an extra vote (witness arbitration may be a disk or file share resources ). Only the vote of more than half of the cluster to function properly.

  • Most nodes (no witness), only cluster nodes have the right to vote. For cluster nodes is an odd number.

  • Most nodes with a witness (a disk or file share), in addition to the cluster nodes have voting rights, the Board shall have one vote testimony. For cluster nodes is an even number.

  • No majority (the witness disk only), cluster nodes have no right to vote, only to witness the disk has one vote. Generally not recommended to use this model, prone to single point of failure.

Fourth, the deployment of cluster failover cluster

This case to a two-node failover cluster for example, uses three separate different network clearly distinguished: VM2 card transmission heartbeat, VM3 attached storage server, VM4 Foreign Service

1, case description of the environment:

Four Windows server 2016

A Windows 7

Deploy a server 2016 domain controller (I was deployed in advance domain controller) card VM4 I set external services.

Deploying a second cluster node 1 (cluster01), requires three cards, VM2 (private) for transmitting heartbeat, VM3 (SAN) for connecting the storage server, VM4 (public) external services. Join a domain environment.

A third deployment cluster node 2 (cluster02), also need three network cards, VM2 (private) for the transmission of heartbeat, VM3 (SAN) for connecting the storage server, VM4 (public) external services. Join a domain environment.

The fourth station the deployment of storage service (SAN), a network card, VM3, and to ensure cluster01, cluster02 of VM3 network interoperability. Join a domain environment.

Windows 7 acts as a client, a VM4 network to ensure network interoperability and the front four, join the domain.

2, began to deploy:

AD_DNS configuration is as follows:

Card into a card VM4 external services
server 2016 cluster failover cluster deployment

Logon domain
server 2016 cluster failover cluster deployment

Modify the IP address, DNS and turn off the firewall
server 2016 cluster failover cluster deployment

Create a new organizational unit, create two users, one will later be used to verify failover cluster
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

User created
server 2016 cluster failover cluster deployment

cluster01 configuration is as follows:

Add three NIC
server 2016 cluster failover cluster deployment

To prove the name of three card, and then configure the IP address, private transport is the heartbeat, SAN-attached storage services, public external services
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

The modifications are complete domains added
server 2016 cluster failover cluster deployment

Join successfully, restart your computer
server 2016 cluster failover cluster deployment

Local administrator logon domain
server 2016 cluster failover cluster deployment

Cluster02 configuration is as follows:

Add three NIC
server 2016 cluster failover cluster deployment

Clear three NIC begin configuring IP addresses
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

After configuration is complete to join a domain, I omitted a few pictures, do not understand how you can refer cluster01 be joined to a domain
server 2016 cluster failover cluster deployment

Local administrator logon domain
server 2016 cluster failover cluster deployment

SAN configuration is as follows:

Adding memory card connector, which is VM3
server 2016 cluster failover cluster deployment

Configure the IP address
server 2016 cluster failover cluster deployment

Installation Storage Service
server 2016 cluster failover cluster deployment

Default Next
server 2016 cluster failover cluster deployment

Confirm to start the installation and correct
server 2016 cluster failover cluster deployment

The installation is complete
server 2016 cluster failover cluster deployment

Configuring Storage Service
server 2016 cluster failover cluster deployment

Create a virtual disk location
server 2016 cluster failover cluster deployment

Specify a virtual disk name
server 2016 cluster failover cluster deployment

Set the virtual disk size
server 2016 cluster failover cluster deployment

Specify a target name
server 2016 cluster failover cluster deployment

Specify the access server, I use the IP address is specified, after the completion of other specified IP address can not access, there is no need to open the back of the CHAP authentication
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment

Front may not specify an IP address, this step may be open authentication, the self-configured as required
server 2016 cluster failover cluster deployment

Confirmation begin creating
server 2016 cluster failover cluster deployment

Created
server 2016 cluster failover cluster deployment

Then create a second virtual hard disk block
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment

After two virtual hard disk is created, you will find They are unconnected
server 2016 cluster failover cluster deployment

cluster01 attached storage server:

Then start the connection, open the Windows server management tools on Cluster01
server 2016 cluster failover cluster deployment

Click Yes
server 2016 cluster failover cluster deployment

Enter the IP address of the storage server is connected to
server 2016 cluster failover cluster deployment

打开cluster01的计算机管理器,此时会发现有两块脱机的硬盘,我们将他联机初始化,然后创建简单卷,设置Q盘为心跳盘,S盘为数据库盘
server 2016 cluster failover cluster deployment

新建简单卷
server 2016 cluster failover cluster deployment

新建Q盘
server 2016 cluster failover cluster deployment

默认下一步
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

第二块硬盘创建S盘,作为数据库盘,操作是一样的我就不截图了。

两块硬盘配置完成后打开此电脑会发现多了两块磁盘
server 2016 cluster failover cluster deployment

Cluster02连接存储服务器:

Cluster02连接存储服务器和cluster01操作步骤是一样的,而且盘符必须是一致的,按照cluster01配置就可以了

连接存储服务器成功后,打开磁盘管理会发现和cluster01的盘符不一致,我们需要手动更改盘符
server 2016 cluster failover cluster deployment

第一块硬盘更改盘符为Q盘
server 2016 cluster failover cluster deployment

更改第二块硬盘盘符
server 2016 cluster failover cluster deployment

更改为S盘
server 2016 cluster failover cluster deployment

cluster01开始安装文件服务器故障转移群集:

添加文件服务器
server 2016 cluster failover cluster deployment

添加故障转移群集
server 2016 cluster failover cluster deployment

确认无误开始安装
server 2016 cluster failover cluster deployment

安装完成
server 2016 cluster failover cluster deployment
cluster02也是安装此步骤安装就可以了,安装完成之后就什么也不需要配置了,在cluster01上配置即可

cluster01先配置故障转移群集,然后再配置文件服务器
server 2016 cluster failover cluster deployment

创建新群集
server 2016 cluster failover cluster deployment

输入服务器名称dc3.benet.com然后添加(计算机名加域名)
server 2016 cluster failover cluster deployment

默认下一步
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment

正常在工作环境的话还需要安装驱动,我是模拟环境就不需要了,注意检测有没有报错,警告是不影响的
server 2016 cluster failover cluster deployment

输入群集名称和群集IP地址
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

继续添加第二个节点
server 2016 cluster failover cluster deployment

输入第二个节点的计算机名加域名,我的是dc4.benet.com,基本和第一个节点配置一样,相同步骤我就省略咯
server 2016 cluster failover cluster deployment

完成验证配置
server 2016 cluster failover cluster deployment
server 2016 cluster failover cluster deployment

完成之后点击此电脑会发现共享磁盘在cluster01上,cluster01为活跃节点,而cluster02为备份节点,而且在AD服务器上查看DNS正向查询区域benet.com下多了一台cluster主机,
server 2016 cluster failover cluster deployment

配置仲裁见证磁盘
server 2016 cluster failover cluster deployment

选择仲裁见证
server 2016 cluster failover cluster deployment

配置为磁盘见证
server 2016 cluster failover cluster deployment

选择S盘为见证存储卷
server 2016 cluster failover cluster deployment

配置完成
server 2016 cluster failover cluster deployment

开始配置文件服务器
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

选择文件服务器
server 2016 cluster failover cluster deployment

默认下一步
server 2016 cluster failover cluster deployment

创建一个客户端访问的名字和公共IP地址
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

添加共享
server 2016 cluster failover cluster deployment

快速共享
server 2016 cluster failover cluster deployment

添加共享位置
server 2016 cluster failover cluster deployment

创建共享名称
server 2016 cluster failover cluster deployment

默认下一步
server 2016 cluster failover cluster deployment

用户添加权限,也就是在AD上创建的那两个用户
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

bob设置只读权限
server 2016 cluster failover cluster deployment

tom设置读取和写入权限
server 2016 cluster failover cluster deployment

共享添加权限
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

Configuration and then apply to everyone OK to delete
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

The client configuration is as follows:

server 2016 cluster failover cluster deployment

Set the IP address
server 2016 cluster failover cluster deployment

Clients join the domain
server 2016 cluster failover cluster deployment

Local administrator logon domain
server 2016 cluster failover cluster deployment

Bob and tom add to the group administrator, disable the administrator user login authentication switch bob
server 2016 cluster failover cluster deployment

server 2016 cluster failover cluster deployment

Tom login,
server 2016 cluster failover cluster deployment

Access shared files
server 2016 cluster failover cluster deployment

At this point you can see tom have read and write permissions, you can download or upload
server 2016 cluster failover cluster deployment

Switching Bob Log
server 2016 cluster failover cluster deployment

Access shared files
server 2016 cluster failover cluster deployment

You will find that you can read but not write to bob
server 2016 cluster failover cluster deployment

Cluster01 fault simulation, active nodes automatically switch to the cluster02 server, access authentication can ensure that the user properly
server 2016 cluster failover cluster deployment

After Shutdown View on cluster02 to find this computer will automatically switch over cluster, cmd in the knock ipconfig will find two cluster IP address is automatically switched over, the backup node becomes the active node, the switching time required only 5s
server 2016 cluster failover cluster deployment

It does not affect client access, but also do not see a cluster fault
server 2016 cluster failover cluster deployment

------ This concludes the article, thanks for reading ------

Guess you like

Origin blog.51cto.com/14156658/2439550