April 13, 2011

Running mbralign from vMA to align disks

It's a known fact that operating systems such as Windows Server 2003 and older are not aligning their disk partitions optimally in their default setup. Different storage systems are affected differently by this issue, and there are several third party tools available to solve this issue.

One of the most commonly used tools is mbralign from NetApp. It's a tool that is available to NetApp customers through NOW. It was earlier a standalone tool (actually two tools: mbrscan and mbralign), but is now part of FC Host Utilities for ESX. This is a tool meant for installation on ESX hosts and is incompatible with ESXi which is now the new default hypervisor.

It *is* however possible to use mbralign from vMA if you're having NFS data stores. If you're using block storage (FC/iSCSI/FCoE) you will need to wait until NetApp releases mbralign for ESXi. To mount NFS data stores you must first start the nfs and portmap services and then mount the data stores in the vMA. Note that the FC Host Utilities will not install into vMA by default.

The solution is to manually unpack and move the directories into the right place.

To make things easier we put the new binary directory into PATH by editing the ~/.bashrc file:
When we now navigate to our mounted NFS store to a VM that we want to align we need to first check that this VM is powered off and does not have a snapshot. If you align a snapshotted VM you will get into trouble.

You can run "sudo mbralign -scan filename.vmdk" to check if the VM disk needs to have it's partitions aligned. To align you simply run "sudo mbralign filename.vmdk"
One of the advantages by running this from vMA compared to running it from the Service Console is that it gives much better performance. Aligning 20Gb took approximately 7 minutes on vMA, something  we would estimate would take at least 30-50 minutes from the Service Console.

To check what we gained from this alignment operation we ran iometer before and after and the results were as follows:
These numbers speak for themselves. Alignment had a good impact on this system.

No comments:

Post a Comment