ceph-nvmeof icon indicating copy to clipboard operation
ceph-nvmeof copied to clipboard

[NVME-RFE] Add capability to NVMe devices are multi attach in namespace list

Open sunilangadi2 opened this issue 11 months ago • 5 comments

created multiple namespaces from single RBD image but based on bdev name, users don't get to know the device is shared or multiattach

So requesting to add multi-attch info in the below output

[root@ceph-sangadi-01-8ugash-node4 ~]# podman run quay.io/ceph/nvmeof-cli:1.0.0 --server-address 10.0.209.48 --server-port 5500 namespace list --subsystem nqn.2016-06.io.spdk:cnode1 Namespaces in subsystem nqn.2016-06.io.spdk:cnode1: ╒════════╤════════════════════════╤═══════════════╤═════════╤═════════╤═════════╤═════════════════════╤═════════════╤═══════════╤═══════════╤════════════╤═════════════╕ │ NSID │ Bdev │ RBD │ RBD │ Image │ Block │ UUID │ Load │ R/W IOs │ R/W MBs │ Read MBs │ Write MBs │ │ │ Name │ Pool │ Image │ Size │ Size │ │ Balancing │ per │ per │ per │ per │ │ │ │ │ │ │ │ │ Group │ second │ second │ second │ second │ ╞════════╪════════════════════════╪═══════════════╪═════════╪═════════╪═════════╪═════════════════════╪═════════════╪═══════════╪═══════════╪════════════╪═════════════╡ │ 1 │ bdev_2544cf12-6ea0- │ nvmeof_pool01 │ image1 │ 10 GiB │ 512 B │ 2544cf12-6ea0-4872- │ 1 │ unlimited │ unlimited │ unlimited │ unlimited │ │ │ 4872-95e9-642fa3628614 │ │ │ │ │ 95e9-642fa3628614 │ │ │ │ │ │ ├────────┼────────────────────────┼───────────────┼─────────┼─────────┼─────────┼─────────────────────┼─────────────┼───────────┼───────────┼────────────┼─────────────┤ │ 2 │ bdev_50ff1ddf-aafc- │ nvmeof_pool01 │ image1 │ 10 GiB │ 512 B │ 50ff1ddf-aafc-40aa- │ 1 │ unlimited │ unlimited │ unlimited │ unlimited │ │ │ 40aa-981e-fb8f8d357c50 │ │ │ │ │ 981e-fb8f8d357c50 │ │ │ │ │ │ ├────────┼────────────────────────┼───────────────┼─────────┼─────────┼─────────┼─────────────────────┼─────────────┼───────────┼───────────┼────────────┼─────────────┤ │ 3 │ bdev_3718e9b9-c42c- │ nvmeof_pool01 │ image2 │ 5 GiB │ 512 B │ 3718e9b9-c42c-4330- │ 1 │ unlimited │ unlimited │ unlimited │ unlimited │ │ │ 4330-bbec-b9ba524aeb2a │ │ │ │ │ bbec-b9ba524aeb2a │ │ │ │ │ │ ├────────┼────────────────────────┼───────────────┼─────────┼─────────┼─────────┼─────────────────────┼─────────────┼───────────┼───────────┼────────────┼─────────────┤ │ 4 │ bdev_7a18802e-1cc2- │ nvmeof_pool01 │ image2 │ 5 GiB │ 512 B │ 7a18802e-1cc2-4fc8- │ 1 │ unlimited │ unlimited │ unlimited │ unlimited │ │ │ 4fc8-8009-9f434caea40b │ │ │ │ │ 8009-9f434caea40b │ │ │ │ │ │ ╘════════╧════════════════════════╧═══════════════╧═════════╧═════════╧═════════╧═════════════════════╧═════════════╧═══════════╧═══════════╧════════════╧═════════════╛

Raised bz for the same please refer for more details https://bugzilla.redhat.com/show_bug.cgi?id=2267875

sunilangadi2 avatar Mar 05 '24 10:03 sunilangadi2

@sunilangadi2 what is the use case of this? Creating more than 1 namespace on the same rbd image seems wrong to me to begin with. Why do you think its required? We already delivered a fix to not allow it, unless forced. https://github.com/ceph/ceph-nvmeof/pull/431. I believe you don't have this in the version you run.

caroav avatar Mar 06 '24 12:03 caroav

@sunilangadi2 what is the use case of this? Creating more than 1 namespace on the same rbd image seems wrong to me to begin with. Why do you think its required? We already delivered a fix to not allow it, unless forced. #431. I believe you don't have this in the version you run.

Thank you for sharing the PR link. Regarding the usage of the force option for implementing the use of the same RBD image for multiple namespaces, it would be beneficial for users to identify which namespace is multi-attached One suggestion is to add a new column with labeled Multi Namespace to the output of the namespace list command. However, I understand that this is a usability enhancement and can be considered on low priority.

sunilangadi2 avatar Mar 12 '24 05:03 sunilangadi2

@sunilangadi2 what is the use case of what you call "multi-attached"? My claim is that it should never happen.

caroav avatar Mar 12 '24 11:03 caroav

@caroav if this should never happen, then i feel we should even never let user use force parameter to make this happen. What is the use case of using force in namespace add command if we never want user to attach multiple namespaces to same RBD image?

rahullepakshi avatar Mar 15 '24 05:03 rahullepakshi

its a good question if we even want to allow it after forcing or not at all. Will add it to upcoming upstream agenda. In any case, this is a low priority item right now.

caroav avatar Mar 17 '24 13:03 caroav