Thursday, May 10, 2012

Configuring NetApp SnapManager for Hyper-V (Part 2) – Adding your Hyper-V Failover Cluster


Part one of our little tutorial dealt with correctly setting up and sizing the Snapinfo LUN.  Part deux will show you how to add and configure your cluster for SnapManager for Hyper-V.  Let’s dive in.

Configuring a Hyper-V Failover Cluster

  1. Open up SnapManager for Hyper-V, click the Protection node – Hosts tab and click Add Host.  Enter your host name.  NB! Only enter the NetBIOS name, not the FQDN***
    image
  2. Click Next.  Answer Yes to the dialog box asking you to start the configuration wizard.image
  3. The configuration wizard will pop up
    image
  4. Click Next.  Enter the report path location (or choose the default).image
  5. Enter the correct notification settings for your environmentimage
  6. Click Next. Select your Snapinfo path.
    image
  7. Click Next. Admire the exquisitely formatted summary.image
  8. Click Finish.  The configuration wizard will now do the necessary to configure your Hyper-V failover cluster.
    image
  9. Once you click close you can start configuring your Hyper-V protection.

***If the Fully Qualified Domain Name (FQDN) is used, SMHV will not be able to recognize the name as a cluster. This is in view of the manner in which the Windows Failover Cluster (WFC) returns the cluster name through WMI calls. Consequently, the host will not be recognized by SMHV as a cluster and will fail to use a clustered LUN as the SnapInfo Directory Location.

Configuring NetApp SnapManager for Hyper-V (Part 1) – Creating the Snapinfo LUN

Simple as this sounds I found that the process is not as simple and as well documented as it could be, especially with regards to creating the clustered SnapInfo LUN and folders.  Consequently I decided to document it with (a first for this blog) screenshots.

I am going to assume that you have already hooked up your hosts to your NetApp system, and that you’ve installed SnapDrive and SnapManager for Hyper-V.

The steps, in a nutshell, are:

  1. Create the Snapinfo LUN
  2. Make the Snapinfo LUN a highly available clustered resource
  3. Configure SnapManager for Hyper-V

Creating the SnapInfo LUN

  1. Create a volume to host your Hyper-V SnapInfo LUN
  2. Open up Snapdrive on of your Hyper-V cluster nodes, go to the Disks node, and click Create Disk.  This launches the Create Disk Wizard.image
  3. Click Next.  Now highlight the volume you created in step 1, enter a LUN name and description:image
  4. Click Next.  Very Important – select Shared (Microsoft Cluster Services Only)image
  5. Click Next. The following list should list the active nodes in your Failover Cluster.image
  6. Click Next. Select the appropriate options and size for your environment***image
  7. Click Next. Select the initiators to be mapped to the LUNimage
  8. Click Next.  Select whether you want to manually select the igroups (collection of initiators) or whether you want the filer to do it automatically.image
  9. Click Next. Choose the option to create a new Cluster Group to host the LUNimage
  10. Click Next and click Finish to exit the wizard.

image

To recap, the above will:

  • Create a LUN on the volume of your choosing
  • Format the LUN with the NTFS filesystem
  • Add the disk to your Failover Cluster as part of a Cluster group
  • Assign a driveletter to the disk.

***SnapInfo LUN Size Provisioning:  The NetApp filer will store about 50KB metadata per VM per snapshot.  Due to the way Hyper-V snapshots work it will store two snaps per snapshot, therefore if we backup 20 VM’s once per day our sizing will be as follows:  20 * 50KB = 1MB * 2 = 2MB per day.  NetApp allows us to store 255 snapshots per volume so we should cater for 510 MB total.  I give it 10GB just because I can.  And because thin provisioning works.

Tuesday, May 8, 2012

Fixing NetApp SnapDrive error code 0x800706ba

I came across this when deploying SnapDrive on cluster nodes in a Windows 2008 R2 Failover Cluster.  Only SnapDrive running on the host owning the disk resource would list the connected LUNs.  On the other cluster nodes SnapDrive did not list any connected LUNs.  Event Viewer has the following to say:

