On 08/19/2013 09:10 PM, [email protected] wrote:
> Why: I have some software target, which can be accessed by several
> computers. Now the target A can be accessed by computer-1 and
> computer-2, and the initiator is connecting to computer-1, i want to
> *switch the connection* to computer-2.

Can you just use dm multipath for this? You would have a dm device with
2 paths. One to each target. You would then logout the session you do
not want and dm multipath would switch to using the one you want.



> 
> How: I've used tcpkill to terminate the tcp connecting, in order
> to*trigger the recovery mechanism*. And I have hacked the
> *resolve_address* function to choose computer-2. So after recovery, the
> initiator connects to computer-2. But this method is ugly...
> 
> Question: I have modified some commands in*iscsiadm*, and
> implementing mgmt_ipc_conn_remove function, trying to close the tcp
> connection with session-id and connection-id. But close the socket in
> iscsid never close the tcp connection, the initiator is still
> communication with target using the same tcp connection. Code is
> here: https://gist.github.com/pdu/6265563

You would need to send the logs and a wireshark dump for when you do
this. After a quick glance code looks like it should do what you wanted.
However, if you do a STOP_CONN_TERM call it is going to release some
kernel resources you might not want to release if you plan on using the
session again. Also it might create leaks and kernel oopses depending on
what you do with it later.


> 
> Is this a *BUG* or *by-design*? After close socket in iscsid, should
> trigger the driver to close socket too?
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "open-iscsi" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/open-iscsi.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to