📜 ⬆️ ⬇️

Infrastructure preparation and deployment of a failover cluster on Windows Server 2012



Hello% username%!


After several years of silence, I decided to share my experience in deploying a failover cluster based on Windows Server 2012.
Task setting: Deploy a fault-tolerant cluster to host virtual machines on it, with the ability to allocate virtual machines to separate virtual subnets (VLANs), to ensure high reliability, the ability to alternate server maintenance, to ensure the availability of services. Ensure a restful sleep at the IT department.

To perform the above task, we managed to knock out the following equipment:
  1. HP ProLiant DL 560 Gen8 4x Xeon 8 core 64 GB RAM server 2 pcs.
  2. SAS HP P2000 storage for 24 2.5 "disks 1 pc.
  3. Disks for storage 300 Gb 24 pcs. // The volume is not thick, but unfortunately budgets are such budgets ...
  4. Controller for connecting SAS production HP 2 pcs.
  5. Network adapter for 4 1Gb ports 2 pcs. // It was possible to take the module under 4 SFP, but we do not have equipment with support for 10 Gb, a gigabit connection is enough.

Naturally update the BIOS and firmware from the official site.
Connection organization:

We actually connected to 2 different switches. Can connect in 4 different. I think that is enough 2x.
On the switch ports where the servers are connected, it is necessary to change the interface mode from access to trunk in order to be able to be distributed across virtual subnets.
')
While updates are being downloaded to the newly installed Windows Server 2012, we’ll configure disk storage. We are planning to deploy a database server, therefore we decided to use 600 GB for databases, the rest for other virtual machines, this is a tautology.

Create virtual disks:

I advise you to specify the array model in the disk name, the functionality will be immediately understood. HP also recommends using a small number of virtual disks with a large number of physical disks, i.e. You should not produce a bunch of small virtual disks.

Now you need to create partitions.

We assign (map) our sections to the sas ports of storage controllers.
It is imperative to enable the Microsoft Multipath IO feature, otherwise, if the server has both storage controllers, the system will have 6 disks instead of 3x, and the cluster will not build, giving an error, saying that you have disks with the same serial numbers, and this wizard will be right, I want tell you.

I advise you to connect the server to the storage one by one:
  1. Connect 1 server to 1 storage controller
  2. 1 connected host will appear in the storage - give it a name. I advise you to call it this way: controller's imaserver_number (A or B)
  3. And so, until you connect both servers to both controllers.


On the switches to which the servers are connected, you need to create 3 virtual subnets (VLANs):
  1. ClusterNetwork - here goes the service information of the cluster (herbitbeat, regulation of writing to the storage)
  2. LiveMigration - here I think everything is clear
  3. Management - network to manage



This completes the preparation of the infrastructure. Go to setting up servers and raising the cluster.

We get servers in the domain. Install the Hyper-V, Failover Cluster role.
In the Multipath IO settings, we enable support for SAS devices.
Be sure to reboot.

The following settings must be made on both servers.

Rename all 4 network interfaces according to their physical ports (we have 1,2,3,4).
Configure NIC Teaming - Add all 4 adapters to the team; Teaming Mode - Switch Independent; Load Balancing - Hyper-V Port. Give the name of the team, I called the Team.
Now you need to raise the virtual switch.
Open powershell and write:
New-VMSwitch "VSwitch" -MinimumBandwidthMode Weight -NetAdapterName "Team" -AllowManagementOS 0

We create 3 virtual network adapters.
In the same powershell:
Add-VMNetworkAdapter –ManagementOS –Name "Management" Add-VMNetworkAdapter –ManagementOS –Name "ClusterNetwork"Add-VMNetworkAdapter –ManagementOS –Name "Live Migration"


These virtual switches will appear in the Network and Sharing Center, the traffic of our servers will follow them.

Configure addressing according to your plans.

We translate our adapters into corresponding VLANs.
In your favorite powershell:
Set-VMNetworkAdapterVlan -ManagementOS -Access -VlanId 2 -VMNetworkAdapterName "Management" -Confirm Set-VMNetworkAdapterVlan -ManagementOS -Access -VlanId 3 -VMNetworkAdapterName "ClusterNetwork" -Confirm Set-VMNetworkAdapterVlan -ManagementOS -Access -VlanId 4 -VMNetworkAdapterName "Live Migration" -Confirm


Now you need to configure QoS.

When configuring QoS by weight (by weight), which is the best practice, according to Microsoft, I advise you to arrange the weight so that the total amount is 100, then we can assume that the value specified in the configuration is a guaranteed percentage of bandwidth. In any case, the percentage is calculated by the formula:
Bandwidth percentage = set weight * 100 / sum of all set weight values


Set-VMSwitch “VSwitch” -DefaultFlowMinimumBandwidthWeight 15


For cluster overhead information.
Set-VMNetworkAdapter -ManagementOS -Name “Cluster” -MinimumBandwidthWeight 30

For management.
Set-VMNetworkAdapter -ManagementOS -Name "Management" -MinimumBandwidthWeight 5

For live migration.
Set-VMNetworkAdapter -ManagementOS -Name “Live Migration” -MinimumBandwidthWeight 50

In order for traffic to go through the networks correctly, it is necessary to correctly place the metrics.
The cluster overhead information traffic will go over the network with the lowest metric. Live Migration will follow the next largest network metric.

Let's do it.
In our beloved:
$n = Get-ClusterNetwork “ClusterNetwork” $n.Metric = 1000 $n = Get-ClusterNetwork “LiveMigration” $n.Metric = 1050$n = Get-ClusterNetwork “Management” $n.Metric = 1100


We mount our disk witness on the node from which we will assemble the cluster, format it in ntfs.

In the Failover Clustering snap-in in the Networks section, rename the networks according to our adapters.

Everything is ready to collect the cluster.


In the Failover Clustering snap-in, click validate. We pass the test. After that we create a cluster (create cluster) and select the quorum configuration of the Node and Disk majority, which is also considered the best choice for clusters with an even number of nodes, and given that we have only two of them - this is the only choice.


In the Storage section of the Failover Clustering snap-in, add your disks. Then add them in turn as a Cluster Shared Volume (right click on the disk). After adding a symbolic link to the disk in the folder C: \ ClusterStorage , rename it according to the name of the disk added as Cluster Shared Volume.


Now you can create virtual machines and save them to these partitions. I hope the article was useful to you.

Please report errors to the PM.


I advise you to read: Microsoft Windows Server 2012 Complete Guide. Rand Morimoto, Michael Noel, Guy Yardeni, Omar Draoubi, Andrew Abbeith, Chris Amaris.

PS: Special thanks to Mr. Salakhov, Zagorsky and Razbornov, who were shamefully forgotten by me when writing this post. I repent> _ <XD

Source: https://habr.com/ru/post/212595/


All Articles