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
two ndctl issues in emulated mode #52
Comments
@jchu314atgithub Both of these are expected, and are quirks of using a 'legacy' or label-less namespace such as one from the memmap-ss!nn option. The size is a property of namespace labels, and so changing the size requires label support. Similarly, when destroying a normal namespace, we edit the labels to invalidate it. For an emulated namespace this is a bit of a no-op (or is equivalent to disabling the namespace). The only thing you can do with emulated namespaces is to change its mode. |
That makes sense, thanks! Just a suggestion for folks unaware of the inner work: |
Yes that is a good suggestion. We recently added a "Theory of operations" section in man pages for namespace operations. We can add some verbiage about label-less/legacy namespaces there. |
Thanks! |
In the ndctl-create-namespace (and related) man pages, add a clarification note regarding some of the restrictions a user may see when operating on label-less namespaces. Link: #52 Reported-by: Jane Chu <jane.chu@oracle.com> Cc: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
The issues are confirmed in Linux 4.17, ndctl version 60+ .
Not sure how serious the issues are, after all they only exists in emulated mode, not on real hardware,
but they cause confusions as the man page doesn't describe behavior deltas.
Details here.
ndctl list -r region0 -Nu <== start out with this 4GiB emulated region
{
"dev":"namespace0.0",
"mode":"fsdax",
"size":"4.00 GiB (4.29 GB)",
"sector_size":512,
"blockdev":"pmem0",
"numa_node":0
}
ndctl create-namespace -e namespace0.0 -f -s 1G <=== fails to reconfig to smaller size
[ 801.103894] nd_pmem namespace0.0: unable to guarantee persistence of writes
[ 801.508475] pmem0: detected capacity change from 0 to 4294967296
[ 801.827661] nd_pmem pfn0.1: unable to guarantee persistence of writes
[ 802.256473] pmem0: detected capacity change from 0 to 4225761280
{
"dev":"namespace0.0",
"mode":"fsdax",
"size":"3.94 GiB (4.23 GB)",
"uuid":"8ab76639-bfc5-4ba5-b7be-8f7755628b0a",
"raw_uuid":"00000000-0000-0000-0000-000000000000",
"sector_size":512,
"blockdev":"pmem0",
"numa_node":0
}
ndctl disable-namespace namespace0.0
disabled 1 namespace
ndctl destroy-namespace namespace0.0
destroyed 1 namespace
ndctl list -n namespace0.0 -iu <====' destroy' doesn't destroy
{
"dev":"namespace0.0",
"mode":"fsdax",
"size":"4.00 GiB (4.29 GB)",
"sector_size":512,
"state":"disabled",
"numa_node":0
}
ndctl create-namespace -f -r region0 -s 2G <=== w/o destroy, create-ns fails for lack of resource
failed to create namespace: Resource temporarily unavailable
ndctl enable-namespace namespace0.0
[ 950.702307] nd_pmem pfn0.1: unable to guarantee persistence of writes
[ 951.145507] pmem0: detected capacity change from 0 to 4225761280
enabled 1 namespace
[root@brm-x4600-03 region0]# ndctl list -n namespace0.0 -iu
{
"dev":"namespace0.0",
"mode":"fsdax",
"size":"3.94 GiB (4.23 GB)",
"uuid":"8ab76639-bfc5-4ba5-b7be-8f7755628b0a",
"raw_uuid":"00000000-0000-0000-0000-000000000000",
"sector_size":512,
"blockdev":"pmem0",
"numa_node":0
}
The text was updated successfully, but these errors were encountered: