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.
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.
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).
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.
PowerShell is needed for adjustments, so we’re using the following command.
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.
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.
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
Checking if the initiator “sees” the devices:
Get-IscsiTarget | Format-List
Connecting to the devices with the following:
Get-IscsiTarget | Connect-IscsiTarget -IsPersistent $True –IsMultipathEnabled $True
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.
Our next step is to configure multipathing:
Enable-MSDSMAutomaticClaim –BusType iSCSI
Now let’s format all the disks with the help of diskpart utility.
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.
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.
In order to create the share, we use New–SmbShare 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.
Now we’ll check the parameters of the share we created. As it’s clear on the screenshot, everything’s right.
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).
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.