Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

Hyper-V: Free “Shared Nothing” SMB3 Failover File Server

  • January 22, 2016
  • 11 min read
Anton Kolomyeytsev is StarWind CTO, Chief Architect & Co-Founder. Microsoft Most Valuable Professional [MVP] in Cluster 2014 & 2015. SMB3, NFS, iSCSI & iSER, NVMe over Fabrics.
Anton Kolomyeytsev is StarWind CTO, Chief Architect & Co-Founder. Microsoft Most Valuable Professional [MVP] in Cluster 2014 & 2015. SMB3, NFS, iSCSI & iSER, NVMe over Fabrics.

A part of a series, the research is dedicated to the capability of free Microsoft Hyper-V Server R2 to assume a file server role and cluster the resulting file server. Our last experiment on this matter showed that it’s possible to create SMB3 File Server on the free Microsoft Hyper-V Server R2 and now we’re about to go further and cluster it. The post shows a detailed instruction on the process and also the resulting setup. It appears to be fully working and usable, so the process may be called a success after all. Though it is absolutely real to do so, it is a violation of Microsoft’s license agreement, so StarWind urges everyone to refrain from repeating the experiment.

2 servers with Microsoft Hyper-V Server 2012 R2 added into domain and the client node with Windows Server 2012 R2

A part of a series, the research is dedicated to the capability of free Microsoft Hyper-V Server R2 to assume a file server role and cluster the resulting file server. Our last experiment on this matter showed that it’s possible to create SMB3 File Server on the free Microsoft Hyper-V Server R2 and now we’re about to go further and cluster it. The post shows a detailed instruction on the process and also the resulting setup. It appears to be fully working and usable, so the process may be called a success after all. Though it is absolutely real to do so, it is a violation of Microsoft’s license agreement, so StarWind urges everyone to refrain from repeating the experiment.

Disclaimer: Please, do not violate license agreements for financial benefit. If you can do something, it doesn’t mean you should. This post is dedicated for one-time sole use of the mentioned setup – non-commercial, home lab or experiment. If you plan to earn money, please refrain from proceeding repeating the test described in this post.

As we succeeded in assigning file server role on Microsoft Hyper-V Server 2012 R2 in the last post, let’s try failover file server now.

For the setup, we’re using 2 servers with Microsoft Hyper-V Server 2012 R2 added into domain (NODE1, NODE2) and the client node with Windows Server 2012 R2 (TESTCLIENT).

1

Goal: Use two Microsoft Hyper-V Server 2012 R2 servers to create failover file server and check its work.

Both nodes must be added to the domain.

2

PowerShell is needed for adjustments, so we’re using the following command.

3

A shared storage is needed for the cluster, so we’ll use StarWind to create it, installing it on both nodes.

Basically, we’ll only need service, so we’re using /components=service parameter. Additionally we’ll use /verysilent to start it in console.

The procedure is the same for both hosts.

4

PowerShell module is very handy for managing StarWind, but we can also use Starwind Management Console.

In the latter case, we’re adding both hosts to the list and creating HA for witness disk and НА for fileshare.

5

As soon as the devices are created, we should configure initiators on clients.

For automatic start, we’ll enter the following:

Set-Service -Name msiscsi -StartupType Automatic

Now to start initiator service:

Start-Service msiscsi

Next step – adding StarWind addresses to the intiator:

New-IscsiTargetPortal –TargetPortalAddress NODE1

New-IscsiTargetPortal –TargetPortalAddress NODE2

6

Checking if the initiator “sees” the devices:

Get-IscsiTarget | Format-List

7

Connecting to the devices with the following:

Get-IscsiTarget | Connect-IscsiTarget -IsPersistent $True –IsMultipathEnabled $True

8

Let’s set the feature in both the nodes. To do that, we need to use Install-WindowsFeature cmdlet, then set features FS-FileServer, Multipath-IO and Failover-Clustering. In addition, we need to add “IncludeManagementTools” parameter for management components installation.

9

Our next step is to configure multipathing:

Enable-MSDSMAutomaticClaim –BusType iSCSI

Now let’s format all the disks with the help of diskpart utility.

10

2) Now we need to create the cluster, let’s say everything is already configured for that. It is done with New-Cluster cmdlet, where “Name” – is the name of the cluster, “Node” – are cluster nodes.

11

Next step – adding file-server role. There’s a cmdlet for this: Add-ClusterFileServerRole. “-Cluster” is the cluster where the role is added. “-Name” is the name of the file share. “Storage” is an available cluster disk.

12

In order to create the share, we use NewSmbShare on the share owner. “-Name” parameter sets directory name of the share. “-Path” is the path to the shared disk of the share. “-Scope” – name of the file share. “-FullAccess” sets the users with rights to work with the share.

13

Now we’ll check the parameters of the share we created. As it’s clear on the screenshot, everything’s right.

14

Additionally, let’s check if we can copy files to the share and also failover function. The screenshot shows that everything worked as planned (node-owner was turned off and the resource moved to the other node).

15

Conclusion

Our clustered file server on the free Microsoft Hyper-V Server 2012 R2 works. You may follow the instruction if your lab or experiment needs it right now, but remember that this setup is basically “emergency solution”, for those cases when you absolutely need a file server and have no other ways of acquiring one. It must not be used for commercial purposes under any circumstances, because that would mean violating your license agreement. We strongly discourage the readers from repeating the process described above.

Found Anton’s article helpful? Looking for a reliable, high-performance, and cost-effective shared storage solution for your production cluster?
Dmytro Malynka
Dmytro Malynka StarWind Virtual SAN Product Manager
We’ve got you covered! StarWind Virtual SAN (VSAN) is specifically designed to provide highly-available shared storage for Hyper-V, vSphere, and KVM clusters. With StarWind VSAN, simplicity is key: utilize the local disks of your hypervisor hosts and create shared HA storage for your VMs. Interested in learning more? Book a short StarWind VSAN demo now and see it in action!