Level: Warning
Source: Snapdrive
Event ID: 317
Description:  Failed to enumerate LUN.


Devicepath: '\\\mpio#disk&ven_netapp&prod_lun&rev_810a#1&7f6ac24&0&323766314c5d417548697a49#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'

Storage path: '/vol/vol_name_001/lun-name-001'

SCSI address: (3,0,0,7)

Error code: 0x800706ba

Error description: The RPC server is unavailable.

Background:

The issue is that SnapDrive on the non-owning hosts queries FCM to see which node is the owner.  It then tries to connect to Snapdrive on the owning node to retrieve the LUN and snapshot info (as opposed to directly from the filer).

Fix:

  1. Disable the windows Firewall (yeah right) –or
    Navigate to Control Panel > Windows Firewall > Allow a program through Windows
    Firewall > Exceptions.
  2. If you will be using HTTP or HTTPS, select the World Wide Web Services (HTTP) or Secure World Wide Web Services (HTTPS) checkboxes.
  3. Click Add program.
  4. Click Browse and browse to C:\Program Files\NetApp\SnapDrive\, or to wherever you
    installed SnapDrive if you did not use the default location.
  5. Select SWSvc.exe and click Open, then click OK in the Add a Program window and in the Windows Firewall Settings window.
  6. To verify that SWsvc.exe is in the list of inbound rules, in MMC, navigate to Windows Firewall > Inbound Rules.

Friday, April 27, 2012

SQL Development and Testing magic, brought to you by NetApp

I started supporting and deploying NetApp storage systems about 5 months ago.  I still am *very* far from being an authority on the subject, but I have been playing around with the kit and am learning an immense amount daily.  That said, I never seize to be amazed at how trivially easy NetApp technology make traditionally time-consuming and difficult tasks.  Take the following situation:  You have a big old production SQL DB, and your developers need to test against an up-to-date instance of it.  I bet the tired old way that your business is doing it is by taking a 500GB backup, pushing it across the network, or sneaker-netting it via USB or even worse restoring from tape (blegh!).

No more.  With a NetApp SAN I can do this in exactly 23 seconds (and this on a low-end FAS2040!).  It costs me zero storage*** on my SAN and all it takes is you putting on your PowerShell hat and typing one single line.  The only assumption I make here is that you are running SnapManager for Microsoft SQL Server on your SQL box (and you should!).  This gives us access to all the PowerShell goodness that makes the magic happen.  The following command (watch for wrappage):  

clone-backup -svr prod-sql-001 -Database big_prod_db -TargetDatabase yourdatabase -TargetServerInstance dev-sql-001 Backup sqlsnap__big_prod_db__snapshots

  1. What is happening behind the scenes, you ask?  Quite simple actually:
  2. It created a FlexClone of the Snapshot of the production store
  3. Created a DB on dev-sql-001
  4. Mounted the FlexClone as a mountpoint
  5. Attached the files to the database
  6. Made toast and coffee

But that's not all.  This example brought our development box up to the same point in time as production, but you can also specify a previous a point in time to go back to.  Of course you need to have snapshots of your chosen point in time.

Wow.

***It will start consuming space once you start making changes in dev, because you are diverging from the cloned snapshot.

Wednesday, April 11, 2012

Issues when upgrading to Veeam Backup & Replication v6

Let me start off by saying that Veeam Backup & Replication (VBR) is one of the most awesome pieces of software I know of!  As with any piece of software there might be the occasional bug or issue that needs to be worked around.  I’ve upgraded a couple of clients to VBR already, and I’ve consistently run into two little niggles.  These are:

Backup of vCenter SQL DB fails when using VBR v6

This is actually detailed on the Veeam forums here.

What it boils down to is that when using VBR for an application aware backup of the VM which hosts the vCenter SQL DB, the backup will fail with a VSSControl: Failed to freeze guest, wait timeout error.  This occurs because VBR has to communicate with vCenter to create a snapshot, but at the same time the vCenter SQL DB is frozen because of the VSS snapshot

