-
Notifications
You must be signed in to change notification settings - Fork 139
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
Force-align namespace size up? #79
Comments
Thanks for the report. Not exactly sure what to do about it. Please read through this reply and see if any of the suggestions would help, or if I'm missing the point. The difficult part is communicating ahead of time how much capacity is going to consumed for alignment and metadata. Does your use case want to create namespaces in "fsdax" or "devdax" mode? Or can it use "raw" mode? I ask because the align feature is only a capability of the "*dax" modes and those require a portion of the namespace capacity to be reserved for metadata. Any metadata reservation is going to be padded up to the next 1GB boundary which is why your size=1G align=1G case fails, and why only 1G of usable capacity is yielded from a size=2G align=1G request. Even without metadata, unless the base region is 1G aligned, you'll always lose misaligned capacity. I believe the disconnect is that the size is specified as the capacity before metadata and alignment space is reserved. Would your use case be improved if there was a way to request the resulting usable capacity was no less than size X? |
we create namespaces either in fsdax or sector mode, the fsdax being the main use case. |
Our case in pmem-csi is working with current implementation without real trouble, so we can close this, unless you prefer to keep it open for some reason. |
Thanks for the follow up! |
Background:
We use libndctl in pmem-csi, and we pre-check/adjust namespace size before namespace creation request to avoid some trouble(s). We have learned that alignement should be 1GB (or we hit issue like described in #76).
Some use,test cases (like csi-sanity) ask for arbitrary/small volume sizes, so we force-align size up to next 1GB-boundary before creation. In serving a <1GB request, pmem-csi request will thus be
size=1G align=1G
, causing libndctl failure to create a namespace, as creation will only succeed for sizes 2GB and up if alignment is 1G.size=2G align=1G
will create namespace, but resulting size will be 1G as libndctl force-aligns size down (and that seems to happen even if request was already at GB-boundary, which is bit counter-intuitive?)In general, with align=1G, the resulting size is always 1GB less than request. Such result is not suitable for pmem-csi as we can not provision volume smaller than was asked. Means, in pmem-csi we have to pre-craft our create request:
That force-aligning before calling libndctl is almost redundant repeating of the alignment part (but in upward direction).
So, what about changing libndctl to start force-aligning upwards?
Isn't it fair to expect that resulting namespace size is at least what was asked, if there is enough space available?
The text was updated successfully, but these errors were encountered: