For the system disk that would be the only solution: backup, create new disk with aligned partitions, restore. Using an imaging solution for the backup/restore will be faster.
For additional disks, you can also attach a new vmdk, create aligned partitions on it, and copy all the data.
Then remove the original, unaligned vmdk, check drive letters and you're good to go again.
That is what I was thinking for the system disk as well, but you have me curious about your comment about an imaging solution. Could you expand on that? My thought was to use our backup software EMC Networker to do a tape restore with ASR, but after reading the directions it didn't seem the cleanest or easiest way to go about this.
With an imaging solution i mean something like Ghost, Acronis True Image, Drive snapshot, or any Linux rescue CD you like using the dd command.
Create a new vmdk and create new, aligned partition on the new vmdk, and attach it to the VM.
Boot your VM with a bootable CD or floppy image containing your chosen solution.
Use the imaging solution to copy the unaligned partition over to the new aligned one.(don't copy the disk, or you'll just copy the misalignment as well)
Remove the old vmdk from the VM.
You will probably have to take some additional measures to make the new disk bootable.
When you use a normal backup solution, you'll have to install your guest OS, and then restore your backup on it, which takes quite some time.
I don't know ASR (not even what it is), so cannot comment on that.
That said, there probably isn't much to gain by aligning system partitions; not enough to be worth the trouble anyway.
I usually stick to aligning partitions on the data disks for VMs containing databases, mailservers, and anything disk intensive.
If you only have one disk in your VM, containing both your OS and data, that's another thing, and you may wan to try the above method.
NetApp has a tool called mbralign. It's free, but not readily available yet. If you know somebody at NetApp they may be able to get you a copy. Rumour has it, it may become available on the NOW Toolchest soon. I know the guy who wrote it, and I know the guy who wrote the documentation really, really really, well.
Vizioncore vOptimizer can do it.
Some P2V tools (Vizioncore, PlateSpin) claim to align, but I haven't tested them.
All of these can align a boot disk or data disk, but require down time per VM.
Could you explain the procdure to do this with Ghost please? I've been trying various ways and still cannot get this to work.
I haven't done this myself, but it should be pretty straightforward, like i described in previous post.
Test this on a non-production VM first.
- add a new vmdk to your VM, and create the aligned partition (diskpart on windows)
- restart your VM with your bootable CD containing Ghost or whatever imaging software you use (may need to add drivers for VM scsi adapter)
- copy the unaligned partition from the original vmdk to the aligned partition on the new one (be sure you copy partition to partition and not disk to disk)
- when done, shutdown and remove original VMDK, change SCSI ID of new vmdk to match the old one.
- Boot up the VM (you may need additional work to make the new disk/partition bootable, probably booting it using an installation CD of the installed OS will enable you to fix this)
Or you could download a trial of VMOptimizer and let that handle it, like a previous poster suggested.
Is the realignment process that vOptimizer uses non-destructive to the data in the partition? Can I point it at an existing partition with data, have it do its thing while the VM is offline, and then when it finishes, power on the VM and see that the data is still there?
MBRALIGN from netapp works really well....From what I hear
It is non-destructive. But you have to have room for a copy of the vm (it copies then does it's magic)
Nope. We didn't sabotage it for other people's storage.
Well, actually, we align at 32768 (64 blocks). Some vendors may need to align at 65536 (128 blocks). Check with your vendor or their docs. Or get some NetApp!
mbralign version 1.40090416.
Copyright 2009 NetApp
mbralign - Align MBR partition table based vmdk files to NetApp storage systems
--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 isi
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.
1. use the fdisk command on our ESX Console to allign the Primary Boot/SYSTEM Disk of the operating system to do the alignment corret.
2. use the NetAPP Tool to do the alignment more comfortable
3. use vOptimizer wich does nothing else but using the fdisk on the Console of the ESX Server (doesnt work with ESXi)