On Sat, 2017-02-18 at 21:16 +0530, Sriram Popuri wrote:
I am exploring spdk and particularly nvmf_tgt app. I would like to
know how we can add namespaces dynamically.
The app is reading from a conf file during initialization and doesn't
seem to have an option to add namespaces dynamically.
There is a way to add Namespace (spdk_nvmf_subsystem_add_ns), however
that seems to be only during initialization (either through conf or
The NVMe-oF target currently has two distinct modes for its subsystems
- Direct and Virtual. We're working to unify these and make life a bit
simpler for everyone, but for now we'll need to treat them separately.
For direct mode, the subsystem exported is identical to a physical NVMe
subsystem attached to the target system. We're just exporting a
physical device over the network exactly as it is, with the absolute
minimum amount of virtualization required by the NVMe-oF specification.
All commands from the initiator simply pass through the NVMe-oF layer
and are forwarded directly to the backing SSD. In this case, adding
namespaces dynamically requires the backing NVMe SSD to support dynamic
namespaces. If the SSD supports it, then it should work today.
For virtual mode, the NVMe-oF target is exporting a virtualized NVMe
subsystem that may be backed by any type of device. This requires our
target to emulate lots of functionality that the backing device may or
may not actually support. Adding namespaces through the config file is
only for virtual mode. We could of course emulate all of namespace
management in virtual mode, and we definitely should, but the code to
do this has not been implemented yet.
Even if I invoke this api somehow, there are no AER commands
implemented or the relevant log pages (in this case: 04h - Changed
namespace list) so the host can discover the new namespace.
1. AER isn't emulated in virtual mode today, which is a problem. Even
in direct mode AER isn't fully set up today, although we have someone
working on this part now.
Is this in plan and if so when can we expect to see this coming?
SPDK mailing list