On 09/30/2009 04:07 PM, Lewis, Karl wrote:
> 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.

Why do you need to refresh the lun?

If it is because the size or some other setting like cache settings 
changed or you need to add new devices, then you can do

iscsiadm -m session --rescan

This rescans for new disks/devices and it does a rescan on existing 
devices to pick up new settings. The problem is if something like a size 
of the disk changed, you still need to have other layers like 
dm/md/Filesystem pick up the change.

If you need to refresh the device because you want to make sure the 
target is in sync (maybe there are multiple initiators and you are 
worried about some sort of cache accesses) then I probably a 
logout/login is best. I think you can also just something like a sync 
cache command with sg utils or something else, but I am not 100% sure.

And I think someone also might want to logout, because if between the 
time you do snapshots is long then it is a waste to have iscsi running. 
For this I am working on fixing the host number rollover problem. I have 
a patch, but it is not tested well.

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 
For more options, visit this group at http://groups.google.com/group/open-iscsi

Reply via email to