# iscsi target failure detection



## im_if (Jan 5, 2011)

When an iscsi target fails, the client system doesn't seem to know it:

[cmd=]ls /dev[/cmd] still shows the disk,
[cmd=]df -h[/cmd] still shows the disk info,
and [cmd=]zpool status[/cmd] still shows the disk online.

I need the client to know the iscsi target is gone...

Any ideas?

cheers


----------



## Leroy_van_Logchem (Mar 8, 2011)

I had the same problem, when the iscsi target is taken down (hard power-off) two problems arise:

1) iscontrol tries to reconnect forever - any i/o hangs, so zfs defaults to wait forever
2) iscontrol is notified "trapped signal 30" but only after 60 sec wait

I tried to tackle both:
1) has been solved for now by setting the trap SIGUSR1 to SESS_DISCONNECT.
2) can be done but needs some futher adjustment of the source, quoting Danny Braniss now:



> ..look in the iscsi_target for a sleep(...), and once you find the correct one,
> you could reduce the 60Hz - i think - time out. Hopefuly, the new version of iscontrol
> will have an option/signal to stop trying to reconnect..



So you have to change the source in the meantime.


----------

