You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very useful to support namespace creation using a percentage value of the total region capacity in addition to the current method that supports size as bytes. It saves the user having to perform calculations that can be complex when determining alignment, interleave width, etc. ndctl already performs input argument validation checks when creating namespaces, so we could use the existing functionality and expose it to the user.
Examples:
ndctl create-namespace –size 50% --region 0 // Create a single namespace in region 0 using 50% of the total capacity
ndctl create-namespace –size 50% --continue // Keep creating namespaces of size 50% until we run out of space in all regions (2 namespaces per region)
ndctl create-namespace –size 25%,50%,20%,5% --region 0 // Create 4 namespaces in region 0 using the percentages provided
A new --pct option could be implemented instead of reusing --size
The text was updated successfully, but these errors were encountered:
The size option of the create-namespace command can now take a percentage of
the total region size as the desired size. E.g. :
ndctl create-namespace -s 50%
will create a namespace using half of the total region size, assuming
there is enough available capacity in the region for the request.
Only whole percentages are correctly parsed at the moment e.g. 12%, but
not 12.5%.
Sizes that result in a misaligned size with regards to region alignment
(default 16MB) are rounded down, unless the rounded-up size would result
in using the full remaining region capacity available.
Fixes: pmem#199
Signed-off-by: Vasilis Liaskovitis <[email protected]>
It would be very useful to support namespace creation using a percentage value of the total region capacity in addition to the current method that supports size as bytes. It saves the user having to perform calculations that can be complex when determining alignment, interleave width, etc. ndctl already performs input argument validation checks when creating namespaces, so we could use the existing functionality and expose it to the user.
Examples:
A new
--pct
option could be implemented instead of reusing--size
The text was updated successfully, but these errors were encountered: