October 13, 2021
All You Need to Know About a Scale-Out File Server for Microsoft Hyper-V
Windows Server is a powerful operating system with many features that is installed on servers. One of the most popular features, or server roles, in Windows Server is the file server. There are also clustering features to deploy clusters for high workloads and high availability. Microsoft Hyper-V is a Type 1 hypervisor co-existing with Windows Server to run virtual machines. One of these evolving features is a Scale-Out File Server (SOFS). This blog post explains what the Scale-Out File Server is and how SOFS can be used with Hyper-V.
Before We Start
To avoid data loss and minimize downtime, back up your Hyper-V VM data using NAKIVO Backup & Replication. Here’s how it works:
- Install the Free Edition of NAKIVO Backup & Replication.
- Protect up to 10 VMs for free for one whole year.
- Instantly recover entire VMs or Microsoft app objects when you need to.
What is a Scale-Out File Server?
Before talking about Scale-Out File Servers, let’s answer three basic questions about file servers.
What is a file server? A file server is a server in a computer network that is used to store files and share these files with other users, who are clients in the network. Shared files can be used by applications running on other computers connected to the network. A file server can be used to store data backups.
How to set up a file server? A file server can be set up on different operating systems including Windows, Linux, and FreeBSD. As this article focuses on Windows and Hyper-V, I will examine the Windows Server operating system. In order to set up a file server with the simplest configuration in Windows Server, edit the folder properties or enable the File Server role in Server Manager. PowerShell can also be used at this point.
What does the File Server role do? A file server is used to store files on a server and share these files with users (who have permission to access the shared files). The file server can be set up by configuring users and groups, opening sharing options of a folder and selecting the needed users/groups, and setting sharing permissions and file system permissions for them. The SMB protocol is used in this case. The File Server role (in Windows Server Roles and Features), on the other hand, provides a set of advanced features such as DFS (Distributed File System), DFS replication, and NFS. When installing a File Server role, you can use Server Manager to manage file shares.
What is a Scale-Out File Server? A Scale-Out File Server is the extension of the file server role. The Scale-Out File Server is based on clustering technologies to provide resilient and highly available storage for different purposes. It provides file-based shared storage suitable for storing virtual disk files of VMs running on a Hyper-V host. A Scale-Out File Server can be considered a failover cluster configured with the File Server role. Using a Scale-Out File Server enables you to deploy scalable high available shared storage for different server applications.
Windows Server Failover Clustering is an enterprise-level feature that can be used to deploy a clustered file server and run Hyper-V machines. A Hyper-V cluster requires cluster shared volumes (CSV) that are based on a Scale-Out File Server. Hyper-V hosts must access SCV storage.
SOFS sharing enables you to share the same file or folder from multiple cluster nodes within the same cluster. If you add additional servers to a cluster, performance is increased and all computing resources can be utilized. SMB 3.0 is the new version of the SMB protocol that must be used for file sharing. SOFS is a feature introduced in Windows Server 2012, which was improved in subsequent versions and provides functionality to keep a file share online for general use, for applications, and for Hyper-V storage. Scale-Out File Server was significantly improved in Windows Server 2019.
Advantages of a Scale-Out File Server
Increased bandwidth. Storage traffic bandwidth is increased because VMs can be spread across multiple cluster nodes. When you add more nodes to a cluster, bandwidth and performance are increased in direct proportion. The maximum bandwidth of a SOFS is equal to the total bandwidth of all servers that are members of the cluster.
Active-active file shares. This enables VMs to reconnect to any cluster node if the node it was previously connected to goes offline. All cluster nodes can serve SMB requests of clients. This feature helps VMs to stay online in case of a failover.
CSV cache. Frequently accessed files are cached (copied to each cluster node locally). This scenario is useful if a Hyper-V VM reads the virtual disk file many times to increase performance. An example of this scenario is using VMs in a virtual desktop infrastructure (VDI).
Checkdisk (CHKDSK) zero downtime. CHKDSK is optimized to skip the offline stage for Cluster Shared Volumes and they can get online faster after failure. Needing less time for volume recovery can minimize downtime and ensure high availability.
Automatic rebalancing. This is a dynamic feature for clients connected to Scale-Out File Servers. Multiple VMs can use the same Hyper-V virtual disk and SOFS automatically distributes connections. Any cluster node can be used for connecting to SOFS and connections are distributed across cluster nodes. Tracking of SMB connections is available, and clients are redirected to the optimal node to access the needed volume and disk share.
Scalability. Multiple VMs can run on different SOFS nodes and use the same CSV to store VM files including virtual disks. This is progress compared to previous versions because, in Windows Server 2008, each Hyper-V VM in the cluster was required to use a dedicated CSV disk for each VM.
Here are the main requirements that must be met to deploy a Scale-Out File Server for Hyper-V:
- Hardware and software on each node must be identical
- Storage compatible with Windows Server Failover Cluster
- SMB 3.0
- Active Directory
- NTFS and ReFS file systems are supported
How Scale-Out File Server Works
Cluster Shared Volumes v2 (SCVv2) is needed to provide shared access to all shared folders for all users within a Scale-Out File Server on all the nodes of a cluster. The virtual disks of Hyper-V VMs are accessed with a UNC pathname, for example, \\server-name\share-name\folder-name\disk-name.vhdx. Since the release of CSVv2, these volumes can be used not only for Hyper-V but also for a Scale-Out File Server. Now you can create one or multiple CSV in a cluster, create continuously available file shares, and store Hyper-V VM files there.
A Scale-Out File Server provides a new approach to working with clients compared to traditional file server clusters. A Distributed Network Name is used, and storage IP addresses are not used. A new resource group of a Scale-Out File Server is run on one of the nodes within a cluster and is called a leader. Other nodes contain clones of resource groups. Clones are managed by a resource group leader. A leader manages the order of starting and stopping clones, as well as monitoring their state. A leader can be moved to any node of the cluster, for example, if a node is powered off. A leader is responsible for metadata-related operations with files. A group of SOFS resources is not powered off until at least one clone is available.
Note: Traditional clustered resources including a file server on Windows Server nodes use a Client Access Point. A Client Access Point (CAP) is a specialized point used to connect clients to a highly available server. This is a cluster resource that contains a network name and one or more unique IP addresses. CAP is registered in DNS (Domain Name System) and WINS (Windows Internet Service Name). A CAP can run only on one cluster node at the moment of time and one cluster node is available for client connections. Other cluster nodes don’t have access to resources because these resources are used by the current owner node or leader node of the client access point.
SOFS doesn’t use IP addresses for clustered resources but has Distributed Network Name (DNN), which uses the IP addresses of all cluster nodes. These IP addresses are registered in DNS.
DNN monitors the state of cluster nodes and updates DNS information:
- Every 24 hours or when DNN is started
- When an IP address changes
- When a node is deleted or added to a cluster
- When an IP address is added or deleted in a cluster network
DNS round-robin is used to distribute connections to cluster nodes. An SMB client gets a full list of IP addresses used in the cluster related to DNN. Then a client tries to connect by using the first eight addresses from the list in the appropriate order. Connection attempts are made with an interval of one second until the connection is established.
This is different from a traditional cluster because, in a traditional cluster, all clients connect to one node, and the Active-Passive connection type is used. If a Scale-Out File Server cluster is used, then client connections are distributed uniformly across all nodes of the cluster in the Active-Active mode.
SMB 3.0 ensures the continuous availability of shared folders for supported applications such as Microsoft SQL Server and Hyper-V due to specific SMB 3.0 features:
- SMB Multichannel
- SMB Transparent Failover
- SMB Direct (RDMA)
Clients using SMB 2.0 can connect to a cluster and file shares, but the transparent failover mechanism is not available for them.
SOFS can be based on two nodes in a cluster and extended to four or more nodes without impacting the functionality of the servers. A SOFS cluster can run with the Hyper-V cluster in the same cluster or in different clusters. Don’t deploy SOFS inside VMs running in the Hyper-V cluster.
Storage Space Direct allows you to run a Hyper-V failover cluster with a Scale-Out File Server on servers that have only direct-attached storage (DAS) and don’t have shared storage such as SAN (Storage Area Network) or NAS (Network Attached Storage). VHD files are shared with SOFS in this case. Cluster shared volumes and VHD virtual disks are mirrored on each disk array of all nodes within a cluster.
Infrastructure Scale-Out File Server is a role available in Windows Server 2019 that operates like the traditional SOFS but is developed especially to build a Hyper-V infrastructure without any other roles. SMB Transparent failover is available (Continuous Availability for SMB shares).
Cluster sets were also introduced in Windows Server 2019 with SOFS support. A cluster set is a collection of multiple failover clusters and is managed as a single logical unit. Using a single namespace to manage and access the cluster can be convenient.
When SOFS Should Not Be Used
Don’t use a Scale-Out File Server to share files when users or applications generate a large amount of metadata while working with shared files (including opening files, closing files, renaming files, and creating new files). These operations have a high impact on the performance of the file servers. Typical users generate metadata when working with shared files, so SOFS is not the best choice to share files for regular users.
There is another situation when SOFS should be avoided, namely when you need to share files that must be continuously accessed by server applications. Examples of such applications are Hyper-V, MS SQL Server, and IIS Server (Internet Information Services). A Hyper-V Server continuously operates with accessed VHDX virtual disks of virtual machines that are opened until the VM is powered off. MS SQL Server uses database files in live mode until the database is stopped. When applications don’t perform metadata-intensive operations, performance is not degraded for synchronous writes and there is no overhead for a Scale-Out File Server.
A Scale-Out File Server is a powerful enterprise feature that provides a progressive approach for deploying highly available file shares. SOFS is a highly scalable and reliable solution to store files that must be continuously opened by applications such as Hyper-V and MS SQL Server. You can add more nodes to scale up storage performance and sharing the bandwidth of a cluster that acts as SOFS. Using a Scale-Out File Server to store Hyper-V VM files improves availability and reliability. However, you should always have a disaster recovery plan based on Hyper-V backup and Hyper-V replication. Download NAKIVO Backup & Replication and protect your Hyper-V VMs and ensure availability.