# Native ISCSI initiator and comstar



## futhwo (Sep 9, 2014)

I was trying to connect, using the new iscsid implementation, to an iSCSI target created on a Nexenta machine using comstar. The LUN never gets online:


```
# camcontrol devlist -v
<CUT>
<  >                               at scbus9 target 0 lun 0 (probe0)
```

And in the syslog *I* see several occurrences of those messages:


```
kernel: WARNING: xyz.xyz.eu (iqn.2014-06.eu.xyz:xyz): connection error; reconnecting
scsid[18540]: xyz.xyz.eu (iqn.2014-06.eu.xyz:xyz): received final login response without the "T" flag.
```

I tried several authentication approaches (no auth, monodirectional CHAP, bidirectional CHAP) with the same result.

Has anyone managed to mount a LUN from a comstar target using iscsid?


----------



## futhwo (Sep 9, 2014)

Addenda: on FreeBSD 10 even using the old iscontrol and iscsi_initiator kernel module *I* can get to connect but the device file for the LUN is not seen:


```
# camcontrol devlist -v 
<CUT>
<NEXENTA COMSTAR\011 1.0>          at scbus8 target 0 lun 0 (pass3)
```
*T*his is the syslog:

```
2014-09-09T17:28:21.818780+02:00 bsd10 devd: Processing event '!system=DEVFS subsystem=CDEV type=CREATE cdev=iscsi0'
2014-09-09T17:28:21.818800+02:00 bsd10 devd: Pushing table
2014-09-09T17:28:21.818809+02:00 bsd10 devd: Processing notify event
2014-09-09T17:28:21.818917+02:00 bsd10 devd: Popping table
2014-09-09T17:28:21.821029+02:00 bsd10 iscontrol[8274]: running
2014-09-09T17:28:21.822140+02:00 bsd10 devd: Processing event '!system=DEVFS subsystem=CDEV type=CREATE cdev=pass3'
2014-09-09T17:28:21.822158+02:00 bsd10 devd: Pushing table
2014-09-09T17:28:21.822165+02:00 bsd10 devd: Processing notify event
2014-09-09T17:28:21.822246+02:00 bsd10 devd: Popping table
2014-09-09T17:28:21.823007+02:00 bsd10 iscontrol[8274]: (pass3:iscsi0:0:0:0):  tagged openings now 0
2014-09-09T17:28:21.998737+02:00 bsd10 kernel: 0] ic_init: cam subsystem initialized
```
Meanwhile, on a FreeBSD 8.2, using the iscontrol and iscsi_initiator kernel modules *I* get to see the block device:


```
# camcontrol devlist -v
scbus0 on ciss0 bus 0:
<CUT>
<NEXENTA COMSTAR 1.0>              at scbus2 target 0 lun 1 (pass1,da1)
```

While on a FreeBSD 9.0, always using iscontrol, *I* cannot see it:


```
# camcontrol devlist -v
<CUT>
<NEXENTA COMSTAR\011 1.0>          at scbus4 target 0 lun 0 (pass2)
```

and the syslog says:


```
Sep  9 17:24:36 bsd9 kernel:(probe0:iscsi0:0:0:0): Vendor Specific Command. CDB: 0 0 0 0 0 0
Sep  9 17:24:36 bsd9 kernel:(probe0:iscsi0:0:0:0): CAM status: SCSI Status Error
Sep  9 17:24:36 bsd9 kernel:(probe0:iscsi0:0:0:0): SCSI status: Check Condition
Sep  9 17:24:36 bsd9 kernel:(probe0:iscsi0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid command operation code)
```

I am starting to become desperate about my project of storage consolidation with an OpenSolaris NAS and freebsd FreeBSD machines.


----------



## mav@ (Sep 10, 2014)

I think I've reproduced it. Some problem with iSCSI login stage. FreeBSD initiator thinks that it has logged in, while target still in negotiation stage. Investigating.


----------



## mav@ (Sep 11, 2014)

Fix was committed to FreeBSD HEAD http://svnweb.freebsd.org/changeset/base/271437.


----------

