To totally unlock this section you need to Log-in
Login
CSV (Cluster Shared Volumes) is a feature in Windows Server family in which shared disks are concurrently accessible to all nodes within a failover cluster. The feature was first introduced in Windows Server 2008 R2 as a way to simplify storage with clustered Hyper-V virtual machines (VMs), but this is not limited to Hyper-V applications.
In a cluster without CSV, only one node can access a disk LUN at a time (or on a Storage Spaces Direct cluster), so multiple disks are required for migration (with a minimum but present downtime during this migration).
With Cluster Shared Volumes, storage is simplified because multiple nodes can access the same disk at once and fewer overall disks are needed. CSV can also reduce potential disconnection time when performing a live migration of VMs in an Hyper-V environment.
Cluster Shared Volumes offers resiliency benefits by creating multiple connections between nodes and the shared disk, meaning that if one part of a network goes down, communication can be accomplished through another part of the network.
This is quite useful using SQL Server Failover Cluster over a Windows Server Failover Clustering.
CSV requires NTFS, but there are no hardware requirements beyond what is needed for a failover cluster.
Summing up, typically, when looking at traditional shared storage in a standard Windows Server cluster, when cluster roles failover between hosts in the cluster, drive ownership is changed, and the volume is dismounted and remounted.
This is undesirable when thinking about virtual machines in a Hyper-V cluster as you want multiple hosts to be the compute/memory for VMs that potentially reside on a single shared storage volume.
So, with a clustered shared volume, the roles can fail over quickly from one to another without requiring this change in drive ownership, dismounting, remounting storage that is required with a tradition shared volume.
Steps to Create a Clustered Shared Volumes
Now let’s take a look at how to create the CSV both in Windows Failover Cluster administrator GUI as well as in PowerShell.
Let’s first look at creating CSV’s in the GUI Windows Failover Cluster Manager console. When we expand Storage >> Disks we see the Available storage presented to our Windows Server 2016 Hyper-V cluster.
Note the below Assigned To status of the VM Storage volume is Available Storage.
Also, when we look at the properties of the VM Storage volume we see what looks to be normal Disk Properties presented as the owner node, H1 , is the owner of this disk.
If we try to create a virtual machine on the volume as it is configured as simply available storage, we receive an error when the virtual machine is created:
To add this to a Clustered Shared Volume, we simply right click on the volume and select the Add to Cluster Shared Volume option.
Now we see the Assigned To status change to Cluster Shared Volume.
If we look at the properties of the VM Storage volume now that it has been converted to a Clustered Shared Volume, we see the below. The volume has been now presented as a ClusterStorage mount.
Now, when we provision a new virtual machine on the volume as it is configured as a clustered shared volume, the new virtual machine creation is successful. Also, it passes the High Availability configuration.
Creating Clustered Shared Volumes using PowerShell
Using PowerShell, we can easily create the Cluster Shared Volumes for our Hyper-V cluster. If you want or need rename a particular cluster disk resource that will be used for VM storage, that can be done using the following commandlet. Below, the commandlet assumes the cluster disk that you want to use for CSV is named “Cluster Disk 1”.
(Get-ClusterResource | ?{$_.Name -eq “Cluster Disk 1”}).name = “VM Storage”
We can add a particular cluster disk to the Cluster Shared Volume using the following command:
Get-ClusterResource -Name “VM Storage”| Add-ClusterSharedVolume
In PowerShell, to view configured Cluster Shared Volumes, you can use the Get-ClusterSharedVolume command:
Clustered Shared Volumes are an integral and important part of the storage configuration for a Windows Server 2016 Hyper-V cluster. In using CSV storage, the Hyper-V hosts can access the CSV storage simultaneously without having to dismount and remount the virtual machine storage (or storage dedicated to other applications).
Shared storage that all hosts can access simultaneously is a requirement for having a redundant and highly available Hyper-V architecture.
Also, the storage resiliency that is new to Windows Server 2016 provides a compelling benefit to Cluster Shared Volumes. Failures that are detected are mitigated by pausing virtual machines which saves the state of the VM and returns the state once storage connectivity is restored.
Creating the CSV volumes are extremely easy either in the Windows Server Failover Cluster console or with PowerShell. Be sure to use this new type of cluster volume with any Hyper-V or other applications cluster implementations.
Network Configuration Considerations
Consider the following when you configure the networks that support CSV:
- Multiple networks and multiple network adapters: to enable fault tolerance in the event of a network failure, we recommend that multiple cluster networks carry CSV traffic or that you configure teamed network adapters.
- If the cluster nodes are connected to networks that should not be used by the cluster, you should disable them. For example, we recommend that you disable iSCSI networks for cluster use to prevent CSV traffic on those networks. To disable a network, in Failover Cluster Manager, select Networks, select the network, select the Properties action, and then select Do not allow cluster network communication on this network. Alternatively, you can configure the Role property of the network by using the Get-ClusterNetwork as Windows PowerShell cmdlet.
- Network adapter properties: in the properties for all adapters that carry cluster communication, make sure that the following settings are enabled:
- Client for Microsoft Networks and File and Printer Sharing for Microsoft Networks: these settings support Server Message Block (SMB) 3.0, which is used by default to carry CSV traffic between nodes. To enable SMB, also ensure that the Server service and the Workstation service are running and that they are configured to start automatically on each cluster node.
- In Windows Server 2012 R2, there are multiple Server service instances per failover cluster node. There is the default instance that handles incoming traffic from SMB clients that access regular file shares, and a second CSV instance that handles only inter-node CSV traffic. Also, if the Server service on a node becomes unhealthy, CSV ownership automatically transitions to another node.
- SMB 3.0 includes the SMB Multichannel and SMB Direct features, which enable CSV traffic to stream across multiple networks in the cluster and to leverage network adapters that support Remote Direct Memory Access (RDMA). By default, SMB Multichannel is used for CSV traffic.