Setting up a failover cluster is a thing that admins must do. To build such cluster, you need to configure shared storage. And, there are a lot of ways to do that. Today, I’d like to discuss how to build a Windows Failover Cluster using a virtual SAN solution (StarWind Virtual SAN) as a shared storage provider.
I believe virtual SAN’s to be a decent alternative for physical ones: they are far more flexible, easier to maintain, and cheaper (it is a very strong point for using such solution in a home lab). Furthermore, while deploying and configuring a virtual SAN so that everything will be running smoothly, you’ll gain hands-on experience which helps you a lot while working with real-life environments. Well, you can still use a NAS as a shared storage entity and Windows Server as a file server, but virtual SAN solutions are a thing of the future, IMHO.
Why do I use StarWind Virtual SAN today? First, it’s pretty intuitive and has good manuals on configuration and deployment. Just like any virtual SAN, StarWind’s solution allows building a highly available shared storage that is presented over iSCSI to the entire cluster. And, what is more important, I know how slow Microsoft iSCSI Target may be (that’s why I was looking for something better).
The toolkit used
Here’s the host configuration:
- Dell PowerEdge R720, CPU 2 x Intel Xeon E5-2609 @ 2.40GHz, RAM 48GB DDR3
- Storage: 1 x HDD 300GВ, 2 x HDD 1TB
Virtual host configuration
Let’s take a look at virtual hosts’ configuration. Both Win19DS01 and Win19DS02 had identical settings:
- 4 Virtual CPU
- RAM 8GB DDR3
- 1 x HDD C: 30GВ
- 1 x HDD D: 200GB
The scope of this article
In this post, I don’t focus on boring stuff that you can read elsewhere (e.g., OS installation, setting up a domain, configuring the setup, etc.). I’ll keep things very short to discuss only the key moment for each step. If you need any help, look through the guides that I refer. Here’s what I am actually going to do today:
- Install VSAN and create virtual devices.
- Set up shared storage.
- Configure a failover cluster.
Installing StarWind Virtual SAN
There is a bunch of ways how you can get StarWind Virtual SAN. You can download StarWind Virtual SAN here: https://www.starwindsoftware.com/download-starwind-products?product=hyperv#download. You can also request an NFR license for 1 year (find more at https://www.starwindsoftware.com/starwind-nfr-license-users). Or, you can request a trial version.
StarWind provides detailed guidelines for deploying and configuring VSAN for different scenarios. Here’s the manual used for this post: https://www.starwindsoftware.com/resource-library/starwind-virtual-san-hyperconverged-2-node-scenario-with-hyper-v-cluster-on-windows-server-2016.
I find it useless to rewrite their manual, so I mainly focus on key moments of StarWind virtual device (HA Device) creation.
StarWind virtual device creation
Please, set the clear names for virtual devices: this helps you while connecting them over iSCSI.
While creating the device replica, please, always enter the whole name of partner host! It will be easier for you to find out to which host you connected the disk.
Now, I’d like to share a trick for creating a synchronously replicated device quickly. Create the smallest possible HA Device, set up replication, and extend it afterward! This life hack saves you some time that is typically needed to sync large disks.
Connecting the virtual device over iSCSI
Now, I’d like to discuss some key moments of connecting a virtual device over iSCSI.
First, do not leave iSCSI Initiator properties as they are set by default. The thing is that iSCSI Initiator will scan through all available NIC’s whenever an iSCSI session starts instead of just checking the hard-set NIC. That’s why it is good to reserve a special adapter for iSCSI traffic.
If you want to boost iSCSI performance, add the connection to the Favorite Targets and enable multi-path.
While creating a witness disk, set its size to +512MB (https://docs.microsoft.com/en-us/windows-server/failover-clustering/manage-cluster-quorum). Don’t create a 512MB disk. The thing is that disk free space may be less than 512MB after formatting.
Setting up the cluster
You need to set up time synchronization between hosts and domain controller. Before, I discussed how it can be done in detail: https://www.starwindsoftware.com/blog/hyper-v/configuring-time-synchronization-for-all-computers-in-a-windows-domain/. You can do that manually or using cmdlets:
Check the NTP settings:
w32tm /query /status
Before you create the cluster, it’s good to reserve the name for it. Create an Active Directory Users and Computers entry and disable it. While creating the cluster, the wizard will activate that entry and add the description.
Here’s how my test environment looked like after connecting everything and setting up the cluster.
Configuring a failover cluster may seem a bit complicated for ones who do it for the first time. Well, if you follow the guides, everything will be quickly and easy. Thanks to awesome manuals from Microsoft and StarWind, this process took me around 2 hours in total.
Sorry for keeping things that short. I just find it useless to rewrite things that one can easily learn from guides; I believe that mentioning some key moments should still be OK (anyway, if you have any questions, ask me in comments).
Almost the whole world perceives information, reading from left to right. This applies to both text and visual perception of graphic information. Your screenshots do not match this! They are almost impossible to perceive. Learn the basics of web page design!
Thanks for pointing out the flaws! My bad… I hope my screenshots became more user-friendly now!
Failover cluster on one host? You really? It’s a school lab?
Hi there. Thanks for your comment.
A home lab is a home lab. This is one a demo-only lab… That’s just what its name says! Fault tolerance? There is fault tolerance only for level 1: if a bare metal host goes down, the entire lab goes down too!
BTW, do you know that many home lab owners with +2 servers in their possession? Or, do you think that virtualization and “fault tolerance” in the classical sense are only for ones with cool setups?
Home lab? Ok. “Do you know that many HOME lab owners” Dell PowerEdge R720?
Look, my server is a useful tool rather than an expensive toy in the garage. It is a true working horse that serves not only for blogging. Whatever. I like carrying out experiments in my lab and sharing my experience with others. The main idea behind my blog is to encourage others to try out new technologies and experiment on whatever hardware they have. It is also possible to use all-cloud setup if on-site hardware is slow. I really appreciate your criticism, but you are getting off the topic I guess…
Anyway, speaking of this particular case, I am sure that the discussed scenario will work even if you use the less powerful hardware.