In this post, I’ll show you how I created a Windows Server 2012 R2 SMB 3.0 Scale-Out File Server that uses Shared VHDX to create a simulated JBOD for clustered Storage Spaces. This is completely unsupported for production, but is nice for the lab to demo, teach and learn.
Shared VHDX allows us to build a guest cluster without complicating storage (SAN, SMB 3.0, iSCSI, etc). Yesterday I blogged about how I was creating a demo Scale-Out File Server using a VMM 2012 R2 Service Template. That template used an iSCSI target VM. Why did I do it that way? Shared VHDX requires that:
- Your hosts are clustered – net necessarily in the same cluster
- The shared VHDX file is placed on SMB 3.0 or CSV – note that an SMB 3.0 file share can be used by multiple host clusters
In my lab, my virtual SOFS is placed onto a single storage box that is running Hyper-V. At TechEd, Jose Barreto mentioned a solution for labs that is unsupported but works. Using this I can use my single non-clustered host to run VMs that access a shared VHDX. I can then cluster those VMs to create a guest cluster, e.g. a virtual SOFS.
- Run (PowerShell) Install-WindowsFeature Failover-Clustering on the host. There is no need to create a cluster from this host.
- Identify the volume that will store the shared VHDX files, e.g. D: drive.
- Run FLTMC.EXE attach svhdxflt D: where D: is the drive letter that you just identified.
Now you’re ready to create a shared VHDX. My VMs are in D:Virtual Machines. I’m creating a guest cluster called Demo-FSC1. The shared VHDX files will be stored in D:Shared VHDXDemo-SOFS1. I created Demo-FSC1 Witness Disk.VHDX (1 GB in size) and Demo-FSC1 Disk1.VHDX (100 GB in size) and stored it in that folder (D:Shared VHDXDemo-SOFS1).
Now for the VMs:
- I created 2 VMs for my virtual SOFS, Demo-FS1 and Demo-FS2, giving them all enough network connections for my design (see below screenshot, highlighted in green [requires guest OS QoS]).
- I added the shared VHDX files to the first SCSI controller on both virtual machines. Don’t overthink this – there is no replication so please don’t ask. I couldn’t possibly make this clearer. Each individual VHDX (a total of 2) is connected to each of the 2 VMs (see below).
- I make sure to open up the advanced settings of the shared VHDX on both VMs and check the box Enable Virtual Hard Disk Sharing.
- I went on to create and add Demo-FSC1 Disk2.VHDX and Demo-FSC1 Disk3.VHDX, both 100 GB in size.
At this point, I do all the usual storage, networking and clustering stuff in the guest OS of the 2 VMs. In the cluster, I made sure both storage networks had client access enabled (with an IP address). When creating the guest cluster, I did not add storage. Instead, I did something else that is unsupported.
I took the 3 shared VHDX data disks, and created a new storage space.
From this, I created 2 virtual disks, one with NTFS and one with ReFS, and converted bot volumes into CSV. Now I have what I need to finish off the creation of the SOFS role on the file server cluster.
Now I add the SOFS role (File Server for Application Data) to the cluster, wait a while for the CAP to come online (remember to delegate permissions to the cluster’s OU to the cluster object so the cluster can create the SOFS computer object), and then create the file shares.
What I haven’t done or shown:
QOS for the storage NICs.
Now I have my storage. It’s time to prep VMM 2012 R2 to do some bare metal host deployment and get a Hyper-V cluster up and running.