64k block alignment - LINUX, blech

defuseme2k

[H]ard|Gawd
Joined
Oct 7, 2004
Messages
1,074
OK so I admit right up front that the most linux exposure I have is the ESX service console, and even at that point I would rather use ESXi... so forgive my ignorance in the forthcoming questions. I also do not care about the back and forth opinions on whether 64k block alignment should or should not be done. There is no reason NOT to do it if you can make it simple (template deployment). I also want to provide an OVF that we can send to customers that are incoming, where we do not provide the OS, but we can perhaps provide a block aligned disk with the partition structure that we use. With Windows this was easy to do, with Linux... it seems to be much more difficult, so far.

I want to "pre" block align a blank RHEL VM (actually several). The main issue is that requirements here where I work state it must be LVM. The installer, for fedora for instance, does not have the ability to block align during the install to my knowlege.

We've attempted to precreate a block aligned partition which works fine, but we could not precreate anything with LVM for some reason. Does anyone know of a way to do this? How do we align post install? GParted doesn't support LVM, which is pretty much my go-to partitioning tool for Windows alignments, etc.
 
I don't really have the answer to your question, but what about ditching LVM altogether, it seems like that would get you closer. Considering that storage is essentially all virtual anyway you don't really need LVM for anything.
 
The main issue is that requirements here where I work state it must be LVM.

Sounds like it is time to engage the exceptioning process where you work to obtain an exception from using LVM for this particular use.

I feel your pain, we're having to go through our rather large infrastructure and remediate the alignment of some of our Linux VMs where I'm working. We have no LVM involved though, and we have a set of steps the Unix team has to use to fix the alignment for any new templates they create. We've already fixed the current templates for them. Learned quite a bit about grub by doing that.
 
Last edited:
Sounds like it is time to engage the exceptioning process where you work to obtain an exception from using LVM for this particular use.

I feel your pain, we're having to go through our rather large infrastructure and remediate the alignment of some of our Linux VMs where I'm working. We have no LVM involved though, and we have a set of steps the Unix team has to use to fix the alignment for any new templates they create. We've already fixed the current templates for them. Learned quite a bit about grub by doing that.

Can you elaborate on this? It appears /boot isn't LVM after all, which should have enough free space to move around some, although I get errors when trying to actually "move" the data. Playing with the free space at the end is OK however.
 
Google View Windows XP Performance Optimization by EMC / VMware, adobe acrobat document. There is a command-line option to align and format the vmdk prior to OS installation, just change your options for partitions and formats obviously. But, that should get you going.

Found it, page 14 in the below document. Run commands from console or SSH client.

http://www.emc.com/collateral/software/white-papers/h7168-performance-optimization-windows-xp-vdi-wp.pdf

Not really going to help with a Linux partition although a nice article.

Have a look at this article here which discusses RHEL
 
There's also vOptimizer Pro which is

"the only product on the market that can perform 64K partition alignments to shrink VMDK files, reclaim over-allocated virtual storage and significantly improve virtual machine (VM) I/O performance. It can cut the cost and time required to manage VMs -- as well as reduce the risks."

how's that for marketing speak?

EDIT: I just googled for "64k partition alignment" +vmware -voptimizer and they are right, there's no other tool out there that Google knows of. That could mean they are innovators, or that the 64k alignment is pretty much irrelevant in practical terms if there's only one product on EARTH that does it.
 
Last edited:
There's also vOptimizer Pro which is

"the only product on the market that can perform 64K partition alignments to shrink VMDK files, reclaim over-allocated virtual storage and significantly improve virtual machine (VM) I/O performance. It can cut the cost and time required to manage VMs -- as well as reduce the risks."

how's that for marketing speak?

EDIT: I just googled for "64k partition alignment" +vmware -voptimizer and they are right, there's no other tool out there that Google knows of. That could mean they are innovators, or that the 64k alignment is pretty much irrelevant in practical terms if there's only one product on EARTH that does it.

It's just that its an incredibly expensive tool when it can be done for free if you know how. You can get quite a bit of performance gain across the ENTIRE SAN with a lot of VMs if you spent the time. A lot of people throw their arms up at it, but I have taken the time to do it. In the end, it was worthwhile, but it does take a lot of work. Right now I'm just trying to align the templates. Once I have a working process, then we can look at modifying all the VMs.
 
It's just that its an incredibly expensive tool when it can be done for free [...] if you spent the time.
See what I did there? What's the payroll cost doing it for "free", over and over?

If I understand this correctly then VMFS is already aligned to the physical hardware. VMDK is aligned to VMFS. Then it becomes an issue of whether the guest OS file system is aligned to the VMDK. Apparently either VMware or Microsoft took care of that for when you create Windows 2008 NTFS within the VMDK, so that's aligned as well. That only leaves you with some other OSes that don't do it, which is why you asked about Linux I presume. ;)

So yeah, spending a chunk of change to align the linux partitions may not be worth it once you get good/fast at doing it manually.
 
So yeah, spending a chunk of change to align the linux partitions may not be worth it once you get good/fast at doing it manually.

I agree. I have finally had some success. I now understand the reasoning behind reinstalling grub, because yeah... it was f'd up after the partition movement. I didn't get it aligned at exactly 64k, I had to move it forward quite a bit, but we're talking about 1.5 mb or something, nothing major. It still divides evenly, etc, so I understand that to mean it is aligned properly.

As far as your reference to payroll or soft costs, yes I suppose that could offset it some. The bigger issue is even something like voptimizer takes an outage while it modifies the VM. You're supposed to be able to schedule it, but I dunno who would trust that. Maybe I would after it ran several times flawlessly.
 
I've found the easiest way to do this is use a new Gparted boot cd. It automatically aligns (unless you turn it off) the partition to the nearest MB. For instance, with a new VM, I'll used Gparted to make the partition - boot the windows CD and let it format it. Works every time.

To realign a disk - boot to Gparted, shrink it a few MB, move the partition forward a few MB, move it back to the beginning. Because Gparted aligns to the nearest MB, it's easy as pie. But it can take a while.
 
I've found the easiest way to do this is use a new Gparted boot cd. It automatically aligns (unless you turn it off) the partition to the nearest MB. For instance, with a new VM, I'll used Gparted to make the partition - boot the windows CD and let it format it. Works every time.

To realign a disk - boot to Gparted, shrink it a few MB, move the partition forward a few MB, move it back to the beginning. Because Gparted aligns to the nearest MB, it's easy as pie. But it can take a while.

Or just create a template and have it working from the get go, creating a template for your OS installs really should be the approach that everyone uses for commonly deployed OS's, not just for aligning disks but also cutting down on deployment time.
 
Or just create a template and have it working from the get go, creating a template for your OS installs really should be the approach that everyone uses for commonly deployed OS's, not just for aligning disks but also cutting down on deployment time.

Obviously.
 
NetApp provides an alignment tool in their tools for ESX servers. mbralign
 
Back
Top