On Mon, Jul 9, 2018 at 6:33 PM, Huaisheng HS1 Ye <[email protected]> wrote:
> Hi All,
>
> I want to destroy some redundant namespaces (namespace0.0 and 0.1) from
> my system.
> But it still doesn’t work even I used ‘destroy-namespace’, the result
> of command looks ok, but I still could find them there. How can I remove
> them so they wouldn't appear in next command 'ndctl list'?

Short answer, you can't.

This is a general misconception about what the 'destroy-namespace'
command does. It destroys any info-block metadata and if the namespace
is not a 'seed' device or the 0th device it may additionally delete
the kernel device object. See this comment from the kernel source.

        /*
         * Try to delete the namespace if we deleted all of its
         * allocation, this is not the seed or 0th device for the
         * region, and it is not actively claimed by a btt, pfn, or dax
         * instance.
         */
        if (val == 0 && id != 0 && nd_region->ns_seed != dev && !ndns->claim)
                nd_device_unregister(dev, ND_ASYNC);

The reason we don't delete the seed device is that we always need at
least one seed device to configure the next namespace, and we keep the
0th device around to try to make sure the first namespace in a region
gets the namespaceX.0 device.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to