Hello and welcome to another awesome article. This time we’re going to create a highly-available Windows share by just using virtual machines, without the need for dedicated hardware, SAN or NAS storage or any special networking requirements.

Before we get started on the article let’s see what the use case might be for this type of a deployment.

Table of Contents

    Well, let’s say you have some application or just data that’s really important to the organization. Now those two run from a file share, we’ve seen plenty of those types of applications for sure, so by having them hosted on a single VM or physical server creates a one-point failure scenario, where if that server goes, the day-to-day operations are heavily impacted and then management will be all up on your case, pressuring you to get it back running.

    Create S2D Cluster and SOFS Share

    Now that we’ve checked the use case, let’s see how we can create a S2D cluster and on top it a SOFS Share (Scale-Out-File-Share).

    First of all we’ll need at least two VMs, so I created two VMs in Azure, called s2d-node1 and s2d-node2. Each machine has one OS disk and three, 150GB, disks that will be used for the clustered storage pool (Storage Spaces)

    After we’ve created the VMs and added them to the domain, let’s see which PowerShell commands we need to run to create and configure the cluster.

    First we will need to install the File Server and Failover Clustering roles on the two nodes.

    We will create an array with the two node names:

    $s2dnodes = (“s2d-node1”,”s2d-node2”)

    Then we will run the following commands to install the roles on the two nodes

    icm $s2dnodes {Install-WindowsFeature
    Failover-Clustering -IncludeAllSubFeature -IncludeManagementTools}
    icm $s2dnodes {Intall-WindowsFeature

    Ok, now that we have installed the required roles, let’s go and configure the S2D Cluster.

    First, we need to validate the nodes by using this command.

    Test-Cluster -node $s2dnodes

    Now it’s time to build a Failover Cluster.

    New-Cluster -Name S2D-SOFS -Node $s2dnodes
    -NoStorage --StaticAddress

    Next let’s enable S2D in the cluster using the disks we created for the VM, in my case three disks of 150GB per VM.


    Next we create a Virtual Disk Volume.

    New-Volume -StoragePoolFriendlyName S2D*
    -FriendlyName SOFSVDISK -FileSystem CSVFS_REFS -Size 120GB

    As we can see from the screenshot, the disk has been successfully created and has a size of 118GB which is what we wanted.

    Now that the cluster is in place and our virtual disk is up, we can go ahead and create the cherry on the cake, the SOFS share.

    For that we will run the following commands.

    New-Item -Path
    C:\ClusterStorage\Volume1\Data -ItemType Directory
    New-SmbShare -Name SOFSShare -Path

    That’s it, a simple process for a simple result, one highly available share to host our network applications or very business important information.

    Hope you enjoyed this article and until next time, remember, PowerShell is the best way to administer any Windows Server system.