Support binary units (GiB/TiB) for virtual disk size display #1297

Closed
opened 2026-04-05 23:11:33 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Robertas1975 on 9/8/2025

NetBox version

v4.3.7

Feature type

New functionality

Proposed functionality

NetBox should support displaying virtual disk sizes using binary units (GiB, TiB) in addition to the current decimal units (GB, TB).

Currently, disk sizes stored as MB are rendered as decimal GB values (1 GB = 1000 MB), which causes visual mismatch with most hypervisor platforms (like vCenter, Proxmox, KVM, etc.) that use binary multiples.

Requested improvements:

  • Provide a toggle or configuration option in the UI to display storage sizes using IEC units (e.g., GiB instead of GB).
  • Optionally allow API clients to indicate preferred units when posting or retrieving virtual disk size.
  • Ensure consistent user experience between what is seen in hypervisor tools (e.g., vSphere: 32 GiB) and what is displayed in NetBox (currently: 34.36 GB). It would be more convenient to see the same figures

Default behavior (SI/decimal units) can remain unchanged, but users working with infrastructure tools would benefit from alignment with binary-based units.

Use case

In vSphere (and most hypervisor platforms), virtual disk sizes are reported using binary units — e.g., GiB, MiB, KiB — where 1 GiB = 1,073,741,824 bytes. This is the technically correct digital standard, aligned with how operating systems and file systems allocate and report disk usage.

However, NetBox currently displays disk sizes in SI (decimal) units, where 1 GB = 1,000,000,000 bytes — the so-called marketing approach, commonly used by hard drive vendors to make sizes appear larger.

This difference results in misleading display values when syncing disk sizes from hypervisors. For example:

  • vSphere reports a virtual disk as 33,554,432 KiB = 32 GiB
  • Our automation converts this to 34,360 MB (decimal) before pushing to NetBox
  • NetBox displays this as 34.36 GB, which looks larger than expected

While technically accurate from a decimal perspective, this display misaligns with the numbers shown in hypervisor UIs, Linux command-line tools, and what engineers consider "real" capacity. This leads to:

  • Confusion for administrators comparing systems
  • False alarms during audits (“Why is the disk larger than expected?”)
  • Difficulty when syncing data between NetBox and infrastructure platforms

💡 NetBox positions itself as a system of record for infrastructure. As such, it should follow serious, engineering-oriented standards — not marketing math.

We propose adding an option to:

  • Display storage sizes in binary (IEC) units: KiB, MiB, GiB
  • Let users choose between decimal and binary representations, either globally or per user

This would bring NetBox in line with actual hardware/software reporting conventions and reduce misinterpretation by technical users.

Related discussion:

Database changes

No response

External dependencies

No response

*Originally created by @Robertas1975 on 9/8/2025* ### NetBox version v4.3.7 ### Feature type New functionality ### Proposed functionality NetBox should support displaying virtual disk sizes using **binary units (GiB, TiB)** in addition to the current **decimal units (GB, TB)**. Currently, disk sizes stored as MB are rendered as decimal GB values (1 GB = 1000 MB), which causes visual mismatch with most hypervisor platforms (like vCenter, Proxmox, KVM, etc.) that use **binary multiples**. Requested improvements: - Provide a toggle or configuration option in the UI to display storage sizes using **IEC units** (e.g., GiB instead of GB). - Optionally allow API clients to indicate preferred units when posting or retrieving virtual disk size. - Ensure consistent user experience between what is seen in hypervisor tools (e.g., vSphere: 32 GiB) and what is displayed in NetBox (currently: 34.36 GB). It would be more convenient to see the same figures Default behavior (SI/decimal units) can remain unchanged, but users working with infrastructure tools would benefit from alignment with binary-based units. ### Use case In vSphere (and most hypervisor platforms), virtual disk sizes are reported using **binary units** — e.g., GiB, MiB, KiB — where 1 GiB = 1,073,741,824 bytes. This is the **technically correct digital standard**, aligned with how operating systems and file systems allocate and report disk usage. However, NetBox currently displays disk sizes in **SI (decimal) units**, where 1 GB = 1,000,000,000 bytes — the so-called **marketing approach**, commonly used by hard drive vendors to make sizes appear larger. This difference results in misleading display values when syncing disk sizes from hypervisors. For example: - vSphere reports a virtual disk as **33,554,432 KiB** = **32 GiB** - Our automation converts this to **34,360 MB** (decimal) before pushing to NetBox - NetBox displays this as **34.36 GB**, which looks *larger than expected* While technically accurate from a **decimal perspective**, this display misaligns with the numbers shown in **hypervisor UIs**, **Linux command-line tools**, and what engineers consider "real" capacity. This leads to: - Confusion for administrators comparing systems - False alarms during audits (“Why is the disk larger than expected?”) - Difficulty when syncing data between NetBox and infrastructure platforms --- 💡 **NetBox positions itself as a system of record for infrastructure. As such, it should follow serious, engineering-oriented standards — not marketing math.** We propose adding an option to: - Display storage sizes in **binary (IEC) units**: KiB, MiB, GiB - Let users choose between **decimal** and **binary** representations, either globally or per user This would bring NetBox in line with actual hardware/software reporting conventions and reduce misinterpretation by technical users. Related discussion: - https://github.com/netbox-community/netbox/issues/8897 - https://en.wikipedia.org/wiki/Binary_prefix (why GB ≠ GiB) ### Database changes _No response_ ### External dependencies _No response_
MrUnknownDE added the type: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: featuretype: feature labels 2026-04-05 23:12:07 +02:00
Sign in to join this conversation.
No Label type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#1297