Skip to content

JunxiongGuan/nvmetcli

Repository files navigation

nvmetcli
========
This contains the NVMe target admin tool "nvmetcli".  It can either be
used interactively by invoking it without arguments, or it can be used
to save, restore or clear the current NVMe target configuration.

Installation
------------
Please install the configshell-fb package from
https://github.com/agrover/configshell-fb first.

nvmetcli can be run directly from the source directory or installed
using setup.py.

Common Package Dependencies and Problems
-----------------------------------------
nvmetcli uses the 'python-six' and 'pyparsing' packages
(running nvmetcli without these packages may produce
hard-to-decipher errors).

Usage
-----
Look at Documentation/nvmetcli.txt for details.

Example NVMe Target .json files
--------------------------------------
To load the loop + explicit host version above do the following:

  ./nvmetcli restore loop.json

Or to load the rdma + no host authentication version do the following
after you've ensured that the IP address in rdma.json fits your setup:

  ./nvmetcli restore rdma.json

Or to load the fc + no host authentication version do the following
after you've ensured that the port traddr FC address information in
fc.json fits your setup:

  ./nvmetcli restore fc.json

These files can also be edited directly using your favorite editor.

Testing
-------
nvmetcli comes with a testsuite that tests itself and the kernel configfs
interface for the NVMe target.  To run it make sure you have nose2 and
the coverage plugin for it installed and simple run 'make test'.

Development
-----------------
Please send patches and bug reports to [email protected] for
review and acceptance.