Operating System - HP-UX
1822544 Members
3050 Online
109642 Solutions
New Discussion юеВ

How to kill/terminate an iSCSI client session

 
Declan Mc Kay
Occasional Advisor

How to kill/terminate an iSCSI client session

Hi, I have a server which which is an iSCSI client (initiator) but the iSCSI Server (target) has been disconnected off the network - h/w failure. Problem is the iSCSI client has a dead-session still open which I can't seem to kill/end/terminate and as a result is filling up my syslog with error messages like:-
Apr 18 16:30:26 edi001 iswd[26632]: Unable to connect to destination: 10.252.72.114
I can see that a session is active as follows:-
root@ edi001: /usr/local/bin/lsof-4.64 #/opt/iscsi/bin/iscsiutil -p

Session information
-------------------

Session # 1
------------
Session Instance No. : 0
ISID : 0x800000000000
Target Name : iqn.1992-08.com.netapp:sn.16787761
Target Alias :
No. of Target Addresses : 1

Address # 1
------------
IP Address : 10.252.72.114
iSCSI TCP Port : 3260
iSCSI Portal Group Tag : 2

User Configured:
----------------

Authenticaton Method :
CHAP Method : CHAP_UNI
Initiator CHAP Name :
CHAP Secret :
Header Digest : None,CRC32C (default)
Data Digest : None,CRC32C (default)
root@ edi001: /usr/local/bin/lsof-4.64 #netstat -a | grep 3260
tcp 0 1 edi001.49424 blinky-e1.3260 SYN_SENT
tcp 0 1 edi001.49409 blinky-e1.3260 SYN_SENT
tcp 0 1 edi001.49422 blinky-e1.3260 SYN_SENT
tcp 0 1 edi001.49420 blinky-e1.3260 SYN_SENT
tcp 0 1 edi001.49411 blinky-e1.3260 SYN_SENT
tcp 0 1 edi001.49412 blinky-e1.3260 SYN_SENT
tcp 0 1 edi001.49417 blinky-e1.3260 SYN_SENT

issiutil doesn't seem to have arguments to kill this connection - I have removed the target address from the iscsi-config but still connection persists - it's quite likely a reboot will solve as the config is now empty but this server is servicing customers 24x7 so a reboot for this I would REALLY like to avoid - Appreciate any assistance on this - Thanks
2 REPLIES 2
Pete Randall
Outstanding Contributor

Re: How to kill/terminate an iSCSI client session

No process waiting on I/O completion will respond to interrupts. I suspect that the only resolution will be a reboot.


Pete

Pete
marie-noelle jeanson_1
Trusted Contributor

Re: How to kill/terminate an iSCSI client session

Declan,

There is no simple answer, and there is no option in iscsiutil to solve your problem.

A session is created when the first application open to a target device is executed. Additional opens to the target from other apps will piggyback on the first session for the target. At the driver level, there is no knowledge of who the user is - buffer cache, user app, ... Thus, if a disconnect occurs (for whatever reason), the driver must attempt to relogin. Without doing this, data could be lost - potential data corruption. On a last close for a session, the session is logged out and torn down.

If a target is to be taken offline, then it is necessary for the system administrator to first quiesce host IO activity to the target. This means shutting down all apps with outstanding opens to the target, thus terminating the session. A reboot will resolve the syslog problem, however, opens to the offline target will fail back to the application; and outstanding IOs will be lost.


Good luck,

Marie-Noelle