> From: Dan Williams [mailto:[email protected]]
> Sent: Tuesday, July 10, 2018 9:42 AM
> 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.
Thanks for your quick reply and detailed explanation, and it looks like
NamespaceX.1 also couldn't be deleted.
dmesg gets information like this,
[72254.583858] nd namespace0.1: (0)
[72254.589424] nd namespace0.1: __size_store: uuid not set
[72254.596454] nd namespace0.1: 0 fail (-6)
That is to say, __size_store exit at here,
/*
* We need a uuid for the allocation-label and dimm(s) on which
* to store the label.
*/
if (uuid_not_set(uuid, dev, __func__))
return -ENXIO;
Cheers,
Huaisheng Ye
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm