Chapter 11

Shared Storage and Clustering Introduction

Shared storage and clustering in Windows Server 2012 R2 deliver arguably the most significant functionality that any large enterprise or datacenter infrastructure design requires. Ensuring that resources such as applications, services, files, and folders are delivered in a highly available, centralized, and scalable offering should be paramount to every IT administrator and consultant. Utilizing shared storage and clustering gives organizations the ability to scale out storage on demand, create centralized locations for resources, and make them highly available (HA) to the business.

The concepts of shared storage and clustering aren’t new or exclusive to Windows Server 2012 R2, but gaining a clear understanding of each will allow you to confidently deploy the enhanced HA offerings that come out of the box with the operating system. In this chapter you will learn to:

Shared Storage Basics

In its most basic form, shared storage offers a central location inside an organization’s IT infrastructure to host a specific set of files or applications so that multiple users can have simultaneous access to them. Many different storage devices can be utilized for this technology, examples of which are storage area networks (SANs), Network Attached Storage (NAS), and Serial Attached SCSI (SAS). Depending on your requirements (and budget), which of these options you deploy is up to you. Ultimately, when combined with clustering, they all achieve the same goal of enabling people to keep working with their applications and files in the event of a server outage. A simple example of this is a person named Sarah in Human Resources. Sarah needs to make sure that she has a location to securely store critical documents related to employees, which could include their Social Security numbers. With a properly designed and implemented shared storage solution, Sarah can place these files on a shared location that is encrypted and backed up and could potentially have rights management or other security measures enabled. Other employees with the associated rights to this location have access to these files, and Sarah doesn’t have to worry about trying to share the files from her own workstation or even risk losing them if it was to crash.

Storage, and the ability to provide controlled access to it, is one of the most common requirements of any organization. Many different storage options are available. Before we get into the options available in Windows Server 2012 R2, let’s review the basic components:

With the feature advancements in Windows Server 2012 R2 specific to storage, you can start utilizing these components on the infrastructure you already own. Let’s dig into these technologies for a brief overview.

Storage Area Network

A storage area network is a network-connected entity that is dedicated to storage. SAN technology is just a basic framework, and each type of SAN solution presents storage in its own unique way. What we are really talking about is block-level storage that is available to resources over the network. The SAN is typically a large device with numerous hard disk drives, and you divide and format them to present to servers and computers on the network.

In addition, a SAN doesn’t have to be a traditional network; it could be over Fiber Channel, for example. With Fiber Channel, the same basic principal applies: it’s a device filled with disks but the network is fiber optic. In most organizations the storage network has a network switch dedicated and optimized for a SAN. The data transfer network that a SAN communicates on is typically known as the storage fabric. The main purpose of a SAN is to allow different types of servers, applications, and users from multiple places to access a storage pool, which can be accessed from any devices that interconnect with that storage fabric. Part of the storage fabric is the host bus adapter (HBA); HBAs are the network interface cards (NICs) that connect the storage fabric to the resources on your network that need to access the storage.

Many organizations and IT pros believe that a SAN provides them the flexibility to deploy and redeploy servers and storage in a much more dynamic fashion. Servers can boot directly from a SAN, giving them the operating system and its configurations in a larger, more highly available location. If the physical server goes down, a new one can be put in its place, and the operating system and the associated disks can be pointed to the new server much faster than rebuilding and restoring from tape.

We recommend that you spend some time investigating these topics at a much deeper level, and if your organization has an existing SAN, you should start by reading through the deployment and administration guides that accompany it.

iSCSI

Internet Small Computer System Interface (iSCSI) has been around for many years and has been used as a way to allow computers or servers to communicate with disk drives or other storage devices such as tape libraries. As SCSI has advanced, so has the network infrastructure connecting your servers and computers. Gigabit-based networks are much more commonplace and allow you to run storage connections natively through these higher-bandwidth connections. iSCSI is used to facilitate the transfer of data over a TCP/IP (Ethernet) network. The iSCSI protocol lets you present the disk drives located in your SAN over an existing network to your servers.

Microsoft’s iSCSI Initiator is a software component built into all Windows Server operating systems since 2008 and is also included in Windows 7 and Windows 8. The iSCSI Initiator enables the connections on your Windows devices to utilize this technology.

As with the other storage technologies we are going to talk about here, we won’t get into great detail about all of the scaling and performance options available. The purpose of this chapter is to introduce the topics.

Fiber Channel

Fiber Channel (FC) is a high-speed connectivity network link running over twisted-pair copper wire or fiber-optic cable. The connection to your servers and storage is handled through the host bus adapter (HBA) using a protocol similar to TCP, called Fiber Channel Protocol (FCP).

The HBAs communicate in a grouping of zones with specific worldwide names, which essentially act like IP addresses. The Fiber Channel connection to your drives and storage is through a fiber switch and is managed in zones that are allocated to specific network interfaces. This has long been the fastest type of network storage connectivity option available to organizations, but it doesn’t come cheap!

SAS Enclosures

Serial Attached SCSI is a way to access devices that employ a serial connection over locally connected cables. Unlike iSCSI and FC, there is no network connectivity in SAS enclosure solutions. The SAS technology supports earlier SCSI technologies, including printers, scanners, and other peripherals. SAS enclosures are large devices similar to a SAN that have multiple disks configured using different RAID levels to provide redundancy in the event of disk failure.

RAID

Redundant Array of Independent Disks consists of multiple disks grouped together. The array allows you to build out fault-tolerant disks and scale disks together to get high levels of performance. Multiple types of RAID exist that offer many different methods of performance and failover. The RAID technologies are the backbone of the internal workings of iSCSI, SAS, and Fiber Channel SAN enclosures. The following link provides information evaluating the types of RAID and when to use them, plus a breakdown of the different types in more detail: http://technet.microsoft.com/en-us/library/cc786889(v=WS.10).aspx.

SMB 3.0

Server Message Block (SMB) is a protocol specifically designed for file sharing and scaling out file shares or servers. It sits on top of TCP/IP but can utilize other network protocols. SMB is used for accessing user data and applications on resources that exist on a remote server. SMB has some specific requirements for setup:

The failover cluster servers running Windows Server 2012/2012 R2 have no extra requirements or roles that need to be installed. SMB 3.0 is enabled by default.

SMB features that are new to Windows Server 2012/2012 R2 include the following:

These are just a few of the newer features available to SMB. There are many other components, such as SMB-specific PowerShell cmdlets, encryption, and performance counters.

An in-depth look at SMB and the new feature set can be found on TechNet at http://technet.microsoft.com/en-us/library/hh831795.aspx.

Windows Server 2012 R2 File and Storage Services

The File and Storage Services role in Windows Server, shown in Figure 11.1, provides all the services and functions you need to manage and create file servers and storage options with Windows Server.

Figure 11.1 File and Storage Services

image

As you can see, the Storage Services component of this role is installed by default and cannot be uninstalled. The other components can be installed and removed as needed.

The File and iSCSI Services component of this role provides multiple other components that will help you manage your file shares, disk size, replication, and branch offices. The following list provides an overview of each of these components and what they offer to your file and storage capabilities with Windows Server 2012 R2:

File Server This component allows you to manage shares and enable users to access files on this specific server in your organization’s network.
BranchCache for Network Files This component allows your BranchCache servers to have network file services.
Data Deduplication This service helps you manage and save disk space by looking through your volume and making sure that only a single version of a file exists. Continuing with the earlier example of Sarah and her HR files, let’s say that Matthew, an HR coworker of Sarah, saved a copy of a file somewhere else, thinking it wasn’t available. Data Deduplication makes sure that only a single version of the specific file exists but that pointers are available so that Matthew can find his file.
DFS Namespaces Distributed File System (DFS) allows you to set up a group of shared folders that could be hosted on other servers in your organization but appear under one name. Here’s an example:
Using DFS Namespaces, you could locate both of these on \\Bigfirm\Shared.
DFS Replication This feature enables you to synchronize shared folders across a WAN. It does not require DFS Namespaces but can be used with it.
File Server Resource Manager File Server Resource Manager (FSRM) is a performance and monitoring tool that will give you more detailed reports on what’s happening with your storage. You can build file policies, quotas, and classifications through FSRM as well.
File Server VSS Agent Service You can use this service to copy applications and data that are stored on the specific server the role is on that is using Volume Shadow Copy Service (VSS). For more information on VSS you can review http://tinyurl.com/c11whatisvss.
iSCSI Target Server This provides the tools and related services to manage your iSCSI servers.
iSCSI Target Storage Provider (VDS and VSS Hardware Providers) Works similarly to the File Server VSS Agent Service, but it is specific to servers that are using iSCSI targets with VSS and the Virtual Disk Service (VDS).
Server for NFS You can enable Network File System (NFS), which is used by Unix/Linux–based computers, so that shares on this installation of Windows Server 2012 R2 are visible to those clients.
Work Folders This new feature of Windows Server 2012 R2 provides a simple way to manage files that exist on a bunch of different workstations and personal devices. The work folder will act as a host and synchronize the users’ files to this location so they can access their files from inside or outside the network. This differs from File Server or DFS Namespaces in that these are client-hosted files. Going back to our example about Sarah and Matthew in the Human Resources department, Matthew and Sarah could be using Work Folders so that files saved in specific locations on their workstations would be synchronized with a file server and updated. If they are working on a project together but from different locations, those files are always available and synchronized.

You can install all of these components through the Server Manager dashboard, which provides details of each component and any required prerequisites. In the next section we will be defining clustering and helping you build out highly available services with failover clustering.

Clustering

In its most basic form, a cluster is two or more servers (physical or virtual) that are configured as a logical object and a single entity that manages shared resources and presents them to end users. Servers that are members of a cluster are known as nodes. The three most common types of clusters in Windows Server 2012 R2 are file server clusters, SQL clusters, and Hyper-V clusters.

A two-node cluster, for example, would be configured with nodes (physical or virtual), multiple network interface cards, and a shared storage solution such as iSCSI, SAN, or direct attached disks. The purpose of clustering is to allow a specific group of nodes to work together in a shared capacity with highly available resources. This gives your end users high availability for the workloads they need. Clustering provides the following benefits:

