Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
This bug was initially created as a copy of Bug #1744668
I am copying this bug because:
Description of problem:
nvme disconnect-all doesn't work when host has pcie nvme
Version-Release number of selected component (if applicable):
nvme-cli-1.8.1-3.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
[root@rdma-perf-06 ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 1.5T 0 disk
sdb 8:16 0 111.8G 0 disk
sda 8:0 0 111.8G 0 disk
├─sda2 8:2 0 1G 0 part /boot
├─sda3 8:3 0 110.6G 0 part
│ ├─rhel_rdma--perf--06-swap 253:1 0 4G 0 lvm [SWAP]
│ ├─rhel_rdma--perf--06-home 253:2 0 56.6G 0 lvm /home
│ └─rhel_rdma--perf--06-root 253:0 0 50G 0 lvm /
└─sda1 8:1 0 200M 0 part /boot/efi
[root@rdma-perf-06 ~]$ nvme connect -t rdma -a 172.31.40.125 -s 4420 -n testnqn
[root@rdma-perf-06 ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 1.5T 0 disk
sdb 8:16 0 111.8G 0 disk
nvme1n1 259:1 0 250G 0 disk
sda 8:0 0 111.8G 0 disk
├─sda2 8:2 0 1G 0 part /boot
├─sda3 8:3 0 110.6G 0 part
│ ├─rhel_rdma--perf--06-swap 253:1 0 4G 0 lvm [SWAP]
│ ├─rhel_rdma--perf--06-home 253:2 0 56.6G 0 lvm /home
│ └─rhel_rdma--perf--06-root 253:0 0 50G 0 lvm /
└─sda1 8:1 0 200M 0 part /boot/efi
[root@rdma-perf-06 ~]$ nvme disconnect-all
Failed to open /sys/class/nvme/nvme0/delete_controller: No such file or directory
[root@rdma-perf-06 ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 1.5T 0 disk
sdb 8:16 0 111.8G 0 disk
nvme1n1 259:1 0 250G 0 disk
sda 8:0 0 111.8G 0 disk
├─sda2 8:2 0 1G 0 part /boot
├─sda3 8:3 0 110.6G 0 part
│ ├─rhel_rdma--perf--06-swap 253:1 0 4G 0 lvm [SWAP]
│ ├─rhel_rdma--perf--06-home 253:2 0 56.6G 0 lvm /home
│ └─rhel_rdma--perf--06-root 253:0 0 50G 0 lvm /
└─sda1 8:1 0 200M 0 part /boot/efi
Actual results:
Expected results:
Additional info:
Upstream fixed path:
commit 3bfedd3be05c0a443ac93b36105be358de55caf3
Author: Minwoo Im <minwoo.im.dev>
Date: Thu May 16 10:23:49 2019 -0700
nvme-cli: don't try to disconnect for ctrl with pcie transport
If a host system has both pcie and fabrics controllers, the following
nvme-cli disconnect-all command will might not be working because
contrlller with pcie transport does not have delete_controller in sysfs.
root@target:~# nvme list
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1 foo QEMU NVMe Ctrl 1 536.87 MB / 536.87 MB 512 B + 0 B 1.0
/dev/nvme1n1 b92326b9b2323bf0 Linux 1 134.22 MB / 134.22 MB 512 B + 0 B 5.1.0-rc
/dev/nvme2n1 65fa04eddd9bbac0 Linux 1 134.22 MB / 134.22 MB 512 B + 0 B 5.1.0-rc
root@target:~/nvme-cli.git# nvme disconnect-all
Failed to open /sys/class/nvme/nvme0/delete_controller: No such file or directory
This patch checks the transport type of the controller in iteration.
Reviewed-by: Sagi Grimberg <sagi>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni>
Signed-off-by: Minwoo Im <minwoo.im.dev>
diff --git a/fabrics.c b/fabrics.c
index 511de06..733a24b 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -1196,6 +1196,8 @@ int disconnect_all(const char *desc, int argc, char **argv)
for (j = 0; j < subsys->nctrls; j++) {
struct ctrl_list_item *ctrl = &subsys->ctrls[j];
+ if (!strcmp(ctrl->transport, "pcie"))
+ continue;
ret = disconnect_by_device(ctrl->name);
if (ret)
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:1915