Hello and welcome to another great article. This time, we’re going to create a highly available Windows share simply using virtual machines, without the need for dedicated hardware, SAN or NAS storage, or any special network requirements.
Before we start reading the article, let’s see what a use case might be for this type of deployment.
Well, let’s say you have some kind of application or just data that is really important to an organization. Now that these two are running from a file share, we have probably seen many of these types of applications, so placing them on the same virtual machine or physical server creates a single point failure scenario where if that server goes down the day – today’s operations would be hit hard. and then management will take over your business, forcing you to start it up again.
Create S2D Group and SOFS Share
Now that we’ve tested the use case, let’s see how we can create an S2D cluster and on top of it an SOFS (scale-out-file-sharing) share.
First of all, we will need at least two virtual machines, so I created two virtual machines in Azure named s2d-node1 and s2d-node2 . Each machine has one OS disk and three 150 GB disks to be used for the clustered storage pool ( storage spaces)
After we’ve created the virtual machines and added them to the domain, let’s see what PowerShell commands we need to run to create and configure the cluster.
First, we need to install the File Server and Failover Clustering roles on two nodes.
We’ll create an array with two node names:
$ s2dnodes = (“s2d-node1”, “s2d-node2”)
Then we’ll run the following commands to install roles on two nodes
icm $ s2dnodes {Install-WindowsFeature Failover-Clustering -IncludeAllSubFeature -IncludeManagementTools} icm $ s2dnodes {Intall- WindowsFeature FS-FileServer}
Okay, now that we’ve installed the required roles, let’s start configuring the S2D cluster.
First, we need to check the nodes using this command.
Test-Cluster -node $ s2dnodes
It’s time to create a failover cluster.
New-Cluster -Name S2D-SOFS -Node $ s2dnodes -NoStorage –StaticAddress 10.0.10.100
Next, let’s turn on S2D in the cluster using the disks we created for the VM, in my case three 150 GB disks per VM.
Enable-ClusterS2D
Then we create the virtual disk volume.
New-Volume -StoragePoolFriendlyName S2D * -FriendlyName SOFSVDISK -FileSystem CSVFS_REFS -Size 120GB
As you can see in the screenshot, the disk was successfully created and has a size of 118 GB, which is what we need.
Now that the cluster is in place and our virtual disk is up, we can go ahead and create the icing on the cake, the SOFS share.
To do this, we will run the following commands.
New-Item -Path C: ClusterStorage Volume1 Data -ItemType Directory New-SmbShare -Name SOFSShare -Path C: ClusterStorage Volume1 Data
That’s it, a simple process that delivers a simple result: one public resource to host our web-based applications or very important business information.
I hope you enjoyed this article and remember that until next time PowerShell is the best way to administer any Windows Server system.