Bug 602680

Summary: parted confusing warning creating ext4
Product: Red Hat Enterprise Linux 6 Reporter: Issue Tracker <tao>
Component: partedAssignee: Hans de Goede <hdegoede>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: tao, tgummels
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-30 15:09:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Issue Tracker 2010-06-10 13:14:30 UTC
Escalated to Bugzilla from IssueTracker

Comment 1 Issue Tracker 2010-06-10 13:14:31 UTC
Event posted on 06-09-2010 05:04pm EDT by woodard

Description of problem:
I can't tell if this is a logic error or if it is a bogus warning but it certainly is confusing.

(parted) mkpart primary ext4 0 -1s                                        
Warning: You requested a partition from 0.00B to 1000GB.                  
The closest location we can manage is 17.4kB to 1000GB.
Is this still acceptable to you?
Yes/No? yes     

That makes sense.

(parted) mkpart primary ext4 37s -1s                                       
Warning: You requested a partition from 18.9kB to 1000GB.                 
The closest location we can manage is 18.9kB to 1000GB.
Is this still acceptable to you?
Yes/No? n                                                                 

Notice that these numbers match? That doesn't make sense.

(parted) mkpart primary ext4 36s -1s                                      
Warning: You requested a partition from 18.4kB to 1000GB.                 
The closest location we can manage is 18.4kB to 1000GB.
Is this still acceptable to you?
Yes/No? n                                                                 
(parted) mkpart primary ext4 35s -1s                                      
Warning: You requested a partition from 17.9kB to 1000GB.                 
The closest location we can manage is 17.9kB to 1000GB.
Is this still acceptable to you?
Yes/No? n                                                                 
(parted) mkpart primary ext4 34s -1s                                      
Warning: You requested a partition from 17.4kB to 1000GB.                 
The closest location we can manage is 17.4kB to 1000GB.
Is this still acceptable to you?
Yes/No? y                                                                 
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? c                                                          


How reproducible:
always

Additional info:
parted-2.1-8.el6.x86_64
This event sent from IssueTracker by tgummels  [LLNL (HPC)]
 issue 999883

Comment 2 RHEL Program Management 2010-06-10 13:23:36 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Hans de Goede 2010-06-30 15:09:24 UTC
Hi,

If you were to do a "unit s" command before the mkpart commands so that the
Warning messages printed will be in sectors the results will make a lot more sense.

-1 / -1s translates to the last sector of the disk. But when using a gpt label the last part of the disk is used for the backup gpt, so it cannot be used. The message does not seem logical because the end of the disk and the end of the disk minus the size of the backup gpt both get printed as 1000GB. If you change the printing unit to sectors using: "unit s" you will see that the last sector is the one which is not what you are requesting.

To not get this kind of messages and let parted do its thing wrt aligning partitions for optimal alignment, you could for example use:
mkpart primary ext4 0G 1000G
or more generic:
mkpart primary ext4 0G -1G

Parted will not give the warning if the error is less then 1 "unit" so by using
-1G you are saying put the partition end within 1G of the disk.

Regards,

Hans