/iJesse Butler wrote:
> 
> I am trying to troubleshoot why a connection is popping up and down,  
> and finally staying down, with a Linux RHEL 5.2 Open iSCSI / iSER  
> initiator.
> 
> I see various references to "host reset", and finally one looks like  
> the following. It says it succeeded, but this time rather than IO  
> continuing, I see the "Device offlined - not ready after error  
> recovery".
> 
> Do we have any idea what is happening here based upon this console  
> output?  What is "host reset" meant to do, and can we tell how it  
> failed?
> 

Each scsi command has a timeout. You can see it in 
/sys/block/sdX/device/timeout. If a command does not complete with that 
time, the scsi layer fires it's error handler, which basically asks the 
driver to:

1. abort the taask.
2. if 1 fails, reset the lu
3. if 2 fails, reset the bus (iscsi does not do this).
4. if 3 fails, reset the host.

(in newer kernels there is a 2.5 where you can reset the target).

Software iscsi has a weird implementation where it does a host per 
session, and for the host reset we just logout the session and try to 
log in. We should to a target reset, but we do not currently due to bugs.

If we get to #4 and that fails then the scsi layer will offline the devices.

If any of 1-4 is successful in fixing the problem, the scsi layer will 
send some commands to test it out. It will normally send a TUR. If 
eventually get to #4 and the reset succeeds but the TUR fails, then 
devices will be offlined.

So for some reason

1. commands are taking a long time and are timing out. I think the 
default in RHEL is 60 seconds.

2. For some reason the transport seems fine. We can login and out.

3. For some reason the TUR to test the reset is failing.

If you do not have a scsi disk you can enable lots of scsi layer 
debugging by doing

echo -1  > /proc/sys/dev/scsi/logging_level

if you have other scsi or data disks in the system you probably want 
less debugging or it will be a mess.

--~--~---------~--~----~------------~-------~--~----~
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