[Stgt-devel] Open connections

Niels de Carpentier stgt
Sun Mar 16 00:25:20 CET 2008


I did some more checking of the connection issue, and the problem is that
the return code of it_destroy_nexus is not checked. In this case it will
return EBUSY, and the connection is never actually removed.

Niels

> I'm having an issue where old connections keep being listed in tgt, while
> they are not in use anymore.
>
> I'm running a diskless system with an iscsi root, which uses open-iscsi as
> the initiator. The initrd mount does the initial mounting, and on the
> final image iscsid is started, which does a reconnect.
>
> After the system has booted, the follow status is available on the target:
>
> Target 1: iqn.2008-04.com.test:storage.front001
>     System information:
>         Driver: iscsi
>         Status: running
>     I_T nexus information:
>         I_T nexus: 1
>             Initiator: front_dom0
>             Connection: 0
>                 IP Address: 10.0.0.84
>         I_T nexus: 2
>             Initiator: front_dom0
>             Connection: 0
>                 IP Address: 10.0.0.84
>     LUN information:
>         LUN: 0
>             Type: controller
>             SCSI ID: deadbeaf1:0
>             SCSI SN: beaf10
>             Size: 0 MB
>             Online: Yes
>             Poweron/Reset: Yes
>             Removable media: No
>             Backing store: No backing store
>         LUN: 1
>             Type: disk
>             SCSI ID: deadbeaf1:1
>             SCSI SN: beaf11
>             Size: 2147 MB
>             Online: Yes
>             Poweron/Reset: No
>             Removable media: No
>             Backing store: /dev/vg_images/frontend001
>         LUN: 2
>             Type: disk
>             SCSI ID: deadbeaf1:2
>             SCSI SN: beaf12
>             Size: 1074 MB
>             Online: Yes
>             Poweron/Reset: No
>             Removable media: No
>             Backing store: /dev/vg_images/frontend001_swap
>     Account information:
>         frontend
>     ACL information:
>         10.0.0.0/24
>
> However, netstat shows only a single connection active:
>
> netstat -an | grep 3260
>
> tcp        0      0 0.0.0.0:3260                0.0.0.0:*
>  LISTEN
> tcp        0      0 10.0.0.17:3260              10.0.0.84:53025
>  ESTABLISHED
> tcp        0      0 :::3260                     :::*
>  LISTEN
>
> If I reboot the iscsi root system without restarting tgtd, the initial
> connect will fail. A logout and a new login is necessary to get a working
> connection in this case.
>
> The following is logged by tgtd during this time:
>
> Mar 15 12:54:58 rbk tgtd: iscsi_task_queue(1437) unexpected cmd_sn
> (0,7551)
> Mar 15 12:55:17 rbk tgtd: iscsi_task_queue(1437) unexpected cmd_sn
> (1,7551)
> Mar 15 12:55:23 rbk tgtd: iscsi_task_queue(1437) unexpected cmd_sn
> (2,7551)
> Mar 15 12:55:42 rbk tgtd: iscsi_task_queue(1437) unexpected cmd_sn
> (3,7551)
>
> I can provide more information on request.
>
> Niels de Carpentier
>
>
>
> _______________________________________________
> Stgt-devel mailing list
> Stgt-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/stgt-devel
>





More information about the stgt mailing list