From mboxrd@z Thu Jan 1 00:00:00 1970 From: james_p_freyensee@linux.intel.com (J Freyensee) Date: Tue, 02 Aug 2016 16:31:27 -0700 Subject: [PATCH v2] nvme-cli: user-defined hostnqn option for discover In-Reply-To: <7561e238-9063-ceec-2b47-47ffd3607a42@grimberg.me> References: <1469824719-7378-1-git-send-email-james_p_freyensee@linux.intel.com> <1469824719-7378-2-git-send-email-james_p_freyensee@linux.intel.com> <20160801111859.GA28246@infradead.org> <1470087179.6134.51.camel@linux.intel.com> <7561e238-9063-ceec-2b47-47ffd3607a42@grimberg.me> Message-ID: <1470180687.3928.40.camel@linux.intel.com> On Tue, 2016-08-02@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) ??