GNU bug report logs - #42559
Reported size of disk rounded

Previous Next

Package: parted;

Reported by: Nicolas Martin <nico.martin <at> gmail.com>

Date: Mon, 27 Jul 2020 14:19:02 UTC

Severity: normal

Done: "Brian C. Lane" <bcl <at> redhat.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42559 in the body.
You can then email your comments to 42559 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#42559; Package parted. (Mon, 27 Jul 2020 14:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Martin <nico.martin <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Mon, 27 Jul 2020 14:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Martin <nico.martin <at> gmail.com>
To: bug-parted <at> gnu.org
Subject: Reported size of disk rounded
Date: Mon, 27 Jul 2020 11:58:07 +0200
[Message part 1 (text/plain, inline)]
Hi,

Using parted-3.1-29
We have a 16TB RAID6 array. Size in GB reported by parted is 16000GB.
The size in MiB is reported as 15251152 MiB which amounts to 15992 GB.

With a 8TB RAID6 array, size is reported as 7992GB. The size in MiB is
consistent with the size in GB.

How come the size is rounded in one case and not the other ?

Since we create partitions programmatically, we need to use an accurate
size.

Which unit or way is recommended to retrieve the size of the disk ?

Regards,

Nicolas Martin
[Message part 2 (text/html, inline)]

Reply sent to "Brian C. Lane" <bcl <at> redhat.com>:
You have taken responsibility. (Tue, 28 Jul 2020 17:04:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Martin <nico.martin <at> gmail.com>:
bug acknowledged by developer. (Tue, 28 Jul 2020 17:04:02 GMT) Full text and rfc822 format available.

Message #10 received at 42559-close <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: 42559-close <at> debbugs.gnu.org
Subject: Re: bug#42559: Reported size of disk rounded
Date: Tue, 28 Jul 2020 10:03:03 -0700
On Mon, Jul 27, 2020 at 11:58:07AM +0200, Nicolas Martin wrote:
> Hi,
> 
> Using parted-3.1-29
> We have a 16TB RAID6 array. Size in GB reported by parted is 16000GB.
> The size in MiB is reported as 15251152 MiB which amounts to 15992 GB.
> 
> With a 8TB RAID6 array, size is reported as 7992GB. The size in MiB is
> consistent with the size in GB.
> 
> How come the size is rounded in one case and not the other ?
> 
> Since we create partitions programmatically, we need to use an accurate
> size.
> 
> Which unit or way is recommended to retrieve the size of the disk ?

When using non-IEC units like MB, GB parted will round the request to
+/- 50% of the unit. Usually it will snap to someplace near what you
expect, but not always, depending on the surrounding partitions.

To specify exact locations use either sectors ('s') or IEC units like
MiB, GiB, etc.

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 26 Aug 2020 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.