64 Node Sharing Virtual Hard Disk (shared VHDX) in Failover Clustering Windows Server 2012 R2 #Winserv #ITPro   1 comment

The most common question on clusters is do I need shared storage ? Yes you do oh such a huge cost eh are you using windows server 2012 R2 no not yet.

Well you should use 2012R2 one of the best options is Shared VHDX

Hyper-V V3.0 ( windows server 2012 R2 )makes it possible to share a virtual hard disk file between multiple virtual machines. Sharing a virtual hard disk file (.vhdx) provides the shared storage that is necessary for a Hyper-V guest failover cluster.

Sharing a virtual hard disk file (.vhdx) means that you can create and manage a guest failover cluster to protect the application services running inside your virtual machines. Before Windows Server 2012 R2, if you wanted to create a Hyper-V guest failover cluster, you needed to expose your storage topology to the virtual machine.

Starting in Windows Server 2012 R2, you can deploy a Hyper-V guest failover cluster that is no longer bound to your storage topology. You can implement a guest failover cluster by using a shared virtual hard disk, Fibre Channel, Server Message Block (SMB), Storage Spaces, or ISCSI storage options. Shared virtual hard disks are only available in Windows Server 2012 R2. Hyper-V makes it possible to share a virtual hard disk file between multiple virtual machines. Sharing a virtual hard disk file (.vhdx) provides the shared storage that is necessary for a Hyper-V guest failover cluster.

Using a shared virtual hard disk is ideal for the following situations:

  • SQL Server database files.
  • File server services running within a virtual machine.
  • Database files that reside on shared disks.

In this scenario I have a 64 node Cluster based on Shared VHDX. Let me show you how you should start.

First we need some virtual disk files VHDX and the quickest and easiest way to do this is by powershell

If you run this line you will create 10 Virtual disk on the M drive with a fixed size of 4 GB.  if you want other options use the get-help New-VHD

1..10 | % { New-VHD -Path m:\ShareData$_.VHDX -Fixed -SizeBytes 4GB }

image

 

 

 

 

 

 

 

This is Cool in a few seconds several disks. yes but what now well If you have a cluster already then you can add the disk to the VM and use them if not you can create a cluster.

But Robert adding the disk is so much work, I know. Imaging you have 64 nodes this will take days yes how fun is that User PowerShell

In the following line you can easy add the disk to the VM

1..10 | % { $p = "m:\shareData" + $_ + ".VHDX" ; 10..66 | % { $v = "Demo" + $_; Write-Host $v, $p; Add-VMHardDiskDrive -VMName $v -Path $p -ShareVirtualDisk } }

image

 

 

 

 

 

 

 

 

 

 

But you can also share a disk in the GUI and the best part is it can be done live.

imageimage

image

As you can see several steps are needed to do this. just with one line in PowerShell it is done.

Now that We added the Disks We can use the disks.

Easy as Get-ClusterAvailableDisk | Add-ClusterDisk  or in the GUI

imageimage

Now that the disks are in place We can create a a sample File server that is using this disk.

I installed already the file server role on all the nodes. not by hand Winking smile

1..9 | % { Install-WindowsFeature -computername Demo0$_ File-Services, FS-FileServer, Failover-Clustering }
1..9 | % { Install-WindowsFeature -computername Demo0$_ RSAT-Clustering -IncludeAllSubFeature }

So the first nine servers are file servers. but keep in mind if you do this you have to adjust the ownership, creating a file server every node will own this and if not all the nodes have the FS role installed you will get in trouble !

image

Now you can add the share to the fileserver. Remember do this in the Cluster Manager and not on the share it self

imageimage

Now we have a File server on a shared VHDX isn’t that cool.

\\DemoFS01\Fileshare01

Posted January 7, 2014 by Robert Smit [MVP] in Windows Server 2012 R2

Tagged with

One response to “64 Node Sharing Virtual Hard Disk (shared VHDX) in Failover Clustering Windows Server 2012 R2 #Winserv #ITPro

Subscribe to comments with RSS.

  1. Hi colleagues, its great piece of writing regarding educationand
    completely defined, keep it up all the time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

  • Twitter

  • %d bloggers like this: