Open
Description
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