This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 726856 - Better warning instead of 'Warning: The resulting partition is not properly aligned for best performance.'
Better warning instead of 'Warning: The resulting partition is not properly a...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
: FutureFeature, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-29 20:17 EDT by David Kovalsky
Modified: 2016-05-26 18:00 EDT (History)
4 users (show)

See Also:
Fixed In Version: parted-3.2-19.fc25
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-26 18:00:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description David Kovalsky 2011-07-29 20:17:46 EDT
I'm trying to add a partition to 1.5 TB disk (with 1TB allocated already) with GPT label, but I keep getting this:
"Warning: The resulting partition is not properly aligned for best performance.".

What's really annoying is that even though I started parted with 'a optimal' parted doesn't align the partition properly, doesn't even say what exactly is wrong, how much is it off. 

Since it has some logic to figure out what's wrong, I'd love to see parted suggest how or ideally automagically align the new partition. Otherwise the message is close to useless, unless one wants to dig deep into the internals.

If this is too much to ask for an update release, could parted at least print out how it got that the partition is not aligned to help the user figure out how to make it better?


parted-2.1-14.el6.x86_64
Comment 1 Brian Lane 2011-08-01 14:18:37 EDT
A change like this would need to go into the upstream parted first. I agree, the message really is noise most of the time and needs to be more explicit.
Comment 2 Andrew McNabb 2011-09-26 12:35:48 EDT
Have any reports about this been sent upstream yet? And incidentally, I can't seem to find any documentation about what the proper alignment rules are.
Comment 3 Brian Lane 2011-09-26 13:33:44 EDT
I have this on my list of stuff to look at eventually.
Comment 4 Oliver Henshaw 2011-11-30 11:53:32 EST
Think this is related, though it might be a separate bug:

When using the default optimal alignment, parted seems to align to minimal boundaries but checks against optimal boundaries. (But you can still get optimal alignment if you know that optimal alignment means starting at 1M, which is nice but renders 'a optimal' slightly futile.)


$ dd if=/dev/zero of=fs.img bs=1M count=10
...
$ parted -s fs.img mklabel msdos
$ parted -s fs.img mkpart primary 0M 10M
Warning: The resulting partition is not properly aligned for best performance.
$ parted -s fs.img print
Model:  (file)
Disk /path/to/fs.img: 10.5MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End     Size    Type     File system  Flags
 1      512B   10.5MB  10.5MB  primary

$ parted -s fs.img rm 1
$ parted -s fs.img mkpart primary 1M 10M
$ parted -s fs.img print
Model:  (file)
Disk /path/to/fs.img: 10.5MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  10.5MB  9437kB  primary

$ parted -s fs.img rm 1
$ parted -s -a min fs.img mkpart primary 0M 10M
$ parted -s fs.img print
Model:  (file)
Disk /path/to/fs.img: 10.5MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End     Size    Type     File system  Flags
 1      512B   10.5MB  10.5MB  primary
Comment 5 Oliver Henshaw 2011-11-30 12:01:18 EST
Also this issue is slightly hidden because parted rounds to the nearest unit:

$ parted -s fs.img mkpart p 1.1M 10M
$ parted -s fs.img unit kb print
...
 1      1049kB  10486kB  9437kB  primary

$ parted -s fs.img mkpart p 1.9M 10M
$ parted -s fs.img unit kb print
...
 1      2097kB  10486kB  8389kB  primary

$ parted -s fs.img mkpart p 1100k 10M
Warning: The resulting partition is not properly aligned for best performance.
$ parted -s fs.img unit kb print
...
 1      1100kB  10486kB  9386kB  primary

$ parted -s fs.img mkpart p 1900k 10M
Warning: The resulting partition is not properly aligned for best performance.
$ parted -s fs.img unit kb print
...
 1      1900kB  10486kB  8586kB  primary
Comment 7 Brian Lane 2015-10-28 15:23:54 EDT
Finally got around to looking at this. Proposed patch: https://github.com/bcl/parted/pull/2

The error would now look something like:

Warning: The resulting partition is not properly aligned for best performance: 20483s % 2048s != 0s
Comment 8 Fedora Update System 2016-04-12 20:32:02 EDT
parted-3.2-19.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-25836bb5b0
Comment 9 Fedora Update System 2016-04-13 17:23:46 EDT
parted-3.2-19.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-25836bb5b0
Comment 10 Fedora Update System 2016-04-18 13:26:36 EDT
parted-3.2-19.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.