mbralign v1.4 Frequently Asked Questions (FAQ)

by forgette Former NetApp Employee on ‎2009-04-29 07:50 PM

What versions of mbralign have been posted to the toolchest and what is the difference between them?


The original version that was posted to the toolchest was 1.2.  This version only supported primary partitions.  That version was replaced with 1.40090416 which added support for extended partitions (also known as logical drives).  The latest release also addresses some minor bugs.  It is recommended that all customers upgrade to version 1.40090416.

What type of performance will should I expect?  How long will this take?

There are many factors that impact the performance of the mbralign tool.  The size of the file, load on the ESX host, the load on the controller, the network (IP or FCP) between and the options chosen at execution time all have an effect on the time it takes to align the vmdk file.

The primary purpose of the ESX Service Console is to provide an interface to the hypervisor.  The service console was not designed to run heavy IO workloads, however because it has direct access to VMFS it is a natural choice for running mbralign.  The amount of available resources (to the service console) will impact the throughput mbralign is likely to achieve.  In the case of NFS based datastores, you might consider using a linux machine to run mbralign.  This will reduce the impact of the alignment process on the ESX layer of the virtual infrastructure.

On a lightly loaded ESX 3.5 server mbralign generates on average 64 MB/second of throughput.  By default, this leads to a vmdk file being processed at 32 MB/second (32MB/s read and 32MB/s write).  When the --sparse option is chosen (resulting in a thin vmdk file), the zero filled blocks don't need to be written resulting in a 64 MB/second throughput for unallocated portions of the vmdk file.  The block size that mbralign uses for each IO can be controlled with the --bs option.  Increasing the block size on VMFS based datastores may result in better throughput.


Can I use mbralign to migrate vmdk files?

Absolutely.  Below is an example that shows a simultaneous alignment and migration to a new datastore called test2.  I've also changed the name of the vmdk file to eric.vmdk.

[root@esx demo]# mbralign --sparse demo-template.vmdk /vmfs/volumes/test2/demo2/eric.vmdk
Part    Type          old LBA    New Start LBA      New End LBA     Length in KB
   P1      07               63               64         25141726         12570831
NOTICE:
This tool does not check for the existence of Virtual Machine snapshots or linked clones.
The use of this tool on a vmdk file that has a snapshot or linked clone associated with it
can result in unrecoverable data loss and/or data corruption.
Are you sure that no snapshots/linked clones exist for this vmdk? (y/n)y
Creating a backup of demo-template.vmdk
Creating a backup of ./demo-template-flat.vmdk
Creating a copy the Master Boot Record
Working on partition P1 (3): Starting to migrate blocks from 32256 to 32768.
12801 read ops in 1 sec.  99.29% read (55.02 mB/s).  39.38% written (0.00 mB/s)
Working on space not in any partition: Starting to migrate blocks.
100.00 percent complete.  39.38 percent written. 7627352KB saved.

                                                   

Making adjustments to /vmfs/volumes/test2/demo2/eric-flat.vmdk.
Adjusting the descriptor file.


What options are available with mbralign?

The options can be listed by using the --help option.  Below is an example.

[root@esx test123]# mbralign --help
mbralign version 1.40090416.
Copyright 2009 NetApp
mbralign - Align MBR partition table based vmdk files to NetApp storage systems
Usage: mbralign [OPTION]... SOURCE
   or: mbralign [OPTION]... SOURCE DEST
   or: mbralign [OPTION]... SOURCE DIRECTORY
Options:
   --sparse          The resulting file will be sparse.  This option is
                      designed for NetApp NFS based datastores.
   --force           The default behavior is to skip properly aligned disks.
                      The --force option can be used to
                      override this. (Useful for migrating and making sparse).
   --bs=n            Use n as the block size (specified in kB).  n must be one
                      of (8, 16, 32, 64, 128, 1024).  The default is 8.
   --preview         Show what would be done, then exit.  No changes are made
                      to the file.
   --quiet           Only print warnings and errors (no other status is
                      printed to screen).
   --debug           Print debug comments.
   --help            Print usage.
   --thereAreNoVmSnapshots  Suppress the warning message about snapshots and
                             answer YES to the question of whether to continue.

Does mbralign work on Dynamic Disks?

No.  The mbralign tool should not be used on vmdk files that contain Dynamic Disks.

Does mbralign work on LVM volumes?

No.  The mbralign tool should not be used on vmdk files that contain LVM managed volumes.


I aligned my linux VM using mbralign and now it wont boot.  How do I get it to boot?

The mbralign tool adjusts the boot sector of NTFS filesystems, so the resulting virtual hard drive is 'bootable'.  The tool does not modify any other type filesystem or boot loader (such as GRUB).  Manual intervention is required to make filesystems other than NTFS 'bootable'.  Please see the appendix of the README file for more information and an example.


What do the fields in the status line indicate while the tool is running?

The status line updates after a certain number of read IO operations (based on the block size).  In the example below (last line in this block), 12801 read operations occurred in approximately 1 second.  Durning that 1 second, the tool had a read throughput of 64.27 mB/s and a write throughput of 0.00 mB/s.  The source file has been 4.88% processed and, because I specified the sparse option, only 2.02% of the file had to be written (so far).

[root@x3550rre16 mbrtest]# mbralign --sparse forgette-template.vmdk
Part    Type          old LBA    New Start LBA      New End LBA     Length in KB
   P1      07               63               64         25141726         12570831
NOTICE:
This tool does not check for the existence of Virtual Machine snapshots or linked clones.
The use of this tool on a vmdk file that has a snapshot or linked clone associated with it
can result in unrecoverable data loss and/or data corruption.
Are you sure that no snapshots/linked clones exist for this vmdk? (y/n)y
Creating a backup of forgette-template.vmdk
Creating a backup of ./forgette-template-flat.vmdk
Creating a copy the Master Boot Record
Working on partition P1 (3): Starting to migrate blocks from 32256 to 32768.
12801 read ops in 1 sec.  4.88% read (64.27 mB/s).  2.02% written (0.00 mB/s)


Where do I get mbralign?

Please see this document for details.


Where can I get more information?

Technical Report 3747 (TR-3747) covers guest filesystem alignment.

Comments
nvogels

Will you be adding this version to the Storage Console as well?

forgette Former NetApp Employee

It is in VSC 1.0 currently.

Why does it align to LBA 64 as opposed to the recommended 1 Mb boundary?

Warning!

This NetApp Community is public and open website that is indexed by search engines such as Google. Participation in the NetApp Community is voluntary. All content posted on the NetApp Community is publicly viewable and available. This includes the rich text editor which is not encrypted for https.

In accordance to our Code of Conduct and Community Terms of Use DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information
  • Copyrighted materials without the permission of the copyright owner

Files and content that do not abide by the Community Terms of Use or Code of Conduct will be removed. Continued non-compliance may result in NetApp Community account restrictions or termination.