-
Notifications
You must be signed in to change notification settings - Fork 636
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
nvme disconnect -d fails to disconnect nvme block device #563
Comments
I think that was intentional due to the namespace and character name swizzling. I'll double check with the author. |
Okay, the removal is done by writing to /sys/class/nvme/nvme/delete_controler, but you can't get to that unique path from a namespace handle with multipathing because the namespace may have more than one controller. We wouldn't be able to figure out the intended one to remove from a namespace handle. |
Thanks for looking into the issue @keithbusch. If this change was intentional, then I think this issue can be closed. |
nvme-cli no longer allows to use a path to nvme block device (e.g. /dev/nvme0n1) as an argument to nvme disconnect command. For more details, please see: linux-nvme/nvme-cli#563 To address this issue, change the command that is executed to disconnect a volume from: $ nvme disconnect -d <device> to: $ nvme disconnect -n <subnqn> Change-Id: I51a30825da5e7378ebc1d6f4a12645d73d7feb19 Closes-Bug: #1843431 Signed-off-by: Szczerbik, Przemyslaw <przemyslawx.szczerbik@intel.com>
* Update os-brick from branch 'master' - nvmeof: Use subnqn to disconnect a volume nvme-cli no longer allows to use a path to nvme block device (e.g. /dev/nvme0n1) as an argument to nvme disconnect command. For more details, please see: linux-nvme/nvme-cli#563 To address this issue, change the command that is executed to disconnect a volume from: $ nvme disconnect -d <device> to: $ nvme disconnect -n <subnqn> Change-Id: I51a30825da5e7378ebc1d6f4a12645d73d7feb19 Closes-Bug: #1843431 Signed-off-by: Szczerbik, Przemyslaw <przemyslawx.szczerbik@intel.com>
Issue description
The latest version of nvme CLI tool fails to disconnect nvme block device.
Example:
$ nvme disconnect -d /dev/nvme0n1
The command will succeed only if you pass NVMe character device (controller) as an argument.
Example:
$ sudo nvme disconnect -d /dev/nvme0
As far as I can tell, this issue was introduced by commit: 986a935
strcmp()
function in line 986a935#diff-43e749b3fb33e89f12c38df0ad81a1c5R203 returns a non-zero return value, because content ofchar d[64];
array does not contain namespace suffix (i.e.device=nvme0n1 d=nvme0
).Older version of nvme CLI tool used to disconnect the controller when you passed a path to nvme block device.
nvme CLI help snippet
Version Information
Steps to reproduce
Logs from nvme CLI 1.7
Could you clarify whether this change was intentional?
Thanks for help,
Przemek
The text was updated successfully, but these errors were encountered: