#477333 when a pre-existing DOS label is used on a > 2 TiB disk, partman gets confused

#477333#5
Date:
2008-04-22 13:52:44 UTC
From:
To:
When a pre-existing DOS label is used on a > 2 TiB disk, partman still thinks
it can use the remaining free portion of the disk without replacing the
partition label.

For example, if your disk is 4 TiB in size, but an existing DOS label is
(sub-optimally) occupiing the first 2 TiB [1] partman will propose the
following disk layout (see attachment), which is impossible given the size
limit in DOS labels.

I think the best solution would be to create an hybrid label, but AFAIK
Parted doesn't support this yet.

Or at the least, partman could tell the user what's going on, and offer the
possibility of replacing the whole DOS label with a GPT one.

[1] given that consumer versions of Windows don't support GPT, and the
    enterprise ones support it poorly, I think we'll probably see a lot
    of this.

#477333#12
Date:
2008-04-22 14:37:25 UTC
From:
To:
I would guess that libparted is feeding partman bogus information. Can you
provide the "partman" log for the installation (gzipped please!)?

Cheers,
FJP

#477333#15
Date:
2008-04-22 20:06:56 UTC
From:
To:
Here.
#477333#20
Date:
2008-04-22 21:47:43 UTC
From:
To:
reassign 477333 libparted1.7-1 1.7.1-5.1
tags 477333 d-i
thanks
partman to do guided partitioning and use "largest free space", correct?
If that's the case, then IMO partman has done nothing wrong. It has just
calculated the partitions based on the info provided by parted.

IMO the bug here is in libparted because that should "know" the restrictions
of the various disklabels it supports and should:
- not be telling partman that there is FREE SPACE above 2199020382720 [1]
- return an error when asked to create partitions above 2199020382720

The log you supplied clearly shown that libparted does neither.
Therefore reassigning.

Cheers,
FJP

[1] Or whatever the actual limit is.

#477333#27
Date:
2008-04-23 09:43:13 UTC
From:
To:
clone 477333 -1
retitle -1 should warn the user when disk is being wasted due to sub-optimal use of DOS labels on >2TB disk
block -1 477333
reassign -1 partman-auto
thanks

Thanks.  Though, reporting "disk is full, remove partitions so that I can
use more space in the DOS label" is much better than corrupting your data
but still not optimal.

For extra bonus points, it could tell the user that disk space is being
wasted, and that replacing the DOS label with a GPT one would resolve that,
at the cost of losing all data.

Since the typical situation in which this happens is a user migrating from
Windows to Debian, this would make a nice example of what a real OS looks
like ;-)