Adding new CSV to Hyper-V Cluster

Presenting a new CSV to an existing Hyper-V cluster is simple operation, but the steps listed on the MS site miss out some key steps so here are all the steps you will need to add a CSV. This can all be done online with no impact to the cluster.

1 Present your storage to the cluster. Through the creation of a LUN or otherwise
2 Connect to a node in the cluster. Launch Disk Management and bring the disk online.
3 Initialise the disk
4 Create a simple volume and choose to not assign a drive letter. Label the volume as you wish it to appear in the cluster

3-volume-label
5 Open up Windows Failover Cluster Manager, highlight storage right click add disk

 

disk
6 Next right click the disk in Failover Cluster Manager and select add to cluster shared volumes

4-add-to-csv

Thats it, simple when you know how.

Provisioning Hyper-V VM’s with disks on different CSVs

The Why

Creating a VM with different performance requirements from its disks is a common request, but it is not entirely obvious how to do it from the Microsoft Virtual Machine Manager (VMM). So here is the scenario, you have something like a SQL server you are happy for your OS to sit on slower disks but you want your log drives on flash. When you create the VM using VMM there in no option to create a disk on a CSV separate from the first disk that is created. To workaround this we use PowerShell to first create the new disks and then attach them to the VM.

The How

1 Go ahead and create the VM as normal using the VMM GUI. Specifying the OS to sit on the slower disks of your choosing. You can also add any other disks you are happy to sit on the same CSV as the VM at this stage.

2 To create the disk on a different CSV and in our case a CSV with different performance capabilities we need to use PowerShell. Launch PowerShell from within VMM to ensure you have all the Hyper-V related plugins.

The command is:

New-VHD

The following example creates a thick provisioned 20GB disk.

New-VHD -fixed -path C:\ClusterStorage\CSV1\VM1\disk1.vhdx -SizeBytes 20GB

Note, The path to the cluster is denoted using the standard format C:\ClusterStorage\CSV name.

3 Next you need to attach the VHD to the VM. You can either use either the GUI or run the command

Add-VMHardDiskDrive

You need to run the add disk command from the Hyper-V host that has the VM on it you want to work with, you can check which host the VM sits on from within VMM.

Below is an example that maps the disk found in location C:\ClusterStorage\Volume1\VM1\disk2.vhdx to a virtual machine called VM1.

Add-VMHardDiskDrive -VMName VM1 -path "C:\ClusterStorage\Volume1\VM1\disk2.vhdx"

 

Deploying the 3PAR Quorum Witness VM

In my previous post I gave an overview on Peer Persistence and how to set it up. One of the tasks in the setup of Peer Persistence is the deployment of the quorum witness VM and this will be the focus of today’s post.

 

The instructions for deploying the witness VM are in the HPE Remote Copy Software User Guide on page 313. The instructions are thorough until you get to step 13 where it says “Edit /etc/sysconfig/network-scripts/ifcfg-eth0 to comment out (or delete) the PREFIX line, so that the netmask change can take effect:” but yet gives no instructions on how to do it. The witness VM is based on Cent OS and I am sure this step will be no bother to our Linux loving friends but as a Windows lover I was lost, shouting at the screen and demanding a GUI did no good. So I then did the following to change the mysterious ifcfg-eth0.

1 Connect to your witness VM via console and logon (root plus the password you chose)

2 Change directory

cd /etc/sysconfig/network-scripts/

3 Enter

vi ifcfg-eth0

4 Locate where it says PREFIX, press i on the keyboard to allow insert and enter

##

5 To save your changes press escape on the keyboard, then type :wq! and finally press enter

6 Restart the management network

service network restart

7 That’s the end of the missing steps you can now return to HPE’s steps in the Remote Copy guide

 

Checking the witness VM

 

Once deployed that are a couple of CLI options you can use to check the health of the quorum witness VM.

showrcopy -qw targets
setrcopytarget witness check <IP of Quorum Witness>

To stay in touch with more 3PAR news and tips connect with me on LinkedIn and Twitter.