[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42559: Reported size of disk rounded

From: Brian C. Lane
Subject: 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 C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart

reply via email to

[Prev in Thread] Current Thread [Next in Thread]