Managing subsystems
As a system administrator, you can add, list, and delete NVMe-oF subsystems by using ceph nvmeof commands.
About this task
Adding a subsystem
ceph nvmeof subsystem add --nqn NQN [--enable-ha] [--max_namespaces MAX_NAMESPACES] [--no-group-append] [--serial_number VALUE] [--dhchap_key KEY_VALUE] [--network-mask SUBNET]
The default --server-port value is 5500.
- --max-namespaces
- The maximum number of namespaces per subsystem default is 256.
Input type: Number
- --serial-number
- If the serial number is not specified, the number is randomly generated.
Input type: String
- --dhchap_key
- Use this flag to add a generated DH-HMAC-CHAP key for use with bidirectional in-band authentication.
Input type: String
- --network-mask
- You can add a network subnet to be associated with an NVMe-oF subsystem during subsystem creation.
These network subnets control the automatic creation and removal of NVMe‑oF listeners on gateways with IP addresses in the specified subnet. The system automatically creates listeners on all NVMe‑oF gateways with IP addresses in the specified subnet.
A network subnet does not need to be associated during subnet creation. For information about creating and managing network subnets after creating a subsystem, see Managing network subnets for auto‑listeners.
[root@host01 ~]# ceph nvmeof subsystem add --nqn nqn.2016-06.io.spdk:cnode1.group1 --serial_number Ceph1230985676540 --dhchap_key DHHC-1:00:abEcb12F100FNlZkIOkv37idpu/notvalid!!si1VQ09KhKv2g: Success
Changing a subsystem authentication key
ceph nvmeof subsystem change_key --nqn NQN --dhchap_key KEY_VALUE
[root@host01 ~]# ceph nvmeof subsystem change_key --nqn nqn.2016-06.io.spdk:cnode1.group1 --dhchap_key DHHC-1:00:abEcb12F100FNlZkIOkv37idpu/notvalid!!si1VQ09KhKv2g: Success
Managing network subnets for auto‑listeners
You can add or remove network subnets associated with an NVMe‑oF subsystem after the subsystem is created. These network subnets control the automatic creation and removal of NVMe‑oF listeners on gateways with IP addresses in the specified subnet.
Procedure
What to do next
ceph nvmeof subsystem list
Listing subsystems
ceph nvmeof subsystem list --gw_group GW_GROUP --server-address SERVER_ADDRESS
[root@host01 ~]# ceph nvmeof subsystem list +-----------------------------------+------------------+--------------------+---------------+-------+--------------+--------------+--------------+-------------------+ |Nqn |Serial Number |Model Number |Namespace Count|Subtype|Max Namespaces|Has Dhchap Key|Allow Any Host|Created Without Key| +-----------------------------------+------------------+--------------------+---------------+-------+--------------+--------------+--------------+-------------------+ |nqn.2016-06.io.spdk:cnode1.mygroup1|Ceph21415707139038|Ceph bdev Controller|16 |NVMe |1024 |False |True |False | |nqn.2016-06.io.spdk:cnode2.mygroup1|Ceph99777976460780|Ceph bdev Controller|16 |NVMe |1024 |False |True |False | |nqn.2016-06.io.spdk:cnode3.mygroup1|Ceph1340674839888 |Ceph bdev Controller|16 |NVMe |1024 |False |True |False | |nqn.2016-06.io.spdk:cnode4.mygroup1|Ceph3747224959823 |Ceph bdev Controller|16 |NVMe |1024 |False |True |False | |nqn.2016-06.io.spdk:cnode6 |Ceph34173147934206|Ceph bdev Controller|0 |NVMe |4096 |False |False |False | +-----------------------------------+------------------+--------------------+---------------+-------+--------------+--------------+--------------+-------------------+
Deleting a subsystem
ceph nvmeof subsystem del [--nqn NQN] [--force] --gw_group GW_GROUP --server-address SERVER_ADDRESS
[root@host01 ~]# ceph nvmeof subsystem del --nqn nqn.2016-06.io.spdk:cnode1.group1 --force Success