NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: iscsifs to a server with >1 targets: ***ERROR*** Bad "ISID": Got 16777217 expected 1.



Hugo Silva wrote:
Hugo Silva wrote:
I'm trying to make a NetBSD iSCSI initiator get along with a FreeBSD iSCSI target.

Things work well when the server only has one target defined:


freebsd-target# cat targets
extent0 /dev/zvol/storage/volumes/vol0 0 6G (* see p.s c.) #extent1 /dev/zvol/storage/volumes/vol1 0 6G (* see p.s c.)

# target        flags   storage         netmask
target0         rw      extent0         0.0.0.0/0
#target1         rw      extent1         0.0.0.0/0


( NetBSD initiator )
initiator# iscsifs -u alice -h $ISCSI_SERVER_ADDR /iscsi/
iscsifs: puffs_mount: "/iscsi/" is a relative path.
iscsifs: puffs_mount: using "/iscsi" instead.


Now, if I uncomment extent1 and target1 @ the targets file on the FreeBSD box:

initiator# iscsifs -u alice -h $ISCSI_SERVER_ADDR /iscsi/ pid 5286:initiator.c:2020: ***ERROR*** Bad "ISID": Got 16777217 expected 1.
pid 5286:initiator.c:1813: ***ERROR*** initiator_cmd_t failed
pid 5286:initiator.c:762: ***ERROR*** login_phase_i() failed
pid 5286:initiator.c:1169: ***ERROR*** enqueue_worker: full_feature_phase() failed (ignoring command)




I can connect to both just fine, with either version of the configuration file, from another FreeBSD server:

freebsd-initiator# iscontrol -n target0
iscontrol[21250]: running
iscontrol[21250]: (pass5:iscsi0:0:0:0):  tagged openings now 0
iscontrol[21250]: cam_open_btl: no passthrough device found at 3:0:1
iscontrol[21250]: cam_open_btl: no passthrough device found at 3:0:2
iscontrol[21250]: cam_open_btl: no passthrough device found at 3:0:3
iscontrol: supervise starting main loop

freebsd-initiator# iscontrol -n target1
iscontrol[21254]: running
iscontrol[21254]: (pass5:iscsi0:0:1:0):  tagged openings now 0
iscontrol[21254]: cam_open_btl: no passthrough device found at 3:1:1
iscontrol[21254]: cam_open_btl: no passthrough device found at 3:1:2
iscontrol[21254]: cam_open_btl: no passthrough device found at 3:1:3
iscontrol: supervise starting main loop

freebsd-initiator# dmesg | egrep "(da3|da4)"
da3 at iscsi0 bus 0 target 1 lun 0
da3: <NetBSD NetBSD iSCSI 0> Fixed Direct Access SCSI-3 device
da4 at iscsi0 bus 0 target 0 lun 0
da4: <NetBSD NetBSD iSCSI 0> Fixed Direct Access SCSI-3 device




I can't for the life of me figure out what I'm doing wrong.




p.s: A few observations about iscsifs:

a) If iscsifs exposes the iscsi target under a directory of one's choice, isn't -t target redundant? targets will show up under dir/ip/ , and the block storage is under the dir/ip/targetX directory.


b) small bug?
netbsd-initiator# iscsifs -u alice -h $ISCSI_SERVER_ADDR /iscsi&
[1] 529
# cd /iscsi
# dir
total 1.5K
drwxr-xr-x   2 root  wheel  -   0B Dec 31  1969 ./
drwxr-xr-x  24 root  wheel  - 1.0K Oct 21 08:48 ../
drwxr-xr-x   2 root  wheel  - 512B Sep 25 08:21 $ISCSI_SERVER_ADDR/
# dir $ISCSI_SERVER_ADDR/
ls: $ISCSI_SERVER_ADDR: No such file or directory <- XXXXXXXXXX ?
total 1.0K
drwxr-xr-x  2 root  wheel  - 512B Sep 25 08:21 ./
drwxr-xr-x  2 root  wheel  -   0B Dec 31  1969 ../
drwxr-xr-x  2 root  wheel  - 512B Sep 25 08:21 target0/


c) According to the manpage:
"The fourth field in the definition is the size of
the extent. The basic unit is bytes, and the shorthand KB, MB, GB, and TB can be used for kilobytes (1024 bytes), megabytes (1024 kilobytes), gigabytes (1024 megabytes), and terabytes (1024 gigabytes) respectively. It is possible to use the word ``size'' to use the full size of the pre-
    existing regular file given in the extent name."

but:
freebsd-target# /usr/local/etc/rc.d/iscsi_target forcestart
Starting iscsi_target.
Reading configuration from `/usr/local/etc/iscsi/targets'
target0:rw:0.0.0.0/0
       extent0:/dev/zvol/storage/volumes/vol0:0:0
DISK: 1 logical unit (0 blocks, 512 bytes/block), type iscsi fs
DISK: LUN 0: pid 45864:disk.c:675: ***ERROR*** error reading "target0"pid 45864:disk.c:807: ***ERROR*** error allocating space for "target0"pid 45864:target.
c:1553: ***ERROR*** device_init() failed
pid 45864:iscsi-target.c:145: ***ERROR*** target_init() failed

Assuming this was related to my use of ZVOLs, I tried with a md(4) device. Same problem.


Some more information:


With two targets defined:

FreeBSD iscsi-target:
> iSCSI Discovery login successful from iqn.1994-04.org.NetBSD.iscsi-initiator:agc on NETBSD_INITIATOR disk 0, ISID 0, TSIH 1 < iSCSI Discovery logout successful from iqn.1994-04.org.NetBSD.iscsi-initiator:agc on NETBSD_INITIATOR disk 0, ISID 0, TSIH 1 > iSCSI Normal login successful from iqn.1994-04.org.NetBSD.iscsi-initiator:agc on NETBSD_INITIATOR disk 0, ISID 0, TSIH 2 > iSCSI Normal login successful from iqn.1994-04.org.NetBSD.iscsi-initiator:agc on NETBSD_INITIATOR disk 1, ISID 72057594054705153, TSIH 3

NetBSD iscsifs:
pid 6274:initiator.c:2020: ***ERROR*** Bad "ISID": Got 16777217 expected 1.
pid 6274:initiator.c:1813: ***ERROR*** initiator_cmd_t failed
pid 6274:initiator.c:762: ***ERROR*** login_phase_i() failed
pid 6274:initiator.c:1169: ***ERROR*** enqueue_worker: full_feature_phase() failed (ignoring command)




FreeBSD iscsi-target:
> iSCSI Normal login successful from iqn.2005-01.il.ac.huji.cs::my.domain.local on FREEBSD_INITIATOR disk 0, ISID 3472488950783963769, TSIH 1 > iSCSI Normal login successful from iqn.2005-01.il.ac.huji.cs::my.domain.local on FREEBSD_INITIATOR disk 1, ISID 3472488950783963769, TSIH 2

FreeBSD iscontrol:
iscontrol[87746]: (pass5:iscsi0:0:0:0):  tagged openings now 0
iscontrol[87746]: cam_open_btl: no passthrough device found at 3:0:1
iscontrol[87746]: cam_open_btl: no passthrough device found at 3:0:2
iscontrol[87746]: cam_open_btl: no passthrough device found at 3:0:3
iscontrol[87750]: (pass5:iscsi0:0:1:0):  tagged openings now 0
iscontrol[87750]: cam_open_btl: no passthrough device found at 3:1:1
iscontrol[87750]: cam_open_btl: no passthrough device found at 3:1:2
iscontrol[87750]: cam_open_btl: no passthrough device found at 3:1:3
iscontrol: supervise starting main loop





And with just one target:

FreeBSD iscsi-target:
> iSCSI Discovery login successful from iqn.1994-04.org.NetBSD.iscsi-initiator:agc on NETBSD_INITIATOR disk 0, ISID 0, TSIH 1 < iSCSI Discovery logout successful from iqn.1994-04.org.NetBSD.iscsi-initiator:agc on NETBSD_INITIATOR disk 0, ISID 0, TSIH 1 > iSCSI Normal login successful from iqn.1994-04.org.NetBSD.iscsi-initiator:agc on NETBSD_INITIATOR disk 0, ISID 0, TSIH 2

NetBSD iscsifs:
(no output, it's working)




FreeBSD iscsi-target:
> iSCSI Normal login successful from iqn.2005-01.il.ac.huji.cs::my.domain.local on FREEBSD_INITIATOR disk 0, ISID 3472488950783963769, TSIH 1

FreeBSD iscontrol:

iscontrol[88007]: (pass5:iscsi0:0:0:0):  tagged openings now 0
iscontrol[88007]: cam_open_btl: no passthrough device found at 3:0:1
iscontrol[88007]: cam_open_btl: no passthrough device found at 3:0:2
iscontrol[88007]: cam_open_btl: no passthrough device found at 3:0:3
iscontrol: supervise starting main loop


Hope this helps.

Best regards,

Hugo

FREEBSD/NETBSD_INITIATOR should read FREEBSD_TARGET. Sorry, it's late. :)


Home | Main Index | Thread Index | Old Index