Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block device(bdev) can be deleted before deleting namespace under subsystem created from the same. #218

Closed
sunilkumarn417 opened this issue Sep 6, 2023 · 1 comment
Assignees

Comments

@sunilkumarn417
Copy link

Able to delete the block device without removing the namespace created from same bdev.

[root@ceph-2sunilkumar-20z9ez-node6 ~]# podman run -it quay.io/ceph/nvmeof-cli:0.0.3 --server-address 10.0.210.84 --server-port 5500 get_subsystems
INFO:__main__:Get subsystems:
[
    {
        "nqn": "nqn.2014-08.org.nvmexpress.discovery",
        "subtype": "Discovery",
        "listen_addresses": [],
        "allow_any_host": true,
        "hosts": []
    },
    {
        "nqn": "nqn.2016-06.io.spdk:cnode1",
        "subtype": "NVMe",
        "listen_addresses": [],
        "allow_any_host": false,
        "hosts": [],
        "serial_number": "1",
        "model_number": "SPDK bdev Controller",
        "max_namespaces": 32,
        "min_cntlid": 1,
        "max_cntlid": 65519,
        "namespaces": [
            {
                "nsid": 1,
                "bdev_name": "bdev1",
                "name": "bdev1",
                "nguid": "45738EC4206D44DF923477C8089D874F",
                "uuid": "45738ec4-206d-44df-9234-77c8089d874f"
            }
        ]
    }
]

[root@ceph-2sunilkumar-20z9ez-node6 ~]# podman run -it quay.io/ceph/nvmeof-cli:0.0.3 --server-address 10.0.210.84 --server-port 5500 delete_bdev -b bdev1
INFO:__main__:Deleted bdev bdev1: True

[root@ceph-2sunilkumar-20z9ez-node6 ~]# podman run -it quay.io/ceph/nvmeof-cli:0.0.3 --server-address 10.0.210.84 --server-port 5500 get_subsystems
INFO:__main__:Get subsystems:
[
    {
        "nqn": "nqn.2014-08.org.nvmexpress.discovery",
        "subtype": "Discovery",
        "listen_addresses": [],
        "allow_any_host": true,
        "hosts": []
    },
    {
        "nqn": "nqn.2016-06.io.spdk:cnode1",
        "subtype": "NVMe",
        "listen_addresses": [],
        "allow_any_host": false,
        "hosts": [],
        "serial_number": "1",
        "model_number": "SPDK bdev Controller",
        "max_namespaces": 32,
        "min_cntlid": 1,
        "max_cntlid": 65519,
        "namespaces": []
    }
]
@gbregman
Copy link
Contributor

gbregman commented Sep 6, 2023

This is the as issue #145 which was fixed by #208. Now, when deleting a bdev you will get an EBUSY error in case there is a namespace still using it. If you pass the "--force" command line option, such namespaces will get automatically deleted and then the bdev will get deleted.

@gbregman gbregman closed this as completed Sep 6, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NVMe-oF Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants