Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disk size to be smaller than 1GB #14692

Closed
v0tti opened this issue Jan 4, 2024 · 6 comments · Fixed by #16434
Closed

Allow disk size to be smaller than 1GB #14692

v0tti opened this issue Jan 4, 2024 · 6 comments · Fixed by #16434
Assignees
Labels
breaking change This change modifies or removes some previously documented functionality complexity: low Requires minimal effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@v0tti
Copy link
Contributor

v0tti commented Jan 4, 2024

NetBox version

v3.7.0

Feature type

Change to existing functionality

Proposed functionality

I would like to be able to create virtual disks with a size that is smaller than 1GB. Ideally, disk sizes could specified in MB (like memory) or decimal values could be allowed.

Use case

We operate a lot of small VMs that are just PBX appliances. These only need disks of a few MB in size. At the moment we can not model these VMs properly since the smallest disk size possible is 1GB.

Database changes

If the disk size field is changed to represent MB no change to the database is necessary, but existing data would have to be converted during migration. Alternatively, the field could be converted to a decimal field (like vCPUs).

External dependencies

No response

@v0tti v0tti added the type: feature Introduction of new functionality to the application label Jan 4, 2024
@jeremystretch
Copy link
Member

Either approach, changing the atomic unit or converting the value to a decimal, would be a breaking API change. It's unfortunate that you didn't raise this suggestion during the evaluation period ahead of the v3.7 release. We could have considered the change then, but now that v3.7 has been released this would need to wait for a new minor version bump.

That said, even before the introduction of the new VirtualDisk model, the disk attribute on VirtualMachine was always measured in gigabytes, so I'm not sure how much demand there is for the proposed change.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Jan 5, 2024
@ITJamie
Copy link
Contributor

ITJamie commented Jan 8, 2024

one suggestion that could allow this usecase without it making a major breaking change.

add an extra choice field for disk_size_measurement with options of gb/mb/tb with a default of gb. that would allow people who need to use smaller measurements to select mb as the type and use the existing integer field

@jose-d
Copy link
Contributor

jose-d commented Jan 9, 2024

Just noting, that small HDDs are very common for standalone EFI partitions. Checking my datastores and I see lot of ~5MB disks for EFI part. Proxmox/Qemu.

@abrahamvegh
Copy link
Contributor

Came here to file this while, glad to see I’m not the only one, and I have an additional use case:

I use NetBox to document Linode (Akamai) VMs, amongst other things. The storage quotas there are defined in MB, so while in theory documenting a drive in GB is mostly correct, being able to document the actual MB value would be more accurate, and allowing sub-GB values would allow accurate tracking of swap disk size, which is currently impossible (most are 256/512MB).

@jeremystretch jeremystretch added needs milestone Awaiting prioritization for inclusion with a future NetBox release and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Mar 9, 2024
@jeremystretch jeremystretch added status: backlog Awaiting selection for work complexity: low Requires minimal effort to implement labels May 21, 2024
@MalfuncEddie
Copy link

What would be the impact if it was just allowed to be a float number and keep the GB status.

@jeremystretch
Copy link
Member

It would still be a breaking change as the data type would change.

@jeremystretch jeremystretch added the breaking change This change modifies or removes some previously documented functionality label May 29, 2024
@jeffgdotorg jeffgdotorg added this to the v4.1 milestone May 31, 2024
@arthanson arthanson self-assigned this Jun 4, 2024
@jeffgdotorg jeffgdotorg removed the needs milestone Awaiting prioritization for inclusion with a future NetBox release label Jun 5, 2024
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: backlog Awaiting selection for work labels Jul 31, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change This change modifies or removes some previously documented functionality complexity: low Requires minimal effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants