Bug 209968 - parted should not create dos partitions >2TB
parted should not create dos partitions >2TB
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: parted (Show other bugs)
i386 Linux
medium Severity high
: rc
: ---
Assigned To: Joel Andres Granados
Brock Organ
: OtherQA
Depends On:
  Show dependency treegraph
Reported: 2006-10-09 00:14 EDT by John Newbigin
Modified: 2008-07-24 15:49 EDT (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2008-0698
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-24 15:49:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0698 normal SHIPPED_LIVE parted bug fix update 2008-07-23 11:44:33 EDT

  None (edit)
Description John Newbigin 2006-10-09 00:14:41 EDT
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

Steps to Reproduce:
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 Product and Program Management 2007-11-28 23:24:06 EST
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
Comment 7 David Cantrell 2008-03-14 20:32:16 EDT
Created attachment 298107 [details]
Comment 8 David Cantrell 2008-03-14 20:33:03 EDT
Will be fixed in parted-1.6.19-20.EL and later.
Comment 10 Alexander Todorov 2008-06-03 04:10:06 EDT
a fix for this bug is available in RHEL4-U7 Beta on RHN.
Can you please grab the bits and test this issue.

Comment 11 John Newbigin 2008-06-10 01:55:15 EDT
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 01:57:12 EDT
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 06:07:40 EDT
do you agree with comment #11? If so can you commit the correct patch to cvs. 

Comment 14 David Cantrell 2008-06-10 15:22:46 EDT
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 03:55:26 EDT
Bug in RHEL5 447768 
Comment 20 Joel Andres Granados 2008-06-13 13:26:24 EDT
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 15:02:41 EDT
jn@it.swin.edu.au: the package noted in comment#20 is available from

Are you able to confirm that the updated package fixes the reported issue?
Comment 22 John Newbigin 2008-06-18 22:38:22 EDT
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 15:49:36 EDT
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.


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