To solve this problem, add the IP-address of the ESX host which runs the vCenter Server SQL database to the Veeam console (the servers list in the left panel). Then adjust the job and select the virtual machine with the SQL database from the ESX host instead of via the vCenter Server. Veeam B&R will then use the host for communication with the VM to do the VSS snapshot.

This will, of course, cause your replication job to fail should the vCenter VM move to another host.  We can work around this by using DRS Host Affinity rules to tie your vCenter VM to a physical box.

Replication job fails – cannot connect to port 2500

When VBR does a replication job, it might fail with “Creating snapshot Cannot connect to server [x.x.x.x:2500]”

In my case it was always happening when the destination server was running ESX (not ESXi) v4.x.  This is easily resolved by logging onto the target server via SSH and issuing the following commands:

  1. esxcfg-firewall -openport 2500:2510,tcp,in,VeeamSCP
  2. service mgmt-vmware restart

Easy enough!

Thursday, March 29, 2012

Increasing the amount of concurrent mailbox moves in Exchange 2010

Exchange 2010, by default, allows you to do 2 concurrent mailbox moves.  This is a rather conservative approach, in this age of 10Gb Ethernet and super-fast SAN storage.  Fortunately Microsoft has provided a mechanism whereby we can increase the amount of concurrent moves allowed.

Said mechanism involves editing the MSExchangeMailboReplication.exe.config file, which resides under the C:\Program Files\Microsoft\Exchange Server\V14\Bin\ foler.

These are the changes you need to make if you’d want to allow 20 concurrent moves:

  • MaxActiveMovesPerSourceMDB = “20"
  • MaxActiveMovesPerTargetMDB = “20"
  • MaxActiveMovesPerTargetServer = “20"

Once you’ve made the changes you will also need to restart the Microsoft Exchange Replication service.  Lastly – all the above needs to be done on the target server.

Quick and easy, just the way I like it!

Monday, March 26, 2012

Moving a Hyper-V cluster to a new AD Domain

I recently had to move a production Hyper-V cluster to a new AD domain, as part of a forest migration project I am busy with.  Microsoft has a KB Article on the procedure, but it only applies to Windows Server 2003 and below, and then only in a non-production environment.  So a migration is out, I had to find a way to move all the nodes into a new cluster, with minimal disruption to the VM’s uptime.  This process assumes the new cluster will run on your existing hardware.  Here is what I did:

  1. Make a list of your VM’s per Cluster Shared Volume (CSV).  We won’t be able to share our CSV’s across clusters so our move process will be CSV driven
  2. Make a note of all the folder names under the c:\ClusterStorage namespace and how they map to your CSV’s
  3. Evict one of your nodes from the existing cluster
  4. Remove the Failover clustering role from the evicted node and join it to the new domain.
  5. Add the Failover Cluster role back once the node is added to the new domain
  6. Create a new cluster on the node in the new domain
  7. Shut down all the VM’s on the CSV that will be moved to the new cluster
  8. Delete the VM from Failover Cluster Manager (FCM).  Do *NOT* delete the VM from Hyper-V Manager
  9. Take the CSV offline and remove it
  10. Take the storage volume hosting the CSV offline and delete the disk from FCM
  11. Ensure that the LUN is not presented to nodes in the old cluster anymore
  12. Present the LUN to the host in the new cluster
  13. Open up Computer Management on a node in the new cluster, go to Storage and re-scan for new storage
  14. Bring the new disk online, taking care to not initialise it
  15. In FCM, go to Storage – Add Disk – Select the disk you brought on previously
  16. Go to Cluster Shared Volumes – Add Storage – select the storage added previously
  17. Rename the new folder under the c:\ClusterStorage namespace back to what it was previously called
  18. Open Hyper-V Manager, the VM status should change from Critical to Normal
  19. Make the VM’s highly available using FCM
  20. Start the VM’s
  21. Rinse and repeat for your other CSV’s

You should also evict nodes and join them to the new cluster as soon as your usage requirements allows you to do so.