[PATCH v2] nvme-cli: user-defined hostnqn option for discover
J Freyensee
james_p_freyensee at linux.intel.com
Tue Aug 2 16:31:27 PDT 2016
On Tue, 2016-08-02 at 09:48 +0300, Sagi Grimberg wrote:
> > > Any chance you could also send a patch that reads
> > > /etc/nvme/hostnqn
> > > for a default hostnqn so that we can have a persistent one?
> >
> > I'm a tad unclear what is the request? The default hostnqn is
> > buried
> > inside /dev/nvme-fabrics. You want nvme-cli to read out the
> > default
> > hostnqn from /dev/nvme-fabrics and place it in /etc/nvme/hostnqn?
>
> I think Christoph is requesting that when the user doesn't pass a
> hostnqn, nvme-cli will try to read it from a file located in
> /etc/nvme/hostnqn (and if this doesn't exist then go ahead without
> it). This way, the host can have a persistent hostnqn across reboots
> (the driver generates one on module init time).
hmmm...the scenario I set up that found this issue, the host generates
a default hostnqn in the nvme-fabrics driver at init(). And if there
is no --hostnqn flag passed, the /dev/nvme-fabrics driver will use the
default generated by the nvme-fabrics driver at init(). And no
/etc/nvme/hostnqn file gets created or exists currently.
So is the request to have nvme-cli use whatever is in /etc/nvme/hostnqn
(if it exists) over the default in the nvme-fabrics driver? So
preference of hostnqn input would be:
1. --hostnqn flag
2. /etc/nvme/hostnqn
3. default hostnqn generated by nvme-fabrics driver (ex: nqn.2014
-08.org.nvmexpress:NVMf:uuid:a2d7752c-a31b-477a-a003-31a5e1c424a9)
(note 2. may contain a hostnqn different from the default)
??
More information about the Linux-nvme
mailing list