Hi, I have contacted the author of the Storage vMotion Plugin regarding the feasibility of adding the option to re-align VMs as a part of the Storage vMotion process.
I happen to have my misaligned VMs on Netapp NFS volumes
His first question is which API to use against the Netapp.
My first impression would be to look are the NetApp SRA downloadable from vmware since it provides the VMware + Netapp integration for SRM
Does this make sense?
My first question is what are you trying to align? The Guest OS? Since you're on NFS, I think you mean to align your Guest OS partitions. Maybe someone else has a cool tip, but as far as I know you'll have to backup your disk, re-partition it on the proper aligned sector and then restore the data. I can see some ideas on using the VMware Disk API and some fancy disk utility image to run a partition script on VM boot....but I don't see this being something you can do without downtime on the VM. I'm not sure how you would be able to do this with a SVMotion operation.
Hi Stumpr - thanks for the feedback
By way of background- mbralign (binary) in the netapp_esx_host_utilities_5_1.tar.gz package from netapp operates on the flat vmdk - presumably picking up each block from the source and putting it down with proper alignment.
we want to know answer the question: can the same re-alignment mbralign does be done via SVMotion live?
I'm sure at this point I am blissfully uninformed of the technical reasons this is impossible - but live SVMotion seemed impossible too until I tried it the first time
We'll see if what netapp says about this...
I just had a NetAPP rep telling me how good the Host Tools are getting for ESX. Those are two great utilities, thanks for pointing them out!
However, if you look at how they work, they're just automating the same process. The mbralign requires the VM be powered off. It also describes how it works:
mbralign - This is a tool the provides you with the ability to align a GuestOS's partitions in 4) steps: 1) Shut down the VM 2) Run mbralign 3) Power on the VM 4) Remove the backup file. As you can see above, prior to going thru the process, the tool, makes a backup of the .vmdk and *-flat.vmdk files, creates a new file descriptor .vmdk and properly aligned *-flat.vmdk and copies the data from the old source vmdk to the new destination vmdk. After the process is done you can manually clean up the two backup files created initially.
and a caveat:
There are 2 versions of the mbralign utility. The earlier version (1.2) has does not support multiple partitions. The 1.4 release supports Extended Boot Records (i.e multiple partitions). Mbralign was not included in the Host Utilities Kit (HUK) as it is currently, undergoing extensive QA testing simply because it modifies data and scheduling has prevented engineering from including in the kit.
Definitely very cool since you can skip the step of mounting the disk into another OS for the partitioning process. However, it might be a few revs from full production use (no support for extended boot records in the shipped HUK).
I think my first question for someone who knows more about low level file operations is what happens if you move sectors around on a VM snapshot, then revert it. Will there be any problem from the OS in accessing file descriptors that might potentially be on a different sector from when they were first opened? Assuming the answer is no, then I don't see why you couldn't replace SVMotions copy operation with something like mbralign. I don't think you'll be able to do that with the VMware APIs (you'd have to modify SVMotion source I think).
Of course, you could probably create a script or tool to do these for a VM that is powered off pretty easily.
I love the NetAPP tool though, excited to see them mature a little (having it fully tested and supporting extended boot records would be great). I'm usually building new environments these days and disk alignment is a best practice, but mbralign would save some time when you do have to re-align a VM that is having disk performance issues.
I'd be interested to see if anyone else with more experience with disks had some input.
FYI, Vaughn Stewart of NetApp commented on this being technically challenging due to Guest OS cache
that VMs cannot be aligned without disruption as the GOS cache SCSI
blocks into memory and the realignment process results in files residing
at an adjusted SCSI address which does not match what may be in the GOS
He also hints about future speed ups for realignment currently under NDA