I'm experimenting with something similar, but it's still in the early planning. In my case, I have several hosts logging into a common target, writing file backups to a directory, then logging out. I planned to snap the backup LUN on the iSCSI target, then mount the snapshot LUN for backup purposes. If I logout/login, I'll increment device numbers in the same fashion, with the same problem Matthew sees.
>From the iSCSI initiator's perspective, is there a recommended method to >refresh the view of the snapped LUN without a logout? Just the basic 'echo - >- - > /sys/class/scsi_host/hostX'? Any ideas on anything more elegant or >changes in my approach would be greatly appreciated. Thanks! Karl Lewis -----Original Message----- From: open-iscsi@googlegroups.com [mailto:open-is...@googlegroups.com] On Behalf Of Mike Christie Sent: Wednesday, September 30, 2009 12:09 PM To: open-iscsi@googlegroups.com Subject: Re: SD Driver incrementing on every snapshot. 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 -~----------~----~----~----~------~----~------~--~---