- Local password manager with Bitwarden unified - Mon, Feb 6 2023
- Prepare AD synchronization with Azure Active Directory using IdFix - Tue, Jan 31 2023
- Manage Windows security and optimization features with Microsoft’s free PC Manager - Mon, Jan 23 2023
Microsoft's Hyper-V virtualization platform has certainly matured with each new release of Windows Server. Now, with Windows Server 2019, Hyper-V features and functionality are some of the best available for enterprise virtualization. The technology that helped to establish Hyper-V as a viable solution for virtualization and that allows Hyper-V to effectively manage and access shared storage is Cluster Shared Volumes (CSV).
Cluster Shared Volumes provide the underlying technology to simplify storage configuration and access for Hyper-V nodes in a Windows Server Failover Cluster. As with any technology, there are best practices for using Cluster Shared Volumes that avoid problems and enable the best stability and performance.
Let's look at Windows Server 2019 Cluster Shared Volumes best practices and note the key areas to consider in using CSVs with Hyper-V in your environment.
What are CSVs?
Before exploring the best practices associated with CSVs, it is important to understand exactly what they are and what challenges they solve for Hyper-V administrators. How do CSVs simplify storage configuration and access for Hyper-V hosts in a WSFC?
With Windows Server 2008 Hyper-V, you couldn't store multiple virtual machines running on multiple WSFC Hyper-V hosts on a single storage volume such that those Hyper-V hosts could access those virtual machines simultaneously. However, many other hypervisors were able to do this. Microsoft realized it needed an effective way for multiple Hyper-V hosts to access a single storage volume, with read/write access to that storage volume so that it could run virtual machines.
Things changed with the release of Windows Server 2008 R2, when CSVs were introduced. CSVs allow multiple Hyper-V nodes in a WSFC to access the same storage LUN housing multiple virtual machines simultaneously.
With CSV, clustered roles can fail over quickly from one Hyper-V host to another without requiring a change in drive ownership or dismounting and remounting a drive. CSV helps to simplify management and eliminates the need to provision multiple LUNs in a Windows Server Failover Cluster for this purpose.
Now, with the CSV configuration, Hyper-V administrators can provision a single LUN for storing virtual machines if they wish and each host can run a subset of virtual machines that reside on the CSV. This helps to eliminate the unnecessary complexity that would be required otherwise.
Creating a CSV in WSFC
One of the great things about CSV is the ease with which they can be configured. CSVs are easily created with a minor step in the Failover Cluster Manager console. To add a disk/LUN to CSVs, navigate to your Hyper-V cluster > Disks > right-click your disk > Add to Cluster Shared Volumes.
After clicking the Add to Cluster Shared Volumes option, you will quickly see the Assigned To column to change the storage Cluster Shared Volume.
This process is easily accomplished in PowerShell as well:
Add-ClusterSharedVolume –Name "Cluster Disk 2"
Now that we understand what CSVs are and how they are created in Windows Server 2019, let's take a look at Windows Server 2019 CSV best practices to enable optimal stability, performance, and usability. The following best practices are not an all-encompassing list; however, they are some of the more important areas to think about with CSVs. Note the following:
- Run CSVs on the latest Windows Server operating system
- Use multiple networks and multiple network adapters
- Verify network adapter properties
- Consider your LUN arrangement, number, and size for CSV
- Pay attention to I/O Redirection with CSV
Use the latest Windows Server version with CSV
With each release of the Windows Server operating system, Microsoft improves the underlying platform that powers CSVs and other related technologies such as Hyper-V. At the time of this writing, Windows Server 2019 offers the most current, powerful features related to Hyper-V and CSV technology.
Using the latest version of Windows Server ensures the best performance and the availability of the most features. This is a basic best practice with CSV.
Use multiple networks and multiple network adapters
As with most storage technologies, CSVs are extremely sensitive to your network traffic and network configurations. One best practice with CSVs is use multiple networks and multiple network adapters. This provides several key advantages, outlined below.
Running multiple network adapters and/or multiple cluster networks provides fault tolerance from a network perspective for your CSVs. The last thing you want to have with a CSV is a single point of failure with the network adapters or cluster networks. If you have a failure of one physical adapter or network, you want to have multiples so you have another path for the traffic to traverse.
Additionally, teaming your network adapters helps to ensure proper bandwidth and performance of your cluster networks and helps to eliminate any bottlenecks that might develop.
Verify network adapter properties
Make sure you pay attention to your network adapter properties of the adapters that carry cluster traffic, including CSV. There are a couple of settings it is important to enable on your network adapters. These include:
- Client for Microsoft Networks
- File and Printer Sharing for Microsoft Networks
These two network adapter properties support the use of SMB 3.0, which is used by default to carry CSV traffic between the failover cluster nodes.
Consider your LUN Arrangement, number, and size for CSV
There are a few recommendations that Microsoft makes with regard to the LUN arrangement, number, and size. It is important to consult with your storage vendor to determine the best number of LUNs, partitions, and CSV volumes to be configured.
An additional consideration for CSV volumes intended to house virtual machines for Hyper-V is the number of VMs you will house on a single CSV volume. There is no hard limit from Microsoft's perspective on the number of VMs that can reside on a CSV. However, you will need to consider the I/O requirements of the VMs housed on a CSV and whether the volume can support the storage demands of all VMs across the board.
The size requirements of the LUN used for the CSV need to be considered as well. Depending on the requirements of the VMs housed on the CSV, the LUN needs to be sized according to the space requirements of the virtual machines housed on the CSV.
Pay attention to I/O redirection with CSV
CSVs use a process called I/O Redirection. The I/O Redirection feature helps to ensure that storage connectivity failures do not prevent a given node from communicating with the underlying storage. When a storage failure is detected, the host redirects the I/O through a cluster network to the coordinator node where the disk is mounted; this allows the particular host to continue communicating with storage.
With CSV volumes, the coordinator node owns the physical disk resources that are associated with the LUN. When changes are made to the CSV, the coordinator node synchronizes metadata with each of the physical hosts accessing the CSV.
Hyper-V virtual machines are a good example of how changes on a CSV are synchronized. When a Hyper-V VM is started, created, migrated, or deleted, this status is synchronized with each of the physical Hyper-V hosts accessing the CSV volume the VM resides on.
There is an extremely important point to note when using CSVs and ReFS. It is always recommended to use NTFS with CSV volumes. When you use ReFS with CSV volumes, the CSV volume will always run in file system redirection mode, which means that all the I/O operations are sent through the coordinator node. This can lead to severe performance impacts.
ReFS is only recommended for use with Storage Spaces Direct (S2D). With S2D, RDMA network adapters are a requirement. RDMA network adapters offset the performance penalty of I/O redirection.
The introduction of CSV was a huge milestone for Hyper-V storage implementation. The CSV allows multiple Windows Server Failover Cluster hosts to access the same volume and own resources on the volume. This is especially important for WSFC that host the Hyper-V role with Hyper-V virtual machines.
Subscribe to 4sysops newsletter!
Following key best practices while using CSVs with WSFCs is essential to maintaining the stability, performance and usability of CSV implementations.