Introduction

Correctly configuring your Hyper-V storage is extremely important and can help or hinder performance, stability, and other factors in your Hyper-V virtualized environment. In addition, there is a particular type of storage that you want to be familiar with when running Hyper-V virtual machines. It is called Cluster Shared Volumes (CSVs). Let’s look at Hyper-V Cluster Shared Volumes for beginners and see what they are and how you use them.

Table of Contents

  1. What are Cluster Shared Volumes (CSVs)?
  2. Cluster Shared Volume architecture and use cases
  3. Cluster Shared Volumes I/O synchronization and redirection
  4. Cluster Shared Volume (CSV) requirements
  5. Creating a Cluster Shared Volume (CSV)
  6. Cluster Shared Volume (CSV) FAQs
  7. Wrapping up

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

What are Cluster Shared Volumes (CSVs)?

First, what are Cluster Shared Volumes? Historically, we are used to the common way of sharing storage between clusters with NTFS LUNs. If we go back to Windows Server 2008 Hyper-V, if you remember, you couldn’t store multiple virtual machines on the same storage LUN and also multiple Hyper-V hosts can’t have simultaneous access to those volumes.

It is not desirable or feasible for enterprise virtualization to run workloads in high-availability configurations. As a result, Microsoft released Cluster Shared Volumes (CSVs) in Windows Server 2008 R2 that changed how storage is provisioned in a Hyper-V cluster.
Cluster Shared Volumes allow multiple Hyper-V hosts to access the same storage simultaneously, with read-write access. In addition, it enables multiple hosts to have ownership over multiple virtual machines running on the same Hyper-V backend storage. An added benefit of Cluster Shared Volumes is they allow much quicker failover between Hyper-V hosts.

The failover process with Cluster Shared Volumes does not require transferring ownership from one host to another and the additional tasks of dismounting and remounting drives between them. As you can imagine, CSVs dramatically simplify configuring Hyper-V storage for virtual machines between multiple Hyper-V hosts. In addition, the reduced complexity of managing Hyper-V storage significantly reduces the total cost of ownership (TCO) for organizations managing Hyper-V clusters.

Download Banner

Cluster Shared Volume architecture and use cases

The architecture of Cluster Shared Volumes is interesting. CSV is a general-purpose clustered file system that sits above the layer of NTFS or ReFS on disk. It provides many use cases for workloads running in the enterprise. These use cases include:

  • Hyper-V virtual machine storage for simultaneous access from Hyper-V hosts
  • Scale-out file shares running on Scale-Out File Server configured in a clustered role in Windows Failover Cluster Services
  • SQL Server Failover Cluster instances. You must be running SQL Server 2014 and higher
  • Microsoft Distributed Transaction Control (MSDTC)

Cluster Shared Volumes I/O synchronization and redirection

All of the nodes in a CSV-enabled cluster take part in I/O synchronization. With I/O synchronization, all nodes can communicate directly with the underlying storage. However, a single node “owns” the physical disk resource.

The disk owner is referred to as the Coordinator node. The ownership process is handled automatically. Starting from Windows Server 2012 R2, CSV ownership is automatically balanced between the nodes in a cluster. The cluster also rebalances ownership between nodes.

The CSV changes are synchronized between the nodes in the cluster, including the coordinator node. The CSV synchronization is taken care of with a metadata exchange between the nodes using SMB 3.0.

Another characteristic you want to pay attention to with Cluster Shared Volumes is I/O redirection. The I/O redirection functionality prevents failures related to connectivity issues or other storage-level operations. For example, if connectivity from a single node is lost to the underlying CSV, the node redirects the I/O through the Coordinator node for the specific CSV.

If communication with the Coordinator node is lost, all disk I/O operations are temporarily queued until a new host is designated the Coordinator node for the CSV. There is also a configuration that you want to pay attention to related to the ReFS file system.

While ReFS provides many benefits, there is a major downside to using ReFS as the on-disk format for your CSV volumes. When the CSV disk is provisioned with ReFS, it is configured in Redirected Mode for all disk operations. With Redirected Mode enforced when using ReFS, you will see severe performance penalties running in this configuration.

Cluster Shared Volume (CSV) requirements

There are a few requirements with Cluster Shared Volumes of which to be aware. These include:

  • NTFS is the recommended file format for CSV volumes, as there are severe performance penalties with ReFS
  • A CSV volume cannot serve as a quorum drive
  • After adding a CSV, it is designated in the CSVFS format
  • You cannot use a disk for a CSV volume that has been formatted with FAT or FAT32
  • Each path of the CSV volume appears to be on the system drive of the node under the \ClusterStorage folder

Creating a Cluster Shared Volume (CSV)

Creating a new Cluster Shared Volume is very straightforward in Windows Server Failover Cluster. There are only a few steps involved. In the walkthrough below, I have created a simple two-node Windows Server Failover Cluster with two shared disks provisioned.

After creating the cluster, I ran through the Add Disks to Cluster wizard and added the second disk as cluster storage.

Cluster-Shared-Volumes

Adding disks to Hyper-V for Cluster Shared Volumes

The storage is listed as Available storage. However, as mentioned earlier, you can’t use the disk witness (quorum disk) as a CSV.

Cluster-Shared-Volumes

The new disk is added as available storage

After adding the new cluster storage, right-click the disk and select Add to Cluster Shared Volumes.

Cluster-Shared-Volumes

Adding a disk to Cluster Shared Volumes

After adding the disk to cluster shared volumes, the disk will be listed under the Assigned To column as Cluster Shared Volume. It means the disk is now designated as a Cluster Shared Volume.

Cluster Shared Volume (CSV) FAQs

What are Cluster Shared Volumes?

Cluster Shared Volumes are a new type of storage introduced in Windows Server 2008 R2 that allows simultaneous access from multiple Hyper-V hosts to shared cluster storage. However, the solution is not specific to Hyper-V and can be used for other Cluster use cases, such as Scale-Out File Shares, SQL Clusters, etc.

Can you use any disk as a Cluster Shared Volume?

There are specific requirements for CSV storage, such as the disk cannot be used as a quorum disk. There are also file formatting restrictions. For example, you cannot use a disk formatted with FAT or FAT32.

Is the Resilient File System recommended for Cluster Shared Volumes?

While you can use ReFS for CSVs, it is not recommended. It is because when using ReFS with CSVs, all I/O is in redirected I/O mode.

Wrapping up

Cluster Shared Volumes (CSVs) are a great way to provision storage for Hyper-V virtual machine workloads and offer many benefits. However, there are caveats to using CSVs that admins need to be aware of that can affect usability and performance. Understanding the basics of CSV storage allows Hyper-V beginners to use this new storage type effectively and understand its limitations.

Rate this post