Bug 726856 - Better warning instead of 'Warning: The resulting partition is not properly aligned for best performance.'
Summary: Better warning instead of 'Warning: The resulting partition is not properly a...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: parted
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-30 00:17 UTC by David Kovalsky
Modified: 2016-05-26 22:00 UTC (History)
4 users (show)

Fixed In Version: parted-3.2-19.fc25
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-26 22:00:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Kovalsky 2011-07-30 00:17:46 UTC
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 18:18:37 UTC
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 16:35:48 UTC
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 17:33:44 UTC
I have this on my list of stuff to look at eventually.

Comment 4 Oliver Henshaw 2011-11-30 16:53:32 UTC
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 17:01:18 UTC
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 19:23:54 UTC
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-13 00:32:02 UTC
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 21:23:46 UTC
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 17:26:36 UTC
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.