Mbrscan and mbralign are a part of the netapp host utilties kit. These tools are free from netapp and can be used to align the partition of your Virtual Machine with your storage. Aligning your partitions will increase performance and reduce unnecessary I/O. Follow these steps to run mbrscan and mbralign.

Things You Will Need

ESX Host
Net APP Host Utility Kit
Virtual Machines
SAN connectivity

Step 1

Install the Netapp host utilities Kit to your ESX host - located at now.netapp.com.

You will have to download the install files, copy them over to the ESX host and install them. After the install they will be located at /opt/netapp/santools.

Step 2

Copy the files from /opt/netapp/santools to /usr/bin and make the files executable by running

chmod 555 /usr/bin/mbralign (and mbrscan). If you do not make the files executable you will not be able to use the commands.

Step 3

Remove all snapshots for the VM that you want to align and power the VM off. If you do not remove snapshots the VM can become corrupted. Confirm that all snapshots have been removed by going to the VM in VirtualCenter, right clicking it and select snapshots - snapshot manager. If there are snapshots they will be listed there

Step 4

Putty into the ESX host service console. Change the directory to the location of the VMDK files.

Step 5

Type the following command

mbrscan and press enter

This will scan the vmdk file to tell you if it is aligned by saying mbraligned: No (or yes)

Step 6

Type the following command to align the VMDK file

mbralign and press enter

Step 7

If there are no snapshots, type y and press enter and the alignment will begin.

The progress will be monitored with a counter until it reaches 100%.

Step 8

When the alignment is complete, power up the VM and test it to make sure there are no issues.

Step 9

If the VM has no issues, delete the backup files that will be located in the same directory as the VM.

They will have the words mbralign backup in the file name.

Overall the mbralign and mbrscan tools are very easy to use. In my experience it takes about 1.5 seconds per GB to run the mbralign on a VMDK file.

If you find that you need to backout of the mbralign for any reason you simply re run the command. When you run the command the second time you will be prompted to restore the backup file. This makes backing out of the process very easy.

Tips & Warnings