* use dedicated storage for scsi_debug LUNs
@ 2015-03-05 15:33 Olaf Hering
2015-03-05 21:22 ` Douglas Gilbert
0 siblings, 1 reply; 7+ messages in thread
From: Olaf Hering @ 2015-03-05 15:33 UTC (permalink / raw)
To: Douglas Gilbert; +Cc: linux-scsi
I'm using scsi_debug to implement and test tools for xen-scsiback. Today
I discovered that each LUN uses the very same storage, as described in
the docs. What would it take to optionally use dedicated storage for
each LUN?
This is how I load scsi_debug:
modprobe scsi_debug add_host=4 dev_size_mb=4 max_luns=4 num_parts=4 num_tgts=4 vpd_use_hostno=1
Olaf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: use dedicated storage for scsi_debug LUNs
2015-03-05 15:33 use dedicated storage for scsi_debug LUNs Olaf Hering
@ 2015-03-05 21:22 ` Douglas Gilbert
2015-03-06 9:11 ` Olaf Hering
0 siblings, 1 reply; 7+ messages in thread
From: Douglas Gilbert @ 2015-03-05 21:22 UTC (permalink / raw)
To: Olaf Hering, Douglas Gilbert; +Cc: linux-scsi
On 15-03-05 10:33 AM, Olaf Hering wrote:
> I'm using scsi_debug to implement and test tools for xen-scsiback. Today
> I discovered that each LUN uses the very same storage, as described in
> the docs. What would it take to optionally use dedicated storage for
> each LUN?
>
> This is how I load scsi_debug:
> modprobe scsi_debug add_host=4 dev_size_mb=4 max_luns=4 num_parts=4 num_tgts=4 vpd_use_hostno=1
Olaf,
Just having a quick look: the fake_storep, dif_storep and
map_storep heaps would need to be per LU; IOWs placed in
struct sdebug_dev_info. Also atomic_rw would need to be
placed in that structure.
To be backward compatible to what the scsi_debug driver
does now (i.e. shares storage) accessor functions might
be employed to hide whether the global or per LU instance
is being handled.
Handling the inevitable ENOMEM errors might be a bit tricky
especially since extra LUs and hosts can be added dynamically
via sysfs.
So it is possible. The stock answer has typically been that
you should probably be using the target subsystem for that.
Thoughts?
Doug Gilbert
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: use dedicated storage for scsi_debug LUNs
2015-03-05 21:22 ` Douglas Gilbert
@ 2015-03-06 9:11 ` Olaf Hering
2015-03-06 12:26 ` Martin K. Petersen
0 siblings, 1 reply; 7+ messages in thread
From: Olaf Hering @ 2015-03-06 9:11 UTC (permalink / raw)
To: Douglas Gilbert; +Cc: linux-scsi
On Thu, Mar 05, Douglas Gilbert wrote:
> So it is possible. The stock answer has typically been that
> you should probably be using the target subsystem for that.
> Thoughts?
Is the target subsystem capable of stacking? What I need for
xen-scsiback is a bunch of true SCSI devices. Due to lack of hardware,
scsi_debug looks like the obvious choice.
I will see if I can come up with a patch. Thanks for your input.
Olaf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: use dedicated storage for scsi_debug LUNs
2015-03-06 9:11 ` Olaf Hering
@ 2015-03-06 12:26 ` Martin K. Petersen
2015-03-06 15:06 ` Olaf Hering
0 siblings, 1 reply; 7+ messages in thread
From: Martin K. Petersen @ 2015-03-06 12:26 UTC (permalink / raw)
To: Olaf Hering; +Cc: Douglas Gilbert, linux-scsi
>>>>> "Olaf" == Olaf Hering <olaf@aepfle.de> writes:
Olaf> On Thu, Mar 05, Douglas Gilbert wrote:
>> So it is possible. The stock answer has typically been that you
>> should probably be using the target subsystem for that. Thoughts?
Olaf> Is the target subsystem capable of stacking? What I need for
Olaf> xen-scsiback is a bunch of true SCSI devices. Due to lack of
Olaf> hardware, scsi_debug looks like the obvious choice.
I agree with Doug. The target code is much more comprehensive than
scsi_debug. You can set up file/disk/ram-backed SCSI LUNs on your
machine without the need for any hardware .
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: use dedicated storage for scsi_debug LUNs
2015-03-06 12:26 ` Martin K. Petersen
@ 2015-03-06 15:06 ` Olaf Hering
2015-03-06 15:28 ` Martin K. Petersen
0 siblings, 1 reply; 7+ messages in thread
From: Olaf Hering @ 2015-03-06 15:06 UTC (permalink / raw)
To: Martin K. Petersen; +Cc: Douglas Gilbert, linux-scsi
On Fri, Mar 06, Martin K. Petersen wrote:
> I agree with Doug. The target code is much more comprehensive than
> scsi_debug. You can set up file/disk/ram-backed SCSI LUNs on your
> machine without the need for any hardware .
Does that target code offer what scsi_debug offers, a bunch of stuff
listable with 'lsscsi'? The latter can be passed to backstores/pscsi.
Olaf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: use dedicated storage for scsi_debug LUNs
2015-03-06 15:06 ` Olaf Hering
@ 2015-03-06 15:28 ` Martin K. Petersen
2015-03-20 12:07 ` Olaf Hering
0 siblings, 1 reply; 7+ messages in thread
From: Martin K. Petersen @ 2015-03-06 15:28 UTC (permalink / raw)
To: Olaf Hering; +Cc: Martin K. Petersen, Douglas Gilbert, linux-scsi
>>>>> "Olaf" == Olaf Hering <olaf@aepfle.de> writes:
Olaf> Does that target code offer what scsi_debug offers, a bunch of
Olaf> stuff listable with 'lsscsi'? The latter can be passed to
Olaf> backstores/pscsi.
Yes.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: use dedicated storage for scsi_debug LUNs
2015-03-06 15:28 ` Martin K. Petersen
@ 2015-03-20 12:07 ` Olaf Hering
0 siblings, 0 replies; 7+ messages in thread
From: Olaf Hering @ 2015-03-20 12:07 UTC (permalink / raw)
To: Martin K. Petersen; +Cc: Douglas Gilbert, linux-scsi
On Fri, Mar 06, Martin K. Petersen wrote:
> >>>>> "Olaf" == Olaf Hering <olaf@aepfle.de> writes:
> Olaf> Does that target code offer what scsi_debug offers, a bunch of
> Olaf> stuff listable with 'lsscsi'? The latter can be passed to
> Olaf> backstores/pscsi.
> Yes.
Indeed, with /backstores/fileio/ and /loopback/.
It would be nice if one could specify a fixed identifier for each fileio
during creation. Right now the symlinks in /dev/disk/by-*/* are all
random. Its not easily possible to map file_or_dev=$file to the
resulting SCSI device.
Olaf
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-03-20 12:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05 15:33 use dedicated storage for scsi_debug LUNs Olaf Hering
2015-03-05 21:22 ` Douglas Gilbert
2015-03-06 9:11 ` Olaf Hering
2015-03-06 12:26 ` Martin K. Petersen
2015-03-06 15:06 ` Olaf Hering
2015-03-06 15:28 ` Martin K. Petersen
2015-03-20 12:07 ` Olaf Hering
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox