--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools



Would you like to sponsor this site?
Or buy me a beer?:

Recently Changed Pages:

View All Pages
View All Q Pages

View All Tags

Sign up for Q to post comments.

WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.

Terms And Conditions for Q users

Pages with comments

2019/06/22 10:36 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 3 Comments
2017/04/20 15:28 1 Comment
2017/04/20 15:23 1 Comment
2017/04/19 14:44 1 Comment
2017/04/17 20:10 1 Comment
2017/04/17 20:07 1 Comment
2017/04/17 19:58 1 Comment
2017/04/17 19:52 1 Comment

View All Comments


Lun Aligning

For information about why you should keep LUNs aligned with your vmdks I'd like to refer to this article from It explains why alignment is important, but to sum it up: it comes down to performance. When the LUNs, vmdk and Guest OS blocks are not aligned the array will request more blocks than the VMs are actually asking for, causing more IO then required.
Please note the following remarks:

  1. Windows Server 2008 and Windows Vista are aligned by default if the VM was created as Windows Server 2008/Windows Vista.
    1. LUNs less than 4GB in size will align to 64KB
    2. LUNs larger than 4GB will align to 1MB
  2. Citrix Servers are not supported because they remap the C-drive.
  3. Windows Dynamic Disks are not supported and will be corrupted if an alignment is performed, you will be warned with something like this: “partition type: unknown - 0x42”. Do not align these partitions.
  4. Linux LVM volumes are not supported.
  5. If you align linux guests that use grub as their boot loader you'll have to reinstall grub
  6. Windows Server 2003 non-boot disks that have been added (d:, e:, etc) will need to be remapped in Computer Management. The drive letter will be lost on alignment.
  7. Because the virtual disks are being recreated you'll need enough free space on your volume/datastore.
  8. Aligning can only be done on VMs that are turned off (so downtime)
  9. Aligning is not supported on VMs that have snapshots or linked clones

Performing Alignment

Before you can actually start aligning you need to know which VMs should be aligned. In this article we use Windows native tools and NetApp tools. The NetApp tools can be obtained on several ways: First they are part of the host utilities but they're also part of the Virtual Storage Console, an extension you can install on your vCenter. I grabbed them from there and made them available on my ESX host:

[root@esx01 ~]# gunzip mbrtools.tar.gz
[root@esx01 ~]# tar -xf mbrtools.tar
[root@esx01 ~]# ll
total 3860
-rwxrwxrwx 1 root root   86949 Apr 28  2009 howto.pdf
-rw------- 1 root root    1629 Apr 13 21:53 ks.cfg
-rwxrwxrwx 1 root root  962284 Apr 16  2009 mbralign
-rwxrwxrwx 1 root root  134186 Apr 28  2009 mbralign1.2.pdf
-rwxrwxrwx 1 root root  771276 Oct  5  2008 mbrscan
-rw-r--r-- 1 root root 1960960 May 12 12:57 mbrtools.tar
-rwxrwxrwx 1 root root    1133 Apr 28  2009 readme.html

Determine Which VMs Should Be Aligned

I'll explain three ways to determine which VMs should be aligned. We'll use the NetApp tool mbrscan, we'll use the native Windows tools and we'll use a PowerCLI script.


After obtaining the NetApp tools you can use the mbrscan tool:

  1. Navigate to the directory of the VM you'd like to check for alignment.
  2. If the VM is running, create an ESX snapshot.
  3. In this directory run /root/mbrscan <filename>-flat.vmdk (NOTE: you are checking the –flat.vmdk file for proper alignment)
  4. Check if your virtual disk file is misaligned.
  5. Delete the snapshot.

This option can be used when scanning one VM or when scanning an entire host (while using the -all switch).

MBRScan Example

If VM is running:

[root@esx01 WINXP01]# /root/mbrscan WINXP01-flat.vmdk
Failed to open WINXP01-flat.vmdk - [Device or resource busy]

