units shown are not equal to the units asked for creation

Bug #985882 reported by ceg
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gparted (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

Try to recreate or clone the OS partition on another harddrive of a different size as the original.

GParted shows only an impresize size of the existing partition such as "32.63GB", whereas to create the new partition the exact size in MiB is required.

Hidden in the Properties, gparted does tell the number of sectors in the old partition, but that can't be directly used to create the new partition either. (V 0.7.0)

Use case is not to copy but create two disks with same partiton sizes (only some of them raid partition clones).

--

Suggested fix:

* Also show the (full length) size in MiB in the detailed properties window, since this is the standard allign unit anyway.

ceg (ceg)
description: updated
Matt Fischer (mfisch)
Changed in gparted (Ubuntu):
status: New → Triaged
Revision history for this message
Curtis Gedak (gedakc) wrote :

GParted displays partition sizes using units that try to keep the digits before the decimal place to three or less.

When the Move/Resize or the Copy dialog box is first shown, the current size is shown in mebibytes in the "New size (MiB)" field.

Revision history for this message
ceg (ceg) wrote :

Thanks for the workaround! Having to look into Move/Resize before creating new partitions is still strange, though.
I would expect the required unit numbers are available, at least in the detailed properties of partitions.

Revision history for this message
ceg (ceg) wrote :

Use case was, not to copy but create two disks with same partiton sizes (only some of them raid partition clones).

description: updated
Revision history for this message
Curtis Gedak (gedakc) wrote :

When GParted creates partitions, it uses the size in MiB as a guideline. The size on disk can vary depending upon the setting of the "Align to" drop down box.

See Specifying Partition Alignment
http://gparted.org/display-doc.php?name=help-manual#gparted-specify-partition-alignment

Revision history for this message
ceg (ceg) wrote :

When I had the problem I finally had to turn to CLI-parted to get the proper numbers. Nothing a graphical tool user may like to do, but I could work around the problem that way.

Fortunately, I was using the MiB allignment on all newer disks, so they should have ended up to have the same size as I defined exact MiB, too.

It just feels really wrong if the graphical partitioning tool you are using asks for information in a unit that it can not supply (without going into unrelated modes). It would have been no problem if the info is in the detailed properties. Thus if you could add it there, that would be great.

Revision history for this message
Phillip Susi (psusi) wrote :

I thought there was already a bug about allowing size entry in units other than MiB, but I can't seem to find it now. Allowing entry in sectors sounds like it would fix this.

Revision history for this message
ceg (ceg) wrote :

Can't sectors per MiB be different on different harddisks?
But the LBA size "sectors?" may be the right option for below MiB alligning.

ceg (ceg)
description: updated
Revision history for this message
Curtis Gedak (gedakc) wrote :

> Can't sectors per MiB be different on different harddisks?
> But the LBA size "sectors?" may be the right option for below MiB alligning.

Sector size can vary from the traditional 512 bytes per sector. Hence sectors per MiB can be different on different hard disks. I believe the same can be said for LBA size "sectors".

There are already a few other upstream bug reports that involve allowing different units:

612928 - File size units not consistent with GNOME desktop
https://bugzilla.gnome.org/show_bug.cgi?id=612928

622150 - Support for data entry and display of logical blocks (sectors)
https://bugzilla.gnome.org/show_bug.cgi?id=622150

With this in mind, perhaps this bug report should deal only with adding the size in MiB to the "Partition --> Information" dialog?

Revision history for this message
ceg (ceg) wrote :

Agreed. Thank you!

description: updated
Revision history for this message
ceg (ceg) wrote :

The workarout to see the MiB size in copy/resize dialog does not work with "unknown" partitions (raids containing luks).

description: updated
Revision history for this message
ceg (ceg) wrote :

console workaround to get the size in MiB:

# parted /dev/sda unit MiB print

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.