I wonder:
a SCSI host is allocated when a device connects, and it's deallocated if a 
device 
disconnects. While (IMHO) the first step is necessary, the second isn't (the 
device may be there, but any attempt to use it could return "no such device" or 
EIO). If device deallocation were delayed and some information about the device 
remembered, it would be possible to assign the same scsi host if the same 
device 
re-connects (my theory). So when repeatedly connecting and disconecting a 
specific 
USB stick, one could use the same SCSI device. That would sound kind of nice.
To get rid of garbage, on could recycle "old unused SCSI hosts" after a 
specific 
number of new connects.

Regards,
Ulrich


On 30 Sep 2009 at 11:08, Mike Christie wrote:

> 
> On 09/29/2009 06:58 PM, Matthew Schumacher wrote:
> > Group,
> >
> > I'm using linux to backup an ISCSI target.  My backup script calls the
> > snapshot function on my iscsi server, then uses open-iscsi to connect to
> > a snapshot target on that server.  The target is backed up, then I
> > logoff the target until the next backup.
> >
> > The problem is that the scsi device number in linux keeps incrementing:
> >
> > scsi13 : iSCSI Initiator over TCP/IP
> > scsi14 : iSCSI Initiator over TCP/IP
> > scsi15 : iSCSI Initiator over TCP/IP
> >
> > Is this cause for concern?  Will it quit on me at some point?  Is there
> 
> It is expected behavior. The X in scsiX is a host number. The linux scsi 
> layer will increment it every time we create a new host. We end up doing 
> a host per session and in your case it looks like your target is doing a 
> session device.
> 
> It will quit at some point. The host number is a unsigned 32 bit int, so 
> once you go through 2^32, the scsi layer will roll over. When that 
> happens the scsi layer's host number allocation algorithm is not very 
> smart and could fail.
> 
> So in practice you probably would not login/logout a of a target 2^32 
> times. But it is possible if you just did loop test and let it run over 
> night.
> 
> 
> > a way to make open-iscsi reuse an old scsi device number?
> >
> 
> No.
> 
> > 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to