Digged deeper into this and found the following: /usr/share/setup-tool-backends/scripts/partition.pl scans for empty space by comparing the start of a partition with the end of the previous partition. If these are not on subsequent cylinders, the script assumes empty space.
If a partition starts on the same cylinder as its predecessor, the code on line 578 and following assumes an empty space of -1 cylinders. I can see the corresponding size of -504 KB in the XML file that is returned to the GUI frontend. The 4096 GB is probably caused by a signed/unsigned conversion in the GUI frontend, although I did not check that. Changed the test in partition.pl to handle the case of a new partition starting on the same cylinder as its predecessor. All works well now. Patch is attached. ** Attachment added: "Patch: fix partition.pl to not report large empty space when partitions do not end on a cylinder boundary" http://librarian.launchpad.net/4923483/partition_no_cyl_boundary.patch -- partition does not end on cyl boundary -> disks-admin reports fake empty space https://launchpad.net/bugs/67529 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs