linux - How to force iscsid to reconnect target? -


i have installed open-iscsi, , have login several targets. device mounted, , doing io.
want disconnect tcp connection of initiator , target, force iscsid run recovery , reconnect.
how this?

have used tcpkill kill tcp connection, , iscsid run recovery , reconnect target. don't know tcp connection belongs target. if want reconnect target1, may kill tcp connection of target2.
how identify tcp connections targets?

if targets have different ip addresses, can use netstat, , grep port 3260 (iscsi).

$ netstat -nap | grep 3260 (not processes identified, non-owned process info  not shown, have root see all.) tcp        0      0 172.16.10.16:48471          172.16.10.201:3260          established -     

then use tcpkill on local port , destination ip:

$ sudo tcpkill -9 -i eth1 "port 48471 , host 172.16.10.201" 

if targets don't have different ip addresses, looks best way increase logging level of iscsid 2 can see message that's logged when makes connection.

 log_debug(1, "connected local port %s %s:%s",            lserv, conn->host, serv); 

there doesn't appear way initiator-side port out of iscsid.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -