New iSCSI Stack in 10.x - Prevent hangs on a dead target?
Edward Tomasz Napierała
trasz at FreeBSD.org
Tue Apr 29 08:43:10 UTC 2014
Wiadomość napisana przez Karl Pielorz w dniu 28 kwi 2014, o godz. 23:17:
> Hi,
>
> I've been setting up iSCSI with a couple of 10.x boxes recently (using the new iscsictl / ctld et'al).
>
> This seems to work well - but if I connect to a remote iSCSI target - and that host 'dies' I/O on the local /dev/daX device for that dead target just halts - for what seems to be 'indefinitely'.
>
> In /var/log/messages - I can see the system trying to reconnect (to the dead host) - but I can't see sign (or way of telling it) it to 'give up' and move on after some timeout.
>
> e.g. I have a bunch of iSCSI disks in use with ZFS - this works fine until the remote node dies (which takes half the disks with it).
>
> ZFS just halts all I/O then on the pool - until I do, e.g. 'iscsictl -R -p dead-host-ip'.
>
> Is there any way of setting this on either the initiator (or the target) - it looks like something like iSCSI Time2Retain might cover it - but I can't find anywhere to set that, or anything similar...
In HEAD, there is "kern.iscsi.fail_on_disconnection" sysctl. It's supposed
to be used with gmultipath or ZFS; it basically makes connection error result
in IO error instead of "hang" until successful reconnection. The initiator will
still try to reconnect; when it succeeds, the disk devices will reappear.
Would that solve your problem?
More information about the freebsd-scsi
mailing list