Clusters with Windows Server 2012 R2
Strong Together
Windows Server 2012 rolled out a new, easier way to build a high-availability cluster. And, with Windows Server 2012 R2, you can even build the cluster with virtual servers and use virtual disks as shared storage.
This article describes how to set up a cluster with Windows Server 2012 R2. The process is largely the same for virtual servers and physical clusters. The only difference is in the configuration of virtual disks as shared VHDX files [1]. You can, of course, continue to work with other shared storage for your cluster, even if you are running a virtual cluster.
Windows Server 2012 also offers the ability to define VHD disks as iSCSI-based, shared cluster storage on a server. Starting with Windows Server 2012 R2, this feature also works with VHDX hard drives. One advantage of iSCSI targets as shared storage is that you can also integrate physical clusters, whereas shared VHDX disks only support virtual clusters.
Companies that virtualize servers with Hyper-V and want to achieve high availability rely on the live migration of VMs in the cluster. However, you can only achieve live migration with physical shared storage or iSCSI targets. Shared storage on the basis of shared VHDX does not support clusters for live migration with Hyper-V.
If you run Hyper-V in a cluster, you can ensure that all virtual servers are automatically taken over by another host if one physical host fails.
iSCSI Targets
Windows Server 2012 R2 serves up virtual disks based on VHDX files as iSCSI targets on the network (Figure 1). These virtual disks can serve as shared storage for a cluster. To use virtual disks as iSCSI targets, you must install the iSCSI Target Server role service in Server Manager by clicking Add Roles and Features | Server Roles | File and Storage Services | File and iSCSI Services . After installing the role service, you can use Server Manager to select File and Storage Services | iSCSI and create virtual disks, which can be configured as iSCSI targets on the network. It is a good idea to use a server on the network that is not part of the cluster.
In the scope of the setup, you can define the size and the location of the VHD(X) file. You can use the wizard to control which server on the network is allowed to access the iSCSI target. If you want to use the disks as cluster storage, you can restrict access here. You can also use a single iSCSI target to provide multiple virtual iSCSI disks on a server. To do this, simply restart the wizard and select an existing target.
After generating the individual virtual disks and assigning iSCSI target(s), you can connect them to the cluster nodes. After integration, the virtual disks are displayed as normal drives in the server's local disk manager and can be managed accordingly.
Connecting iSCSI Targets
To connect cluster nodes to virtual iSCSI disks, you need the iSCSI Initiator, which is one of the built-in tools on Windows Server 2012 R2. Search for iscsi in the home screen and then launch the tool. When you first call the tool, you need to confirm the start of the corresponding system service and unblock the service on the Windows Firewall.
To integrate iSCSI storage, first go to the Discovery tab. Click on Discover Portal and enter the IP address or name of the server that provides the virtual disks. Go to the Targets tab, which Windows uses to display the iSCSI targets on the server. You can then connect the target with the available disk drives, which you created with the iSCSI target on the target server.
Press Connect , and the server opens a connection with the server and creates virtual disks (Figure 2). Check Add this connection to the list of Favorite Targets box. This option must be set for all disks. Confirm all windows by pressing OK . If you create a cluster with iSCSI, connect the target with the second server and all other cluster nodes that you want to include in the cluster.
You can select Enable multi-path to specify that Windows Server 2012 R2 also uses alternative network paths between the server and target system. This is an important factor in increasing reliability.
Configuring iSCSI Disks
Once you have connected iSCSI targets, the drives associated with a iSCSI target become available in Disk Manager. You can launch Disk Manager by typing diskmgmt.msc
.
Once the drives are connected to the first server node, they must be switched online, initialized, partitioned, and formatted in Disk Manager. Converting to dynamic disks is not recommended for use in a cluster. However, because the medium has already been initialized and formatted on the first node, you need not repeat this step on the second. On the second node, you just need to switch the Status to Online and change the drive letter, which must match the first node. Using the context menu, switch the iSCSI targets to Online , then initialize the target and create a volume and format it NTFS.