The scalability options go well beyond two host servers and can expand up to sixty-four nodes per cluster, with support for even cross-geographic locations. The complexities of geographically distributed clusters for availability and recovery are not the focus of this section, but they will become more important as you start to understand the capabilities of clustering.

Clusters are commonly used in high-capacity, high-visibility, and fault-tolerance scenarios. You design the cluster size and cluster type based on the specific needs of the service or business and on the resources to be hosted. In any scenario, always think of clustering as a solution for making your services, applications, and components more available to the end user.

Windows Server has grown as an operating system over the years, and the requirements for creating a cluster have always been the key to a successful cluster implementation. In the next section we’ll take a look at these requirements.

Clustering Requirements

We’ll spend some time examining the requirements for setting up a cluster and some of the best practices involved. But before we get into the hardware specifics, make sure to review the TechNet post “Validate Hardware for a Windows Server 2012 Failover Cluster,” located at http://technet.microsoft.com/en-us/library/jj134244.aspx.


Validation Information for Windows Server 2012 R2
As of this writing, the Windows Server 2012 R2 validation information has not been published. The requirements stated in the article, “Validate Hardware for a Windows Server 2012 Failover Cluster,” apply and will continue to be supported.

Here are at the requirements:

Servers Our team of experts, MVPs, and Microsoft all recommend that you use a set of hardware that contains the same or similar hardware items and configuration.
Network Multiple network interface cards should always be used. In addition, if your clusters are using iSCSI, you should separate network and normal communications traffic either by using physically different network hardware or by logically segmenting the traffic using VLANs on the switches.
Storage If you’re utilizing Serial Attached SCSI or Fiber Channel in a cluster, all items should be identical, including HBA drivers and firmware. You should not use multiple versions of firmware or drivers even if the manufacture supports it.
Shared Storage Shared storage is required. With Windows Server 2012 (and R2) you can use shared storage that is local via SAS to the server, along with SMB 3.0 file shares for all of your cluster needs.
Storage Spaces If you plan to use Serial Attached SCSI, Windows Server 2012 and Server 2012 R2 support Storage Spaces. We will be discussing Storage Spaces in Chapter 12, but here are some of the basics in regard to Storage Spaces and clusters:

Clustering Functionality

Clustering is a mix of software and hardware, and it can be hosted on physical servers or virtual machines. Windows Server 2012 R2 has the components and tools built in for deploying your clusters, including a handy prerequisites wizard to validate that you have all the components and configurations in place to successfully set up a cluster.

Many improvements have been made to clustering since the Windows Server 2008 R2 version. Clustering is affected by these operating system improvements, but its features are located in the same places and have the same capabilities from prior versions, but with much improvement, such as cluster scalability. Windows Server 2012 and Server 2012 R2 have an increased scalability offering in the Hyper-V Failover Clustering feature, now supporting up to 64 nodes and 8,000 VMs per cluster.

Microsoft has also introduced a concept called continuous availability. This includes network interface card teaming, support for Cluster-Aware Updating, and Scale-Out File Servers (SOFS). Continuous availability is end-to-end monitoring, with options to monitor up and down the entire cluster stack.

Cluster-Aware Updating Cluster-Aware Updating is a service supported by the newly revamped Windows Server Update Services (see Chapter 31, “Patch Management,” for more information). This feature will move your workloads or virtual machines to another node in the cluster, process the update (rebooting if needed), and then move the workloads right back and proceed to the next node in the cluster.
Using Hyper-V Virtual Disks as Shared Storage Considered to be possibly one of the best features of Windows Server 2012 and 2012 R2 is the ability to utilize your Hyper-V virtual disks (in VHDX format only) as shared storage for guest-based clustering, greatly expanding scale-out and availability inside the virtual infrastructure, and for building out scale-out file servers. Most important is the ability to use your VHDX files for clustering without a SAN.

A well-implemented failover-clustering solution will maximize business productivity and hone in on service levels. A resilient datacenter is one that has resource pools of computing power, storage, and network resources. In building a failover-clustering environment with Windows Server 2012 R2, you begin at the physical layer, starting with the network. Figure 11.2 shows an individual server with two physical NICs and multiple virtual adapters.

Figure 11.2 Physical and virtual NICs

image

With continuous availability you get not only improved reliability but also improved performance. With this design you team multiple connects to increase the throughput available to the operating system and fault tolerance if an NIC port fails, a cable is pulled, or a physical card goes offline.

Cluster Shared Volumes

Cluster Shared Volumes (CSV) is a component of Failover Clustering and was first introduced in Windows Server 2008 R2. CSVs were designed specifically for virtualization. Their basic use was to simplify storage for virtual machines. If you do not use a CSV with your Hyper-V servers, then your disk can be accessed by only one node at a time. Configuring a CSV allows a common shared disk to be used, simplifies the storage-management needs for Hyper-V, and allows multiple VHDs to exist. You can also minimize downtime and disconnections with fault detection and recovery over the additional connection paths between each node in your cluster (via SAN).

The design of the CSV simplifies storage so that multiple VMs can access the same disk at the same time, which obviously doesn’t require as many disk drives to be created. You will gain other abilities through this model; when you are doing a live migration of your virtual machine, the shared volumes create multiple connections between the cluster nodes and the shared disk. So if a connection is lost, the migration can continue via another connection. To utilize CSVs you need only use NTFS partitions; no special settings or configurations are required beyond that.

In Windows Server 2012, CSVs allow multiple nodes to have read/write access to the same disk. The advantage that you gain from this is the ability to quickly move any of the volumes you have from any node in a cluster to another node in the cluster. Dismounting and remounting a volume are greatly improved, which helps simplify managing large numbers of disks in your clusters. Windows Server 2012 also made some significant changes in its advanced capabilities, such as BitLocker volumes, removal of the external authentication dependencies support for storage spaces, and major improvements in validation of Hyper-V to CSV functionally for performance increases. In Windows Server 2012, there is no automatic rebalancing of node assignment for your disks, but in Windows Server 2012 R2, CSV ownership is balanced across all nodes. Previously, all disks could be owned by one or two nodes in, say, a 12-node cluster, but with Windows Server 2012 R2, the disks are evenly disturbed across the 12 nodes. If a node goes down, the cluster automatically starts the process of rebalancing the disk placement. By moving away from a single coordinator node to a distributed node, support for Scale-Out File Servers is much more effective and the risk of failure dramatically drops.

In Windows Server 2012 R2, CSVs have better diagnostics and interoperability than in previous versions. You can view the CSVs on a node-by-node basis to see if I/O is set up to be redirected and the reason for it. Windows Server 2012 R2 has a new PowerShell cmdlet, Get-ClusterSharedVolumeState. For interoperability, Windows Server 2012 R2 adds support for the following features:

The growth and acceptance of virtualization in organizations of all sizes shows that the way clustering is being used today versus even five years ago has dramatically changed. Many datacenters today are building out large-scale clusters. Microsoft has been working diligently on increasing the resiliency of CSVs as well as expanding their utilization beyond just for VMs and extending it to Scale-Out File Servers (SOFS) specifically to shared VHDX. Scale-Out File Servers are discussed in Chapter 13, “Files, Folders, and Basic Shares.” The major changes since Windows 2008 R2 in CSVs expand the possibilities for what you can use them for, as well as the scenarios and storage options for your clusters.

Clusters and Virtualization

This section focuses on the improvements in Windows 2012 R2. Since there has been just one year between the releases of Windows Server 2012 and Windows Server 2012 R2, we’ll treat them as one release. The features that are specific to Windows Server 2012 R2 will be noted as such. First, let’s talk about the new features and how guest (virtual machine) clusters have been given some great options:

Shared VHD One of the new features is shared VHD (virtual hard disk) for guest clusters, giving you the ability in your Hyper-V environment to use .vhdx as your shared storage solution.
Virtual Machine Drain on Shutdown The VM drain on shutdown enables the Hyper-V host to start draining a specific node and migrate all of the VMs to a new host. This will also happen if the VM shuts down during an outage.
VM Network Health Monitoring VM network health monitoring allows you to live migrate VMs if even if a disconnect occurs on your virtual network. Additional new features pertain to things like the Cluster dashboard and node health detection that gets fed into that dashboard.
Live Migrations Previous to Windows Server 2012, to do a live migration you needed to have a shared storage solution in place that you were leveraging for live migration with no downtime. Windows Server 2012 allows you to move the VMs from host to host with or without a cluster, and with the addition of SMB 3.0 file shares, the files you have set up for this don’t need to sit on a SAN. You can do live migrations from VMs that are on local disks attached to the server.

One of the most important factors to understand in clustering is the quorum—what it does, why you need one, and what improvements have been made to Windows Server 2012 R2 that improve the quorum’s resiliency. In the next subsection we’ll explain what a quorum is so that you can gain a deeper understanding of its use in clustering.

Understanding Quorums

According to Webster’s New World College Dictionary, Third Edition, a quorum is “the minimum number of members required to be present at an assembly or meeting before it can validly proceed to transact business.” This definition holds true for the use of the term quorum as it pertains to a cluster. The best way to start gathering the technical needs for your cluster is to understand what a quorum is and what it’s used for.

The quorum has been around since the inception of clustering and has been a major component and an unsung hero of sorts. In each revision of Windows Server, improvements to the quorum have been made to bring us to where we are now with extremely advanced quorum capabilities in Windows Server 2012. The quorum is the setting in the failover that determines the number of failures a cluster can have or sustain and keep the cluster (services) online. Once you have exceeded the quorum’s threshold, that cluster goes offline.

The cluster does not count the nodes and resource numbers, so it doesn’t look at the current capacity and decided to shut the services down. Think of it like this: There are 100 nodes in a cluster; that does not mean that if 50 of them go down, the cluster shuts off when it reaches 51 nodes down. The cluster is completely unaware of the server count or what resources are being over- or underutilized. Instead, the responsibility of the quorum is to help prevent an anomaly called split-brain, where two servers in a cluster are attempting to write the same file or take ownership of the same resources, potentially corrupting them.

