Closed Bug 1006111 Opened 11 years ago Closed 11 years ago

ubuntu kickstart needs to generate aligned VMs

Categories

(Infrastructure & Operations :: RelOps: Puppet, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cknowles, Assigned: cknowles)

Details

Per https://mana.mozilla.org/wiki/display/SYSADMIN/VMDK+Alignment - vm alignment is an important performance issue both for the individual VM as well as for the entire netapp filer environment. Noticed when working bug 1002792 that the resultant VM of a puppetagain was not completely aligned. # /opt/ontap/mbrscan taras-ubuntu1.relabs.releng.scl3.mozilla.com-flat.vm dk mbrtools esxi version 1.0 -------------------- taras-ubuntu1.relabs.releng.scl3.mozilla.com-flat.vmdk p1 (Linux) lba:2048 offset:1048576 aligned:Yes taras-ubuntu1.relabs.releng.scl3.mozilla.com-flat.vmdk p2 (EBR ) lba:67110910 offset:34360785920 aligned:No taras-ubuntu1.relabs.releng.scl3.mozilla.com-flat.vmdk e1 (swap) lba:67110912 offset:34360786944 aligned:No The extended and swap partitions aren't aligned. Now, in day-to-day this isn't drop dead if this is all there is, as hopefully swap won't be used that much. However, if the landing of P1 at an aligned boundary is luck, then this could be problematic. per netapp: Linux OS To determine the alignment on Linux: # fdisk -lu In the output for each device, multiply the start by sector size (normally 512 in the fdisk output), and then divide it by 4096. If the result is an integer (whole number), it is ALIGNED, if not, it is MISALIGNED. Example with both aligned and misaligned partitions: # fdisk -lu Disk /dev/sda: 21.4 GB, 21474842112 bytes 255 heads, 63 sectors/track, 2610 cylinders, total 41943051 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/sda1 * 64 208845 104391 83 Linux /dev/sda2 208856 41929660 20860402+ 8e Linux LVM /dev/sda3 * 63 208845 104391 83 Linux sda1: 64 * 512 = 32768 / 4096 = 8 so is ALIGNED sda2: 208856 * 512 = 106934272 / 4096 = 26107 so is ALIGNED sda3: 63 * 512 = 32256 / 4096 = 7.875 so is MISALIGNED obviously, and per IRC, I'm happy to be of help testing/troubleshooting/suggesting solutions. I'll need some newbie help finding the puppetagain kickstart files. CJK
I misspoke slightly in irc. For *CentOS*, I've observed VMs to be created in an aligned fashion. So this issue may be limited to Ubuntu kickstarts. The kickstart profile for all PuppetAgain installs is in infra puppet at modules/pxe/templates/kickstart/profiles/puppetagain.erb if you want to have a look and make a fix. I can take a look when I'm back, too.
aren't you supposed to be dispensing justice? :) I'll take a look, though I'm having trouble finding documentation for partman. Should have been clear - observed this in the ubuntu kickstart, wanted to make sure that we weren't accidentally stressing things all over. CJK
Summary: PuppetAgain needs to generate aligned VMs → ubuntu kickstart needs to generate aligned VMs
Assignee: relops → dustin
clearpart --all --initlabel part / --fstype ext4 --size=1024 --grow --asprimary part swap --fstype swap --size 4096 --asprimary seems to work -- I'll land that. I've re-imaged dustin-test, if you want to verify.
over to you for verification
Assignee: dustin → cknowles
# /opt/ontap/mbrscan dustin-temp-flat.vmdk mbrtools esxi version 1.0 -------------------- dustin-temp-flat.vmdk p1 (Linux) lba:2048 offset:1048576 aligned:Yes dustin-temp-flat.vmdk p2 (swap) lba:75884544 offset:38852886528 aligned:Yes -------------------- So, yes, that one's aligned. I don't see anything in the commands that forces start sectors, which would be where the alignment gets forced. So I'm not convinced we're not just lucky. Thoughts? Comfort for a paranoid sysadmin? CJK
Well, the size of the first partition is alignment-friendly. So I think this should be reliable. It's what we're doing on CentOS.
Alrighty then. Thanks for the explanation and the effort. CJK
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.