Bug 209968 - parted should not create dos partitions >2TB
Summary: parted should not create dos partitions >2TB
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: parted
Version: 4.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Joel Andres Granados
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-09 04:14 UTC by John Newbigin
Modified: 2008-07-24 19:49 UTC (History)
2 users (show)

Fixed In Version: RHBA-2008-0698
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-24 19:49:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
parted-1.6.19-2TB-limit.patch (2.86 KB, patch)
2008-03-15 00:32 UTC, David Cantrell
no flags Details | Diff
Prevent creating dos partitions > 2TB (2.86 KB, patch)
2008-06-10 05:57 UTC, John Newbigin
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0698 0 normal SHIPPED_LIVE parted bug fix update 2008-07-23 15:44:33 UTC

Description John Newbigin 2006-10-09 04:14:41 UTC
Description of problem:
parted can create dos partitions > 2TB but dos partitions can not be larger than
2TB, so when you reboot, your partitions & FS are broken.

Version-Release number of selected component (if applicable):


How reproducible:
I do not have direct access to a >2TB disk so I can't test, but I have seen this
done.


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
From what I can figure out, when you create the partition, parted tells the
kernel there is a new partition and  it's correct details.  These details are
valid and the partition works.  The partition table however is not correct.  The
partition table can only record partitions up to 2TB in size.

When you reboot, the kernel reads the partition table from the disk and gets the
partition size wrong, the FS then complains because it is too big for the
partition.  This may well cause FS corruption, or at least prevent you from
accessing your new filesystem.

parted should not offer to make a dos partition larger than 2TB.  It should
instead offer to use GPT partitioning.

Comment 1 RHEL Program Management 2007-11-29 04:24:06 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 7 David Cantrell 2008-03-15 00:32:16 UTC
Created attachment 298107 [details]
parted-1.6.19-2TB-limit.patch

Comment 8 David Cantrell 2008-03-15 00:33:03 UTC
Will be fixed in parted-1.6.19-20.EL and later.

Comment 10 Alexander Todorov 2008-06-03 08:10:06 UTC
jn.edu.au,
a fix for this bug is available in RHEL4-U7 Beta on RHN.
Can you please grab the bits and test this issue.

Thanks!

Comment 11 John Newbigin 2008-06-10 05:55:15 UTC
This does not work. There is a mistake in the patch:

if (!part->type & PED_PARTITION_METADATA)

needs to be

if (!(part->type & PED_PARTITION_METADATA))

I will attach the altered patch file

Comment 12 John Newbigin 2008-06-10 05:57:12 UTC
Created attachment 308773 [details]
Prevent creating dos partitions > 2TB

This is a small bugfix over the previous patch

Comment 13 Alexander Todorov 2008-06-10 10:07:40 UTC
David,
do you agree with comment #11? If so can you commit the correct patch to cvs. 

Thanks.

Comment 14 David Cantrell 2008-06-10 19:22:46 UTC
Yes, go with the patch in comment #11.

(Reassigning this to jgranado, who is the new parted maintainer.)

Comment 15 Joel Andres Granados 2008-06-11 07:55:26 UTC
Bug in RHEL5 447768 

Comment 20 Joel Andres Granados 2008-06-13 17:26:24 UTC
The package with the fix in comment #11 will be available in parted-1.6.19-22.EL


Comment 21 James Laska 2008-06-17 19:02:41 UTC
jn.edu.au: the package noted in comment#20 is available from
http://jlaska.fedorapeople.org/parted-1.6.19-22.EL.i386.rpm.  

Are you able to confirm that the updated package fixes the reported issue?

Comment 22 John Newbigin 2008-06-19 02:38:22 UTC
parted-1.6.19-22.EL.i386.rpm seems to work as expected. I have only tested msdos
label type and on a virtual disk but it correctly imposed the 2TB limit. 
Relabling as gpt allows creating partitions larger.

Comment 25 errata-xmlrpc 2008-07-24 19:49:36 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0698.html


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