[parted-devel] Dealing with partitions that overflow the end of the disk

Colin Watson cjwatson at ubuntu.com
Mon Jun 8 15:41:09 UTC 2009


Hi,

I've been beating my head against
https://bugs.launchpad.net/ubuntu/+source/parted/+bug/366282 recently,
and would appreciate some advice as to the correct course of action.

As far as I can tell from the partition tables attached to the bug
report, the disk is slightly less than 14594 cylinders (of 16065 sectors
== 8225280 bytes each), but the manufacturer has created a recovery
partition at the end of the disk that runs right up to the end of the
14594th cylinder, and thus overflows the end of the disk. According to
the bug reporter, the filesystem there actually mounts fine and is
usable - I'm guessing that the bit at the end of the disk is actually
something like the secondary FAT and it doesn't matter so much if it's
missing, but that's just a guess.

I notice that the Linux kernel was recently changed to truncate overlong
partitions at the end of the disk, on the grounds that such partitions
shouldn't be ignored but nevertheless we shouldn't end up creating
invalid block devices:

  http://lkml.org/lkml/2008/10/9/219

Would it make sense for libparted to tolerate overlong partitions at the
end of the disk when reading an existing partition table, but refuse to
*create* such partitions itself? Alternatively (or additionally), maybe
it could have some kind of "fuzz" up to the next cylinder boundary; my
anecdotal impression is that it's not as uncommon as we might like for
broken partitioning tools to round up like that.

Thanks,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the parted-devel mailing list