On 12/09/2010 03:36 AM, --[ UxBoD ]-- wrote:

The disk according to iscsiadm is showing as offline and the sg_turs command 
does not exist on the server:


No need for sg_turs since we know the device state is offline.

Has the session gone down or been reset by any chance? Could you send me your /var/log/messages? And could you tell me what kernel version you are using? Can you replicate this problem?

The device can go offline because:

1. The user or some app set it to offline by writing to the sysfs file

echo offline > /sys/block/sdX/device/state

Apps normally do not do this, because it prevents IO from being sent tot he device and results in any IO sent to the device being failed with DID_NO_CONNECT.

2. A scsi command timed out causing the scsi eh to run. The scsi had the iscsi layer try some aborts and resets. Those failed. The iscsi layer resorted to dropping the sesison and trying to reconnect. That failed, and after node.session.timeo.replacement_timeout seconds, the iscsi layer gave up and told the scsi layer it failed to recover the disk/session. The scsi layer then offlined the disk.

What should happen from there though, is when we log back in, the iscsi layer will set the devices back to running.

We would know if we hit this because we would see the scsi layer log some message about setting the device to offline and we would see the something about the replacement/recovery timing out.

3. There could be a race with #2 where the iscsi layer signals it is giving up, and while the scsi layer is offlining the devices the iscsi layer could log back into the target and start onlining devices. The two processes then race and we end up with some devices offline and some running.

I am working on fix for this one right now.




Oh yeah, you can work around this by manually setting the path back to running

echo running > /sys/block/sdX/device/state

--
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to