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
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.
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.
I have this on my list of stuff to look at eventually.
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
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
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
parted-3.2-19.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-25836bb5b0
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
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.