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
Can a LUN be added to more than one spdk_scsi_dev ? #100
Comments
On Jan 17, 2017, at 2:17 AM, naresh-gottumukkala <notifications@github.com<mailto:notifications@github.com>> wrote:
Hi,
From the code it looks like we can not add a lun (i.e a bdev like /dev/ram0) to more than one spdk_scsi_dev. But the spdk_scsi_dev_add_lun function in lib/dev.c is not checking for return status of spdk_scsi_lun_claim(lun) before updating dev and id fields in spdk_scsi_lun structure. Because of this dev and id values of previous spdk_scsi_dev are overwritten by new spdk_scsi_dev and when user tries to add lun to second spdk_scsi_dev it succeeds.
Hi Naresh,
This is a bug. The spdk_scsi_dev code should be checking return status when claiming LUNs.
…-Jim
Since most of the other code depends on lun->dev field like for example spdk_bdev_scsi_report_luns, wrong values are returned.
Our iscsi.conf
[TargetNode1]
TargetName disk1
Mapping PortalGroup1 InitiatorGroup1
LUN0 Malloc0
LUN1 Malloc1
[TargetNode2]
TargetName disk2
Mapping PortalGroup2 InitiatorGroup2
LUN0 Malloc1 # Please note Malloc1 bdev reused
Can some one please confirm the expected behaviour ?
Thanks & Regards,
Naresh
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#100>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABDT6aiXHRIQT0UyqPXfeV6H3G9NOE3rks5rTIcagaJpZM4LlZH8>.
|
Hi Jim, Thanks for confirming. Does that mean a lun can not be added to more than one spdk_scsi_dev ? |
To confirm - with our current design a LUN cannot be added to more than one spdk_scsi_dev. We do not support "shared LUNs" currently, which would require us to emulate SCSI reservations. This is not to say that it would be impossible to do so in the future. |
Thanks a lot Ben. |
We now support creating multiple luns that point at the same bdev, which is mostly the same thing that was requested here. We still do not emulate SCSI or NVMe reservations in the iSCSI and NVMe-oF targets. I'm going to close this bug out. If SCSI or NVMe reservation emulation is necessary, please open a new issue to request it. |
Hi,
From the code it looks like we can not add a lun (i.e a bdev like /dev/ram0) to more than one spdk_scsi_dev. But the spdk_scsi_dev_add_lun function in lib/dev.c is not checking for return status of spdk_scsi_lun_claim(lun) before updating dev and id fields in spdk_scsi_lun structure. Because of this dev and id values of previous spdk_scsi_dev are overwritten by new spdk_scsi_dev and when user tries to add lun to second spdk_scsi_dev it succeeds.
Since most of the other code depends on lun->dev field like for example spdk_bdev_scsi_report_luns, wrong values are returned.
Our iscsi.conf
[TargetNode1]
TargetName disk1
Mapping PortalGroup1 InitiatorGroup1
LUN0 Malloc0
LUN1 Malloc1
[TargetNode2]
TargetName disk2
Mapping PortalGroup2 InitiatorGroup2
LUN0 Malloc1 # Please note Malloc1 bdev reused
Can some one please confirm the expected behaviour ?
Thanks & Regards,
Naresh
The text was updated successfully, but these errors were encountered: