Bug 990469

Summary: ARM images have unaligned partitions
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: appliance-toolsAssignee: Dennis Gilmore <dennis>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: agrimm, apevec, ask, dhuff, jdisnard, mattdm, mgoldman, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-10 05:29:34 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 245418    
Attachments:
Description Flags
patch: use pated 'optimal' alignment instead of non-optimal cylinder alignment none

Description Hans de Goede 2013-07-31 05:15:37 EDT
Normally partitions created by either fdisk or parted are aligned to a multiple of 1MiB, so usually a multiple of 2048 sectors, for the F-19 arm images this is not the case, they don't seem to have any alignment at all, which is bad for performance:

[hans@localhost ~]$ sudo fdisk /dev/loop5
Welcome to fdisk (util-linux 2.23.1).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/loop5: 7889 MB, 7889485824 bytes, 15409152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0006ca47

      Device Boot      Start         End      Blocks   Id  System
/dev/loop5p1            1953     1001953      500000+  83  Linux
/dev/loop5p2         1001954     2001953      500000   83  Linux
/dev/loop5p3         2001954    14697265     6347656   83  Linux


This is also what is breaking rottfs-resize, as it re-creates p3 using fdisk which will then properly align
the partition start, making it different from what it was before.
Comment 1 Fedora Admin XMLRPC Client 2014-01-12 14:52:25 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 2 Jon Disnard 2014-03-30 18:01:35 EDT
Created attachment 880547 [details]
patch: use pated 'optimal' alignment instead of non-optimal cylinder alignment

This patch goes with the upstream appliance-tools on fedorahosted:
 
https://git.fedorahosted.org/git/appliance-tools.git

It leverages 'parted -a optimal' instead of 'cylinder' based alignment.

Tested with ARM generated images only, but should be fine for cloud images too.

With optimal alignment, the starting offset of the first partition is 2048, instead of 1953 with cylinder alignment.
Comment 3 Fedora End Of Life 2015-01-09 14:11:45 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Hans de Goede 2015-01-10 05:29:34 EST
This is fixed in F-21.