Don’t mix and match VHD and VHDX files for Exchange 2010 DAGs

To start off what are VHDs and VHDXs?

VHD – Virtual Hard Disk

This is Microsoft’s file format for storing virtual machines (VM) operating system (OS) and VM data under Windows Server 2008 and Windows Server 2008 R2 Hyper-V (and MED-V, Virtual PC – basically the “old” virtualisation technologies).

VHDX – Virtual Hard Disk

This is Microsoft’s file format for storing virtual machines (VM) operating system (OS) and VM data under Windows Server 2012 Hyper-V (and 2012 R2).

So what’s the difference?

Quick answer? A lot.

The VHD format is OLD. Really OLD – 10 years plus! It only goes to 2TB and is not very resistant to corruption.

VHDX (courtesy of TechNet):

The main new features of the VHDX format are:

  • Support for virtual hard disk storage capacity of up to 64 TB.

  • Protection against data corruption during power failures by logging updates to the VHDX metadata structures.

  • Improved alignment of the virtual hard disk format to work well on large sector disks.

The VHDX format also provides the following features:

  • Larger block sizes for dynamic and differencing disks, which allows these disks to attune to the needs of the workload.

  • A 4-KB logical sector virtual disk that allows for increased performance when used by applications and workloads that are designed for 4-KB sectors.

  • The ability to store custom metadata about the file that the user might want to record, such as operating system version or patches applied.

  • Efficiency in representing data (also known as “trim”), which results in smaller file size and allows the underlying physical storage device to reclaim unused space. (Trim requires physical disks directly attached to a virtual machine or SCSI disks, and trim-compatible hardware.)

So what has this got to do with Exchange?

My Situation

Picture the scene, 4 Exchange 2010 Servers in our primary office, running on our Windows Server 2012 Hyper-V failover cluster. 2 are CAS and HT servers, the other 2 are Database servers. All 4 are using the shiny new VHDX format. Beautiful.

1 Exchange 2010 Server in our DR site with all roles install sitting on a Windows 2008 R2 Hyper-V server using the VHD format (the only option on Windows 2008 R2 Hyper-V).

None of them are running unified messaging.

So I diligently created the Exchange servers with log files stored on separate VHDXs to the databases (even on different CSVs too), all the same drive letter etc. So far so good.

I copied the setup on the DR server and felt quite proud of myself, for about an hour…

I created the DAG, setup DAC and created the three empty databases I needed. Cue problems.

The initial seeding went through as expected and all looked good, for a while. All of a sudden the copy queue length and replay queue length on the DR server were increasing rapidly. So off I went testing latency, firewall rules, etc. All good.

Back to basics

What is the difference? The VHD/VHDX format.

Turns out that Exchange actually copies the log file from one to the other and the way the file is written on the VHDX disk is different to VHD. Exchange simply couldn’t read the file. I assume the VM is aware of the underlying format – further investigation needed by me here.

Result

I shutdown the entire Exchange infrastructure and copied the VHDX file to VHD file, amended the VM config, powered on the VMs and waited. 2 days of testing the setup later and job done – all working as expected.

It’s kind of irrelevant for me now as I’ve changed the DR Hyper-V server to a Microsoft Hyper-V 2012 Server but I thought I’d put this up just in case it helped someone else!

Advertisements

Posted on 10 June, 2013, in Uncategorized. Bookmark the permalink. 1 Comment.

Anything to add? Let me know

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

%d bloggers like this: