On Wed, Jul 26, 2017 at 11:47 AM, Linda Knippers <linda.knippers(a)hpe.com> wrote:
I was creating a namespace on a 4-way interleave set and got an error
I didn't expect:
$ sudo ndctl create-namespace -m sector -s 10G -n number2
Error: '--size=' must align to interleave-width: 4 and alignment: 2097152
did you intend --size=12G?
I think there's a bug in validate_namespace_options().
What's happening is that since I specified my size in units of G,
the function wants the namespace to be 1G * 4 aligned rather than
2M * 4 aligned. I suspect if I specified my size in M, it would
have worked but I can't test that at the moment.
> size_align = max(units, size_align) * ways;
Why is units part of the equation?
Good question, looks like a blatant thinko to me. I think we're good to just do:
size_align *= ways;
However, I still want to make the recommendation in terms of the units
specified for --size, but that calculation should come after the base