The job of the quorum in this capacity is to prevent the problem from happening and essentially decide whether the cluster can or should continue to function, stopping a problematic node’s service until it can communicate properly with the rest of the clusters. When the issue is resolved, the quorum will allow the problematic node to rejoin the cluster group and restart all the needed services. The quorum decision is done through votes; each node in a cluster has a single vote, and the cluster itself can be configured as a witness vote. The witness can be a file share or a disk (as a best practice from the Cluster team at Microsoft, you should always configure a cluster with an odd number of members). The odd number of nodes gives you the ability to have an even number of quorum votes, and the odd resource can be the witness for outages. Adding this additional node ensures that if half the cluster goes down, the witness node will keep it alive.

Highly Available Storage

Having a highly available virtual infrastructure is a major factor in the success of your HA plan. Considerations for storage options and how to connect the storage to your virtual machines so that they run uninterrupted when hardware fails are imperative. Design considerations include how to store your VMs and what kinds of components are required to provide the benefits for fault tolerance. The following is a list of highly available storage options:

Hardware Most important is hardware for the storage, whether SAN or iSCSI or JBOD (just a bunch of disks).
Power You need stable power and redundant power supplies. If you can provide secondary power, that is a plus.
Disks HA storage should be able to tolerate a disk failure and continue to meet your needs.
Storage Network Hardware Creating a highly available hardware solution usually involves removing all the single points of failure, including the storage network components such as HBAs or network adapters.
Storage Spaces This new storage virtualization feature introduced in Windows Server 2012 allows you to use USB, Fiber Channel, iSCSI, SAS, and SATA attached disks to create a virtual disk that can span all of them. In Windows Server 2012 R2, when you create these virtual disks they use mirroring or parity for protection, which allows for a disk failure without losing your data. The important part to understand is that this is best utilized by spanning your creation of storage pools across heterogeneous disk types.
Multipath Input/Output Multipath Input/Output (MPIO) is a Windows feature that allows your Fiber Channel and iSCSI storage to be accessible via multiple pathways in order for a client like Hyper-V to have HA as it accesses your storage solution. By having multiple paths, MPIO sees both storage locations as a single device, and it natively supports failover. MPIO does all of the work for you; if something goes offline, it will handle the immediate rerouting over the other connection.
Network Teaming and Fault Tolerance If you are looking to connect Hyper-V hosts to storage, it is highly recommended that you set up the host servers with multiple network cards and pathways. You always want to leverage redundancy with network teaming on any of your clustered resources, and when you use SMB/SMB Multichannel it will give you the best available bandwidth.

Storage Spaces

Storage Spaces is considered one of the great new features of Windows Server 2012 and Server 2012 R2. The main advantage is the ability to manage a bunch of disks as a single virtual disk drive. The virtual disk type dictates how data is written across the physical disks.

Currently there are three choices:

Simple As the name implies, this is a simple stripe set without parity. Consider this closer to a RAID 0. A simple layout provides no redundancy, so any disk failure can cause problems with data access. It is used primarily to increase throughput and maximize capacity.
Mirror This is a RAID 1 configuration that increases reliability by using two disks (for example), which allows one disk to fail without causing interruption. The major drawback is the loss of disk space because one of the disks is used as a copy (mirror) of the other.
Parity This is similar to a RAID 5 configuration; it is a striped set of data across disks with distributed parity. By striping data and information across multiple disks, it increases the reliability. As with RAID 5, you need a minimum of three disks.

If you are unfamiliar with disk RAID, I recommend you look at the following site for full information on the background of RAID and RAID levels: http://en.wikipedia.org/wiki/RAID.

Storage Spaces has three basic components:

Physical Disks If you are leveraging physical disks for your storage pools, here are the requirements:
Storage Pool A storage pool consists of one or more physical disks that you are using to create a virtual disk. An unformatted blank disk can be added into a storage pool at any time.
Virtual Disks These are considered the same as physical disks from an application or user perspective. The benefit is that virtual disks are far more flexible, and they have the resiliency of physical disks with built-in mirroring.

Storage Spaces offers different types of provisioning options that determine how much space is being used and how to allocate to the virtual disks. You can define the performance type and what you are willing to utilize to achieve it. Many design factors are involved in an increase or decrease in performance, such as disk speed, size, and type. Having a great plan and design will increase the performance of your system.

The provisioning type is determined by how space is allocated to the disk and your performance choices:

Thin Thin provisioning allows you to overallocate space while using only the amount of space your files need. It provides flexibility but does reduce performance since the storage has to move and pull disk space from the pool as the size increases.
Fixed Fixed is reserved targeted space. For example, if you define 40 GB, that is the maximum that the virtual disk gets. It cannot be larger than the disk space of the pool. You can extend the fixed size by adding more disks to your storage pool, and the only performance impact you will see is if you add disks and extend an already defined disk. It takes a little resource time to spin all that up.

Clustering Inside Virtual Machines

When you develop your clustering strategy for printers, file shares, or Hyper-V, you are giving the infrastructure a highly available solution, one that can grow and you can move your critical systems into. To the support of Windows Server 2012 R2 and guest-based clustering, you are adding the next level of HA and increasing the speed of recovery from a system failure. It’s not always the hardware that requires high availability; in many cases the software is causing a problem, resulting from memory leaks, software updates, or configuration changes. When you run your cluster-aware applications as virtual workloads, the failover time and the integration with many of the new continuous availability workloads become more enticing because consumers experience no interruption.

To understand the workloads that are capable of this type of clustering, you need to remember the golden rule: If a workload is made for clustering or recommended to cluster for HA or disaster recovery (DR) purposes, it can work in a guest cluster. Microsoft has made the Windows Server 2012 and Server 2012 R2 workloads aware of this virtual guest cluster, in such areas as these:

To use this technology you utilize a model enabled in Windows Server 2012 R2: a shared VHDX. Windows Server 2012 introduced the VHDX format, which addressed the storage, data protection, and performance needs on large disks. When you create virtual guest clusters, you are attaching a VHDX to a SCSI controller for your VM, enabling sharing to create a connection, and presenting the VHDX as an SAS drive. So you are given the option of building out an infrastructure that doesn’t necessarily require iSCSI, Fibre Channel SAN, or block-level storage, but you are getting to use SMB 3.0.

Now that you understand some of the basic building blocks, you can take your knowledge of the shared storage and clustering capabilities of Windows Server 2012 R2 into the next section and dive into setup.

Setting Up a Cluster

In this section we will walk through the basic steps of setting up a host-based cluster. For the purpose of this example we will be creating a two-node cluster and configuring it for file shares. Clustering file shares is a great starting place to introduce you to managing a cluster. The requirements are very simple. We’ll take a basic need in any enterprise and provide immediate high availability.

To successfully set this up, you need to work through each of the following sections.

Cluster Configuration

The lab we are going to use for this example is very simple. We have two servers running Windows Server 2012 R2. The servers are named as follows:

Server 1 = Cluster1

Server 2 = Cluster2

The cluster for this example is named DemoCluster, and its IP address is 192.168.1.21.

To examine the basic options of clustering we’re going to focus on clustering file services, but we’ll spend more time going over how to set up the cluster service on two nodes, step by step.

When prepping to build out a similar example cluster, the steps should be fairly straightforward, and hopefully you will see the value in getting your organization set up and using cluster services. In regard to the quorum that we discussed previously, I have created a share on a separate server; you can utilize a file share as the quorum, as we discussed. The share will be located on the Active Directory domain controller for this example, BF1. The share \\BF1\#Cluster will be utilized for the witness.

The two servers have two physical NICs. Ideally you would have a minimum of three NICs in a production environment or six if possible. You want to separate the three types of network needs. If you have five or more NICs available, then you can team two NICs for the primary services. Remember, for every NIC you use, you should always use a static IP address. DHCP is supported with clustering, but it’s not ideal or advised in most scenarios. The following list is a typical role configuration for NICs:

NIC role 1: cluster management and storage—Do not set the default gateway.
NIC role 2: client traffic (for accessing VMs or apps)
  • Needs the default gateway
  • Needs DNS

Once you have set up the NICs and are ready to move on, the next step is taking the host names (rename the servers to something descriptive of your clusters) and joining them to Active Directory. As shown previously, the servers we are using in this example are named Cluster1 and Cluster2.

After you have joined these devices to an Active Directory domain, you need to make sure each cluster node has Remote Desktop and Remote Management installed, and since you are going to be creating a file server cluster, setting up the File Server role is required.

Storage

Before we set up the cluster itself, let’s do a quick review of the storage options of clusters. You have several choices, and since it’s a requirement, you need to figure out what type of storage solution you want to use. Typical options for shared storage are these:

We discussed each of these storage components previously in this chapter. One of the great benefits of the storage options with Windows Server 2012 R2 is that all of the storage solutions used today are supported, so you can leverage the hardware you already have. There’s no need to run off and change your storage infrastructure just yet. Windows Server 2012 R2 provides the option, if you haven’t invested in a specific storage solution, to build it out with SMB 3.0. As discussed earlier in the chapter, SMB 3.0 was first introduced in Windows Server 2012 with Scale-Out File Servers and Hyper-V in mind, and it was the start of what is now considered continuous availability. You can read up on SMB 3.0 and see ways to leverage it in your organization at the following link: http://tinyurl.com/c11SMB30.

Adding the First Node in Your Cluster

One of the first things you need to do is install the Failover Clustering feature, and you have a couple options for doing this. As noted many times in this book, you can use PowerShell to install it. You can find information on installing any Windows feature with PowerShell at the following link: http://tinyurl.com/c11ClusterInstall. For this feature, enter the following command from an administrative PowerShell console:

Install-WindowsFeature -Name Failover-Clustering

You can include the -IncludeManagmentTools switch at the end of the command if you have not installed the administrative tools already.

For this example we will be going through Server Manager and adding the File Server role and the Failover Clustering feature. Follow the basic prompts; since the wizard is pretty basic and doesn’t ask you any questions when you add the feature, we will jump right to configuring your cluster. If you need assistance in adding roles and features, please see Chapter 7, “Active Directory in windows Server 2012 R2.”

Once the Failover Clustering feature is installed, it will appear on the Apps section of your Start screen, as shown in Figure 11.3.

Figure 11.3 Apps section of the Start screen

image

Double-click Failover Cluster Manager to open it. As you can see in Figure 11.4, all of the major components you need to create, validate, and manage your cluster are listed in a single window.

Figure 11.4 Failover Cluster Manager

image

Take some time to examine the console; expand the More Information section and find some of the basic topics on the web that are updated in the console. Since the web links in the console are updated frequently, you can find links to any major changes or updates there. Exploring the cluster console is very important if you have never done this before.

The next step is to create a new cluster; you do this by following these steps:

1. Select Create Cluster by either right-clicking Failover Cluster Manager from the column on the left or selecting Create Cluster from the Actions menu, as shown in Figure 11.5.

Figure 11.5 Choose Create Cluster.

image
You will see the Before You Begin screen, and it will give you the basics you need to complete this process.
2. Click Next.
You now need to enter the name of the server you want to be a part of this cluster.
3. Enter Cluster1 as the name of the server (as shown in Figure 11.6), or you can browse and select the server you are using for your setup.

Figure 11.6 Adding a server to the cluster

image
4. Click Next.
When you select the server, you will be prompted with a validation screen; this is to check that the server meets all the requirements.
5. You can select No, but it is always recommended to select Yes and let the validation run.
The cluster-validation process will walk you through a few steps starting with the Before You Begin screen.
Next is the testing option you want to run against this server cluster. Running all tests is the default and is recommended at minimum for your first node in the cluster.
6. Click Next to accept the default.
7. Confirm your information about which server to test, and click Next to run the validation.
Figure 11.7 shows the Validate a Configuration Wizard running on a large list of components required to have a successful cluster.

Figure 11.7 Validate a Configuration Wizard

image
8. Once the validation has completed, quickly review the Summary screen of the wizard, as shown in Figure 11.8.

Figure 11.8 Validation Report

image
9. Optionally, you can click the View Report button to open a web form that lets you further examine the items.
Figure 11.9 shows the Inventory screen of this report. As you can see, the items under Name are hyperlinks that will take you to detailed information about items in the report.

Figure 11.9 Validation Report Inventory screen

image
10. Now that you have added the server for nomination into the cluster and gone through the validation process, you need to give your cluster a name and IP address. We are using the name DemoCluster, as shown in Figure 11.10. You will use the cluster name to connect to and administer the cluster and nodes referenced by this central IP address.

Figure 11.10 Entering a cluster name

image
11. When prompted, confirm the cluster; the wizard will add the brand-new cluster.
12. Once you see the Summary page, click Finish. The Failover Cluster Manager screen will list the newly created cluster with one node, as shown in Figure 11.11.

Figure 11.11 Creating a cluster name

image
13. Now expand DemoCluster on the left side of the screen and select Nodes.
In Figure 11.12 you can see that Cluster1 has been added as a node and is available.

Figure 11.12 Viewing newly added nodes

image
14. To add a role to the cluster, click the Configure Role link on the Summary of Cluster page, as shown in Figure 11.13. The High Availability Wizard will appear.

Figure 11.13 Starting the High Availability Wizard

image

Options for Roles
Each of the roles that you select will require different options and have its own set of preconditions. I recommend that if you are going to start looking at these different workloads, you review all the information at http://blogs.msdn.com/b/clustering/. This is the primary site for the Microsoft Cluster team, and it has a ton of resources on each type of cluster workload you could want to set up.

15. Click Next to bypass the Before You Begin screen, so you can select the specific role to make highly available.
16. In the High Availability Wizard, select File Server, as shown in Figure 11.14, and click Next.

Figure 11.14 Selecting a role

image
17. Choose the type of file server you want to build out. As shown in Figure 11.15, the options are these:

Figure 11.15 File Server Type screen

image
The next few steps are similar to setting up your cluster. You will start by creating a name that the clients will use to access this file cluster. For our example, we will use DemoFile.
18. Enter the IP address you want the file cluster to be associated with. In our example we will use 192.1681.22.
19. Select the storage you are using for your cluster, click Next, and confirm your configuration.
Once you have gone through the remaining steps and reviewed the summary, the highly available file server will appear under Roles in your Failover Cluster Manager screen, as shown in Figure 11.16.

Figure 11.16 File Server clustered role

image

Adding a Second Node to the Cluster

One thing that many people skip before adding the second node in the cluster is validating that the primary node is active and working. So make sure you check through the following before moving onto this next step.

1. Look at the Cluster1 server and make sure it isn’t showing any errors or doesn’t have a red check mark through it.
2. Validate your storage and that you can confirm connections to the servers.
3. Validate your networking and that all connections are there and showing as connected.
4. Rerun the validation tests and get a report to review all options.
Some warnings may appear, and you should take the time to evaluate each one and make sure it isn’t going to affect you as you add secondary (or more) nodes to this cluster. Each error or warning the report provides will give you links and more detailed information so that you can successfully take care of any issue that is there.

Now onto adding the additional node to your cluster: the important part that may seem obvious is that now you are providing your host services failover. It is exciting to have your first cluster up and running, but without additional nodes it’s just a lonely service running on your server. The best place to start is the Failover Cluster Management console; in the Configure section you will see the option Add Node. This is shown in Figure 11.17.

Figure 11.17 Add Node option

