diff --git a/Documentation/nvmetcli.txt b/Documentation/nvmetcli.txt index 4c995129f4da0f0c4f786da24939fddd6aef1d36..1f381cc7ad2e5f794b631f2f57d93240b2ae3454 100644 --- a/Documentation/nvmetcli.txt +++ b/Documentation/nvmetcli.txt @@ -198,6 +198,19 @@ IANA assigned default port for NVMe over Fabrics using RDMA: ...> create testnqn -------------- +* or create an FC port. traddr is the WWNN/WWPN of the FC port. +-------------- +...> cd /ports/ +...> create 3 +...> cd 3/ +...> set addr trtype=fc +...> set addr adrfam=fc +...> set addr traddr=nn-0x1000000044001123:pn-0x2000000055001123 +...> set addr trsvcid=none +...> cd subsystems/ +...> create testnqn +-------------- + * Saving the NVMe Target configuration: -------------- ./nvmetcli diff --git a/README b/README index a3d529a4c14c451808fc7cbb626bddf193eac2f0..cd4bd7838637895bb327767c9581492015840130 100644 --- a/README +++ b/README @@ -33,6 +33,12 @@ 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 diff --git a/debian/nvmetcli.examples b/debian/nvmetcli.examples index 966124f2ec58c7083f92aa0772b6b13f4ba4a03c..53ead2f1b8dd8f65a4125a64b06c6cd552b1ad8d 100644 --- a/debian/nvmetcli.examples +++ b/debian/nvmetcli.examples @@ -1,2 +1,3 @@ loop.json rdma.json +fc.json diff --git a/examples/fc.json b/examples/fc.json new file mode 100644 index 0000000000000000000000000000000000000000..e120aef3ddd1852734c81ab200b3fd73dfbdb91f --- /dev/null +++ b/examples/fc.json @@ -0,0 +1,42 @@ +{ + "hosts": [ + { + "nqn": "hostnqn" + } + ], + "ports": [ + { + "addr": { + "adrfam": "fc", + "traddr": "nn-0x1000000044001123:pn-0x2000000055001123", + "treq": "not specified", + "trsvcid": "none", + "trtype": "fc" + }, + "portid": 3, + "referrals": [], + "subsystems": [ + "testnqn" + ] + } + ], + "subsystems": [ + { + "allowed_hosts": [], + "attr": { + "allow_any_host": "1" + }, + "namespaces": [ + { + "device": { + "nguid": "ef90689c-6c46-d44c-89c1-4067801309a8", + "path": "/dev/nvme0n1" + }, + "enable": 1, + "nsid": 1 + } + ], + "nqn": "testnqn" + } + ] +} diff --git a/fc.json b/fc.json new file mode 100644 index 0000000000000000000000000000000000000000..e120aef3ddd1852734c81ab200b3fd73dfbdb91f --- /dev/null +++ b/fc.json @@ -0,0 +1,42 @@ +{ + "hosts": [ + { + "nqn": "hostnqn" + } + ], + "ports": [ + { + "addr": { + "adrfam": "fc", + "traddr": "nn-0x1000000044001123:pn-0x2000000055001123", + "treq": "not specified", + "trsvcid": "none", + "trtype": "fc" + }, + "portid": 3, + "referrals": [], + "subsystems": [ + "testnqn" + ] + } + ], + "subsystems": [ + { + "allowed_hosts": [], + "attr": { + "allow_any_host": "1" + }, + "namespaces": [ + { + "device": { + "nguid": "ef90689c-6c46-d44c-89c1-4067801309a8", + "path": "/dev/nvme0n1" + }, + "enable": 1, + "nsid": 1 + } + ], + "nqn": "testnqn" + } + ] +} diff --git a/nvmetcli b/nvmetcli index 9f7eacf214b750084fa373428fbab4247d364bf9..0ada243a6a7f837105acf995fc8dfd5d00c22ae9 100755 --- a/nvmetcli +++ b/nvmetcli @@ -341,11 +341,11 @@ class UIPortsNode(UINode): class UIPortNode(UINode): ui_desc_addr = { - 'adrfam': ('string', 'Address Family (e.g. ipv4)'), + 'adrfam': ('string', 'Address Family (e.g. ipv4 or fc)'), 'treq': ('string', 'Transport Security Requirements'), - 'traddr': ('string', 'Transport Address (e.g. IP Address)'), + 'traddr': ('string', 'Transport Address (e.g. IP Address or FC wwnn:wwpn)'), 'trsvcid': ('string', 'Transport Service ID (e.g. IP Port)'), - 'trtype': ('string', 'Transport Type (e.g. rdma or loop)'), + 'trtype': ('string', 'Transport Type (e.g. rdma or loop or fc)'), } def __init__(self, parent, cfnode): @@ -455,11 +455,11 @@ class UIReferralsNode(UINode): class UIReferralNode(UINode): ui_desc_addr = { - 'adrfam': ('string', 'Address Family (e.g. ipv4)'), + 'adrfam': ('string', 'Address Family (e.g. ipv4 or fc)'), 'treq': ('string', 'Transport Security Requirements'), - 'traddr': ('string', 'Transport Address (e.g. IP Address)'), + 'traddr': ('string', 'Transport Address (e.g. IP Address or FC wwnn:wwpn)'), 'trsvcid': ('string', 'Transport Service ID (e.g. IP Port)'), - 'trtype': ('string', 'Transport Type (e.g. rdma or loop)'), + 'trtype': ('string', 'Transport Type (e.g. rdma or loop or fc)'), 'portid': ('number', 'Port identifier'), }