So create a snapshot and rerun:

[root@esx01 WINXP01]# /root/mbrscan WINXP01-flat.vmdk
WINXP01-flat.vmdk p1 (NTFS)    lba:63  offset:32256    aligned:No
Note: You can run the tool using the “–all” switch which will scan all -flat.vmdk files that are on the host.

Native Windows Tool MSInfo32

You can check disks from within Windows:

  • Run Start → All Programs → Accessories → System Tools → System Information (or Start → Run → msinfo32 ).
  • Go to Components → Storage → Disks and check the value for Partition Starting Offset.
  • The value listed here should be completely divided by 4096. If so, the disk is aligned.
  • Check every disk in the list.

For misaligned VMs, you typically will find that the VM is running with a default starting offset value of 32,256, which is not completely divisible by 4,096; hence, the partition is not aligned.
This option can be used when you just want to know if one particular VM is aligned.


You can also use this powercli script to determine per vCenter/Datacenter/Folder/Cluster/Host which VM Disks are misaligned:

# Original script:
# Changed: Sjoerd Hooft - 10 Nov 2011
$myCol = @()
$timestamp = Get-Date -format ""
$cluster = "Production"
$csvfile = "D:\sjoerd\$timestamp-alignmentinfo-$cluster.csv"
#$vms = Get-Datacenter "The Netherlands" | get-vm | where {$_.PowerState -eq "PoweredOn" -and $_.Guest.OSFullName -match "Microsoft Windows*" } | Sort Name 
$vms = Get-Cluster $cluster | get-vm | where {$_.PowerState -eq "PoweredOn" -and $_.Guest.OSFullName -match "Microsoft Windows*" } | Sort Name
Write-Host (get-date -uformat %I:%M:%S) "Please provide alternative authentication credentials for VMs" -ForegroundColor Green;
$seccredentials = $Host.UI.PromptForCredential("Please enter credentials", "Enter alternative credentials", "domain\sjoerd", "")
foreach($vm in $vms){
  Write-Host (get-date -uformat %I:%M:%S) "Now starting $vm"
  $wmi = $null
  # First use default credentials
  $wmi = get-wmiobject -class "Win32_DiskPartition" -namespace "root\CIMV2" -ComputerName $vm            
  # Secondly, use the alternative credentials as supplied
  if ($wmi -eq $null){
  $wmi = get-wmiobject -class "Win32_DiskPartition" -namespace "root\CIMV2" -ComputerName $vm -Credential $seccredentials
  # Use default authentication, but if unsuccesfull try other credentials until succesfull
  $teller = 1
  while (($wmi -eq $null) -and ($teller -lt 4)){
     Write-Host (get-date -uformat %I:%M:%S) "Enter Credentials for $vm. This is try $teller, with a maximum of 3 tries." -Foregroundcolor Red 
	 $wmi = get-wmiobject -class "Win32_DiskPartition" -namespace "root\CIMV2" -ComputerName $vm -Credential Administrator
  foreach ($objItem in $wmi){
    $Details = "" | Select-Object VMName, Partition, Status, StartingOffSet,Size
    if ($objItem.StartingOffset -eq $null){
	  Write-Host "Checking $vm"
	  $vmview = Get-VM $vm | Get-View
	  $Details.VMName = $vmview.Name
	  $Details.Status = "VM could not be analyzed"
      # Divide StartingOffset by 4096 and round the number to zero decimals
	  # If both numbers are the same then the partition is aligned
	  $divoffset = ($objItem.StartingOffset / 4096)
	  if ([System.Math]::Round($divoffset,0) -eq $divoffset){
	    $Details.VMName = $objItem.SystemName
        $Details.Partition = $objItem.Name
        $Details.Status = "Partition aligned"
	    $Details.StartingOffSet = $objItem.StartingOffset
		$Details.Size = $objItem.Size
        $Details.VMName = $objItem.SystemName
        $Details.Partition = $objItem.Name
        $Details.Status = "Partition NOT aligned"
	    $Details.StartingOffSet = $objItem.StartingOffset
		$Details.Size = $objItem.Size
  $myCol += $Details
$myCol | Export-Csv -NoTypeInformation $csvfile

Aligning VMDK Files

For alignment we'll use the mbralign tool. To do so, follow these steps:

  1. Remove any ESX snapshots from the VM that is to be realigned.
  2. Shut down the VM.
  3. Navigate to the directory of the VM you'd like to realign.
  4. Run the mbralign tool by using the command /root/mbralign <filename>.vmdk (NOTE: you are aligning the .vmdk file).
  5. To verify the virtual disk is now aligned run the mbrscan tool again.
  6. You should now be able to power the VM on.
  7. If the VM uses the grub boot loader (linux), please see appendix A.
  8. If the VM boots properly and you are satisfied with the result, the backup files should be removed from the virtual machine

directory in the datastore. These files end in “-mbralign-backup” and can be removed from the Virtual Center Client datastore browser or from the ESX service console.

Aligning Example

Shutdown the VM and make sure no snapshots exist:

[root@esx01 WINXP01]# ll
total 6676992
-rw-r--r-- 1 root root      82109 Apr 12 16:20 vmware-45.log
-rw-r--r-- 1 root root      69145 Apr 12 16:20 vmware-46.log
-rw-r--r-- 1 root root      66815 Apr 12 16:20 vmware-47.log
-rw-r--r-- 1 root root      81427 Apr 12 16:20 vmware-48.log
-rw-r--r-- 1 root root      54797 Apr 12 16:20 vmware-49.log
-rw-r--r-- 1 root root      62878 Apr 12 16:20 vmware-50.log
-rw-r--r-- 1 root root      64727 Apr 12 20:33 vmware-51.log
-rw-r--r-- 1 root root      97232 May 12 14:29 vmware.log
-rw------- 1 root root 8589934592 May 12 14:29 WINXP01-flat.vmdk
-rw------- 1 root root       8684 Apr 13 22:33 WINXP01.nvram
-rw------- 1 root root        566 Apr 12 16:20 WINXP01.vmdk
-rw-r--r-- 1 root root         43 May 12 13:42 WINXP01.vmsd
-rwxr-xr-x 1 root root       2814 May 12 14:29 WINXP01.vmx
-rw-r--r-- 1 root root       1587 Apr 13 22:33 WINXP01.vmxf

Start the mbralign tool and confirm there are no snapshots:

[root@esx01 WINXP01]# /root/mbralign WINXP01.vmdk
 Part    Type          old LBA    New Start LBA      New End LBA     Length in KB
   P1      07               63               64         16755796          8377866

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 WINXP01.vmdk
Creating a backup of ./WINXP01-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 6 sec.  59.82% read (15.74 mB/s).  59.82% written (15.74 mB/s)
12801 read ops in 2 sec.  98.88% read (46.99 mB/s).  98.88% written (46.99 mB/s)
Working on space not in any partition: Starting to migrate blocks.
100.00 percent complete.  100.00 percent written. .
Making adjustments to ./WINXP01-flat.vmdk.
Adjusting the descriptor file.

[root@esx01 WINXP01]# ll
total 15066688
-rw-r--r-- 1 root root      82109 Apr 12 16:20 vmware-45.log
-rw-r--r-- 1 root root      69145 Apr 12 16:20 vmware-46.log
-rw-r--r-- 1 root root      66815 Apr 12 16:20 vmware-47.log
-rw-r--r-- 1 root root      81427 Apr 12 16:20 vmware-48.log
-rw-r--r-- 1 root root      54797 Apr 12 16:20 vmware-49.log
-rw-r--r-- 1 root root      62878 Apr 12 16:20 vmware-50.log
-rw-r--r-- 1 root root      64727 Apr 12 20:33 vmware-51.log
-rw-r--r-- 1 root root      97232 May 12 14:29 vmware.log
-rw-r--r-- 1 root root 8589935104 May 12 14:38 WINXP01-flat.vmdk
-rw------- 1 root root 8589934592 May 12 14:29 WINXP01-flat.vmdk-mbralign-backup
-rw------- 1 root root       8684 Apr 13 22:33 WINXP01.nvram
-rw------- 1 root root        566 May 12 14:38 WINXP01.vmdk
-rw-r--r-- 1 root root        566 May 12 14:31 WINXP01.vmdk-mbralign-backup
-rw-r--r-- 1 root root         43 May 12 13:42 WINXP01.vmsd
-rwxr-xr-x 1 root root       2814 May 12 14:29 WINXP01.vmx
-rw-r--r-- 1 root root       1587 Apr 13 22:33 WINXP01.vmxf

[root@esx01 WINXP01]# /root/mbrscan WINXP01-flat.vmdk
WINXP01-flat.vmdk p1 (NTFS)    lba:64  offset:32768    aligned:Yes

As you can see, the vmdk file is aligned now and there are two backup files. The VM started successfully so the two backup files van be deleted.

Note: You can run the mbralign utility with several 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.
   --codeview         Show what would be done, then exit.  No changes are made
                      to the file.
   --quiet           Only print warnings and errors (no other status isi
                      printed to screen).
   --debug           Print debug comments.
   --help            Print usage.
   --thereAreNoVmSnapshots  Supcodess the warning message about snapshots and
                             answer YES to the question of whether to continue.

Linux Systems Using GRUB

The following steps are required to make linux machines bootable again:

  1. After realignment, boot from old vmdk or CD (iso)
  2. Use grub to fix stage1.5 and stage2

Example Fixing MBR

grub>find /boot/grub/stage1
(hd0,0) [old, misaligned vmdk file]
(hd1,0) [new, aligned vmdk file]
grub>root (hd1,0)
grub>setup (hd1)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 17 sectors are embedded.
Running "install /boot/grub/stage1 (hd1) (hd1)1+17 p (hd1,0)/boot/grub/stage2 /boot/grub/menu.lst"...

Creating Aligned Disks

To prevent the issue from happening you could also create new disks for new VMs with the partitions already aligned.

OS Disks

Virtual disks to be used as the boot disk can be formatted with the correct offset at the time of creation by connecting the new virtual disk to a running VM before installing an operating system and manually setting the partition offset. For Windows guest operating systems, you might consider using an existing Windows Preinstall Environment boot CD or alternative tools like Bart’s PE CD. To set up the starting offset, follow these steps.

  • Boot the VM with the WinPE CD.
  • Select Start → Run and enter DiskPart.
  • Enter Select Disk0.
  • Enter “create partition primary align=32”

Data Disks

To format virtual disks to be used as the data disk with the correct offset at the time of creation, use DiskPart in the VM. Attach the data disk to the VM. Check that there is no data on the disk and follow these steps:

  • Select Start → Run.
  • Enter diskpart.
  • Enter list disk to determine the disk # for the new data disk.
  • Enter select disk <disk_number> (for example, select disk 1).
  • Enter “create partition primary align=32”.
  • Enter exit to exit the DiskPart utility.
  • Format the data disk as you normally do

Lun Alignment Script

This script can be used to align VMDKs from the console on an ESX server: Please note the following manual actions:

  • Check for enough diskspace since the VMDK files get backupped
  • VM should be running on the host where you run the script
  • After alignment disk mappings other than C: are lost and have to be mapped again manually
  • Remove backup files after manual check
    • For example: rm `ls *mbralign`
Note: because of bugs in newer versions and a different approach you'll need the 5.1 version of the host utilities to use this script.
# Author : Sjoerd Hooft
# Date Initial Version: 27 December 2011
# Comments: sjoerd_warmetal_nl
# Description:
# Script to align the disks of a Virtual Machine
# Recommendations:
# The script is designed for a 120 column terminal.
# The running user must be root.
# Changes:
# Please comment on your changes to the script (your name and email address, line number, description):
# Debug option; uncomment for debugging
# set -x
# Script Variables
HOSTNAME_SHORT=`hostname -s`
BASEDIR=`dirname $0`
WHATAMI=`basename $0`
DATE=`date +%Y%m%d`
# Highlight output on screen
BOLD=`tput bold`
BOLDOFF=`tput sgr0`
# Send all output to logfile; disable if screen output is needed
exec > $LOGFILE 2>&1
# Mail Variables
# Align Variables
# Write down the name of the Virtual Machine to align
if [ -z "$inputvm" ]; then
   echo "Usage $0 Script:"
   echo "--------------------------------------"
   echo "$BOLD $0 <NAME of VM> $BOLDOFF"
   echo "--------------------------------------"
   echo NAME of VM: Name of VM as found in vCenter, case sensitive
functioncheckvm() {
vmxfile=`vmware-cmd -l | grep $inputvm`
checkvmexists=`vmware-cmd -l | grep $inputvm | wc -l`
if [ "$checkvmexists" != "1" ]; then
   echo VMexists is $checkvmexists
   echo VM $inputvm does not exist.
   /usr/local/bin/ -t $EMERGENCY -s "VM $inputvm kan niet gevonden worden. Draait deze wel op deze host?" -f `hostname -s` -r $RELAY
   echo Is $inputvm located on this host? If not please vMotion the VM to this host.
   echo Exiting...
snapshotexist=`vmware-cmd $vmxfile hassnapshot | cut -f3 -d" "`
if [ "$snapshotexist" != "0" ]; then
   echo Snapshotexists is $snapshotexist
   echo VM $inputvm has snapshot, exiting...
echo VM $inputvm does esixt and has no snapshots. Continuing...
functionstopvm() {
vmware-cmd $vmxfile stop trysoft
while [ "$stopstate" != "off" ]
  stopcounter=`expr $stopcounter + 1`
  stopstate=`vmware-cmd $vmxfile getstate | cut -f3 -d" "`
  echo Stopstate = $stopstate and Stopcounter = $stopcounter
  sleep 10
  if [ "$stopcounter" == "60" ]; then
     /usr/local/bin/ -t $EMERGENCY -s "VM $inputvm stopt niet correct. Er zijn nog 10 minuten om de VM te stoppen." -f `hostname -s` -r $RELAY
  if [ "$stopcounter" == "120" ]; then
     Echo "VM $inputvm is niet correct gestopt. Het script wordt afgebroken."
     /usr/local/bin/ -t $REPORT -s "VM $inputvm is niet correct gestopt. Het script wordt afgebroken." -f `hostname -s` -m "`cat $LOGFILE`" -r $RELAY
functionaligndisks() {
# Record time
echo start time is `date +%H%M`
for disks in $(cat $vmxfile | grep vmdk | grep -v vmfs | cut -f2 -d"\"" ); do
  dir=`dirname $vmxfile`
  echo $dir/$disks
  $align --thereAreNoVmSnapshots $dir/$disks
for disks in $(cat $vmxfile | grep vmdk | grep vmfs | cut -f2 -d"\"" ); do
  echo $disks
  $align --thereAreNoVmSnapshots $disks
# Record time
echo end time is `date +%H%M`
functionstartvm() {
vmware-cmd $vmxfile start trysoft
while [ "$startstate" != "1" ]
  startcounter=`expr $startcounter + 1`
  startstate=`vmware-cmd $vmxfile gettoolslastactive | cut -f3 -d" "`
  echo Startstate = $startstate en startcounter = $startcounter
  sleep 10
  if [ "$startcounter" == "60" ]; then
     /usr/local/bin/ -t $EMERGENCY -s "VM $inputvm start niet correct. Er zijn nog 10 minuten om de VM te starten." -f `hostname -s` -r $RELAY
  if [ "$startcounter" == "120" ]; then
     Echo "VM $inputvm is niet correct gestopt. Het script wordt afgebroken."
     /usr/local/bin/ -t $REPORT -s "VM $inputvm is niet correct gestart. Het script wordt afgebroken." -f `hostname -s` -m "`cat $LOGFILE`" -r $RELAY
/usr/local/bin/ -t $EMERGENCY -s "VM $inputvm is aligned en moet handmatig worden gecontroleerd." -f `hostname -s` -r $RELAY
/usr/local/bin/ -t $REPORT -s "Alignment report $inputvm." -f `hostname -s` -m "`cat $LOGFILE`" -r $RELAY
Note: to use the to send email from the ESX service console you need to configure this script

Schedule Alignment with Cron

This script can be scheduled using Cron, this would be the way to schedule it on the 24th of February on 11 AM:

# Start alignment
0 11 24 2 * /usr/local/bin/ vmname01

LUN Alignment Tools

In the past I've evaluated a couple of alignment tools to see which option was better, using the script I wrote above or using paid 3rd party tools. These are my evaluation reports:

Paragon For ESX

I used this week to evaluate Paragon for ESX and am sorry that I have to inform you that the outcome is not positive:

  • Adding disks for alignment is slow and annoying. You can only add one disk per time, and only if the VM is turned off.
  • It is not possible to create projects/tasks so disks can be aligned after business hours
  • There is no user friendly report withe details on of the process, so required reports have to made manually
  • Speed with protection against reboots and file system errors is about 15 GB an hour. Speed without protection against reboots and file system errors is about 40 GB an hour which is still too slow.
  • I couldn't add vCenter as a connection
  • It wouldn't remember individual esx hosts
  • After the second try I was unable to add any connections at all, vcenter or esx servers. I got this error:
    • Can't connect to VMware Infrastructure
      • Exception: InvalidCastException; Name: Unable to cast object of type Vim25Api.VirtualDiskRawMappingVer1Backinginfo to type Vim25Api.VirtualDiskFlatVer2BackingInfo

There were also a few positive points:

  • Installation was very smooth
  • The tool requires just a little bit of free space on the datastore
  • Load on the SAN was quite acceptable during the alignment

Overall I would say that the technique used is very good, but would be better if it would do multiple disks at the same time so the overall speed would improve. I also really miss the option to schedule jobs while the VMs are still running. Using this tool would mean I'd have to get up at night, configure the tool and start the alignment. I would have to wait for it to finish so I can start the VMs before business hours. That makes it unacceptable.

Quest vOptimizer

  • Na installatie en scannen (duur: 1 werkdag) blijkt dat de tool niet kan werken vanaf een machine met meer dan 1 netwerkkaart. Dit stond niet in de documentatie en heeft een volledige dag werk gekost.
  • Indien een job in project mode draait lijkt er geen enkele manier te zijn om te kijken hoever de job is. Dit heeft als vervelend gevolg dat tijdens de voorbereiding en nazorg van een VM (die overigens ook heel lang duren) het niet duidelijk is of de job is vastgelopen of nog ergens actief mee bezig is.
  • In het begin mislukte het sturen van een email met het rapport. Het versturen per email is niet te testen, alleen de verbinding naar de SMTP server. Het is vervolgens dan ook onduidelijk waarom een email niet wordt verstuurd. Het niet verzonden rapport is vervolgens dan nergens in te zien.
  • Bij het gebruik van verschillende credentials moet dit per VM op een omslachtige manier ingesteld worden. Vervolgens kan je niet 1 VM scannen voor alignment, dan gaat de tool gelijk alle VMs scannen. Dit zou misschien nog acceptabel zijn indien je dan door kan werken, dit is niet het geval, de Alignment scan window heeft de focus en wil deze niet loslaten.
  • De tool aligned slechts 2 VMs maximaal tegelijk, en ook nog eens maar 1 disk per keer. Nog zonder backup optie deed de alignment van een VM met 96 GB er 3 uur en 6 minuten over. Een VM met 45 GB deed er 2 uur en 10 minuten over. Dat is tussen de 20 en 30 GB per uur.
  • Ik heb de volgende foutmeldingen gezien:
    • Stage: VmStartupBootImage, Description: Timeout expired when trying to establish connection with Boot image.
    • Errors Count: 2
    • Stage: DatastoreSpaceReclaim, Description: Insufficient free space on datastore to complete operation. VMDK: [04A129_DATA] amsactd02/amsactd02.vmdk, space used on datastore before operation: 53687091200, requested space: 107365235712.
    • Stage: DatastoreSpaceReclaim, Description: Insufficient free space on datastore to complete operation. VMDK: [04A129_DATA] amsactd02/amsactd02_1.vmdk, space used on datastore before operation: 26843545600, requested space: 53682601984.
      • De onderste is ook nog eens incorrect. De desbetreffende datastore heeft genoeg vrije ruimte beschikbaar. Het is niet mogelijk om een andere datastore aan te wijzen voor backup of tijdelijke bestanden.

Je begrijpt denk ik wel dat dit alles bij elkaar niet zo positief is. Vaak werkt de tool niet, als hij werkt is het niet echt gebruikersvriendelijk en hij is traag. Helaas kan ik dus geen positief advies geven. Ik krijg er geen warm gevoel van en heb eigenlijk het idee dat de alignment optie niet “af” is, dat het er meer bij is gezet voor de echte functionaliteit, namelijk storage space reclaiming.

Overigens ben ik wel te spreken over de support en de hulp, nogmaals mijn dank daarvoor.

Determining Alignment On NetApp Filer

You can use a diag command to view the alignment for a specific LUN:

filer01b*> priv set diag
filer01b*> lun alignment show /vol/01B_SATA/01B204_SATA
                Multiprotocol type: vmware
                Alignment: aligned
                Write alignment histogram percentage: 76, 0, 0, 0, 0, 0, 0, 0
                Read alignment histogram percentage: 95, 0, 0, 0, 0, 0, 0, 0
                Partial writes percentage: 19
                Partial reads percentage: 1
Note: In a previous version of this article this was explained wrong. Although applications with specific write patterns can cause spikes in the misaligned sections the overall explanation was wrong.

See here the correct explanation, with thanks to an anonymous contribution on my previous website:

The 8 figures in the histogram row are not about the percentage of overall misalignment, they are about which 512 Byte “sector” of a 4k wafl block got hit the most. Obviously you want to have 100% at the first figure, and all zeroes on the rest. Such a histogram would tell you that everything is aligned perfectly. If you have the highest value on the 7th figure (or 6th?) its probably a misaligned XP or windows 2003 system accessing the LUN. if you have spikes on the 1st and the 7th value, then the LUN is probably a VMware datastore, with some aligned and some misaligned VMs.

How misaligned a LUN is would be determined by the percentage of I/O not in the first figure. However, misalignment is (with the exception of limited cases involving multiple partitions per LUN) a yes/no question, not a question of how much. Generally in a misaligned scenario you will see one or two of the buckets with 90%+ of the I/O. If all of the buckets have a significant percentage, it is more likely that you have an application with a specific write pattern (as is the case with some databases) and not a misaligned partition.

So, the example above is aligned and the example below is misaligned:

                Multiprotocol type: windows
                Alignment: misaligned
                Write alignment histogram percentage: 0, 4, 0, 0, 0, 0, 30, 0
                Read alignment histogram percentage: 0, 94, 0, 0, 0, 0, 0, 0
                Partial writes percentage: 63
                Partial reads percentage: 1
You could leave a comment if you were logged in.
lunaligning.txt · Last modified: 2013/04/20 11:22 by sjoerd