image
1. Select Add Node and the wizard will start.
2. Enter the server name; for our example it is CLUSTER2.
You will be prompted again for validation, which will start the validation wizard.
3. For at least the first two nodes in a cluster you should choose “Run all tests.”
Once the validation is completed, you will get another Validation Report, similar to the one shown in Figure 11.9.
4. Verify that everything is in an acceptable state and finalize the additional node.
5. Finally, look under the Failover Cluster Manager\DemoCluster\Nodes to see the two cluster nodes you have added.
As you can see in Figure 11.18, both of our nodes are showing a status of Up.

Figure 11.18 Cluster nodes status

image

Now that you have both nodes set up, your cluster can provide failover to any of the workloads you wish to support.

You may have noticed in Figure 11.18 two other columns next to Status:

Windows Server 2012 R2 provides an advanced quorum configuration option where you can add or evict quorum votes node by node. Out of the box all nodes are assigned a vote. You may decide to remove votes from specific nodes to help with disaster recovery solutions. The most common situation is when you have a geocluster and you want to remove the votes from your recovery site; if you consider doing this, refer to Microsoft’s guide on quorum considerations for DR found here: http://tinyurl.com/c11ClusterDR.

Setting up a cluster infrastructure is usually not complex, although it can be depending on your needs and the services you wish to provide with your cluster. The more services, nodes, and sites you add, the more complex the setup becomes, but they are all worth it. The cluster hosts and guest capabilities will make all of your organization’s resources highly available, scalable, and recoverable in case of a site failure.

In the next section we will spend some time on guest clustering, why you might want to add it, and how Windows Server 2012 R2 makes things even better!

Setting Up a Guest-based Cluster

As we have mentioned a few times in this section, guest-based clustering means extending the cluster services to inside the virtual machine layer. The idea is to allow your VMs to have high-availability options inside the VM, so you can have an HA application or service sitting on top of a clustered set of hosts. You are now moving into an extremely highly available datacenter, giving all the applications physical or virtual continuous availability.

What can you cluster in your virtual guests? Anything that is supported by Windows clustering will work. You can include all of your major services and common Windows Server workloads such as these:

In Windows Server 2008 R2, guest clusters supported the standard OS health detection, application health, and application mobility options. At that point there was no support for VM mobility, so in case of a failover you would have to migrate the VM to another host and spin it up. Windows Server 2012 made great moves in recovery so that guest-level HA recovery is now possible. The clustered service will reboot the VMs if needed, and at the host level if recovery is necessary, the VM will fail over to another node.

Basically, the Role Health Service will detect a failure and automatically recover by moving the VM role to a different VM to allow the OS or applications to update. Now you can connect your VMs to all different types of storage, so you can connect to a SAN for shared storage via Fiber Channel with virtual fiber adapters.

As the health services moves into the monitoring stages, it will accept a first failure, and the applications will move to other nodes. A second or third failure will cause the cluster host to shut down and restart the VM. Configuring this is very simple and requires only that you look at the clustered service properties, set the second and third failures, and set up your application health monitors through the clustered service.

Setting up your guest-based cluster is similar to setting up a host-based cluster in that the components have the same requirements except that these can be virtual. Here are the considerations:

1. Build out a minimum of two virtual machines.
2. Create two virtual network switches based on your requirements.
If you need to access additional resources, you will need to create additional networks that are specifically external virtual switches.
3. Connect the associated storage solution to your VMs, such as your virtual Fiber Channel, iSCSI, or SMB storage.
4. Install Windows Server 2012 R2 on your virtual machine.
5. Install the Failover Clustering feature on each of the VMs in that cluster.
6. Connect your network and storage to the VMs.
7. Run the Validate Cluster Configuration Wizard and make sure you get a positive report.

Configuring your guest-based clusters is essentially the same as configuring your host cluster; you want to connect and configure all the same settings with the exception of the Hyper-V role, because these are all Hyper-V guests. If you are feeling more knowledgeable now that you have gone through this introduction on shared storage and clustering, we highly recommend looking at the Clustering and High-Availability blog on TechNet at http://blogs.msdn.com/b/clustering/.

The Bottom Line

Use the available storage options for clustering. With the release of Windows Server 2012 R2, many more storage options are available for your clustering and high-availability solutions.
Master It You want to build out a JBOD solution and need the most effective type of disk capacity. The failover doesn’t matter as much as space and speed. What technology should you consider?
Use quorums to help in clustering. A quorum is “the minimum number of members required to be present at an assembly or meeting before it can validly proceed to transact business.” This definition holds true for the use of a quorum in clustering.
Master it You have chosen to deploy an odd-numbered cluster with five nodes, and you will use one node as a file share witness for quorum. Once the cluster is up and running, you host an application. But after the install the application has a major memory leak and starts seizing up the servers and shutting them down. How many nodes will go down before the cluster is completely offline?
Build out host and guest clusters. Clustering is a mix of software and hardware and can be hosted on physical servers or virtual machines. Windows Server 2012 R2 has the components and tools built in to help you deploy your clusters, including a handy prerequisites wizard to validate that you have all the components and configurations in place to successfully set up a cluster.
Master it When planning your host- and guest-based clusters, excluding the Hyper-V role, what is the difference between the two in setting up a cluster?