Solved [Solved] iSCSI Connect missing dev

I am installing FreeBSD v10.0 (r268785) on a new machine and need to use iSCSI for some external storage. The NAS target is currently serving Windows and Mac volumes. This is the first target for FreeBSD (and the first time I have used iSCSI on FreeBSD). Everything seems correct and FreeBSD connects to the target at boot, the target supplies one LUN, but I do not get a
Code:
/dev/da*
node created.

Code:
iscsi.conf:
#
#  test storage via iscsi
#
t0 {
	TargetAddress = 10.31.251.18
	targetname = iqn.2014-08.int.trng:Master.iscsi1.vg0.teststore
	authmethod = CHAP
	chapIName  = testroot
	chapsecret = ************
     }

Code:
iscsictl -Lv
Session ID:       10
Initiator name:   iqn.1994-09.org.freebsd:test08.trng.int
Initiator portal: 
Initiator alias:  
Target name:      iqn.2014-08.int.trng:Master.iscsi1.vg0.teststore
Target portal:    10.31.251.18
Target alias:     
User:             testroot
Secret:           ************
Mutual user:      
Mutual secret:    
Session type:     Normal
Session state:    Connected
Failure reason:   
Header digest:    None
Data digest:      None
DataSegmentLen:   262144
ImmediateData:    Yes
iSER (RDMA):      No
Device nodes:

NAS target report:
Code:
initiator:iqn.1994-09.org.freebsd:test08.trng.int
ip:10.31.251.103
state:active

Did I do something wrong?
Any help appreciated!
 
Re: iscsi Connect missing dev

I changed the method used to connect and it now works.
  1. removed
    Code:
    iscsid_enable="YES"
    and
    Code:
    iscsictl_enable="YES"
    from rc.conf
  2. added
    Code:
    iscsi_initiator_load="YES"
    to /boot/loader.conf
  3. used iscontrol rather than iscsictl to establish the connection.
I don't know if iscontrol or iscsictl is the preferred method or the reasons to use one or the other. Any suggestions?
 
Re: iscsi Connect missing dev

iscsictl is the new initiator, which uses the kernel based iSCSI services. It only appeared in FreeBSD 10.0 so it's possible there could still be bugs in it. Do you get any interesting messages if you try and connect from the command line with the verbose flag?

Code:
# service iscsid onestart (if not enabled in /etc/rc.conf)
# iscsictl -Av -p 10.31.251.18 -t iqn.2014-08.int.trng:Master.iscsi1.vg0.teststore -u user -s secret
(You may need to boot up with the old initiator disabled first)
 
Re: iscsi Connect missing dev

The verbose flag is only allowed when doing a list (-L). When I try from the command line without the 'v' I don't get any messages.
 
Re: iscsi Connect missing dev

I have exactly the same problem here, iscsictl() connects to the target, but does not create a device node.

In the output of iscsictl -L the line ends with Connected: without any devices following the colon.

In the output of iscsictl -Lv the last lines are:
Code:
Session type:     Normal
Session state:    Connected
Failure reason:
Header digest:    None
Data digest:      None
DataSegmentLen:   8192
ImmediateData:    Yes
iSER (RDMA):      No
Device nodes:

with again no nodes after Device nodes:.
 
Re: iscsi Connect missing dev

@gapsl0ck - Is it possible for you to connect with iscontrol?

All - Is there some way to get a report similar to the one from iscsictl -Lv when iscontrol was used to establish the connection?
 
Last edited by a moderator:
Re: iSCSI Connect missing dev

From: Edward Tomasz Napierala 2014-10-04

Thank you. Turns out it's a bug, fixed in 11-CURRENT as r272409. Unfortunately the fix won't be a part of 10.1-RELEASE. The bug only affects iSCSI targets that claim compliance with an ancient SCSI version (SPC-2) and do not have LUN 0 configured. Easiest way to work around it would be to set up LUN 0 instead of 2.
 
Hello,

I'm receiving the same issue but my case is different:

I've got multithreading application. Each thread first exports one ZVOL over iscsi (by ctld) and after that it connect to it (by iscsictl - localhost).
When I run 30 or 50 threads at once when I type 'iscsictl -v' command I can see that some targets haven't device assign. I see exactly same output as mentioned in #5.

Do you have any idea what is it about?
 
I'm receiving the same issue but my case is different:
Please open a new thread. This is a thread that was solved 6 years ago. It talks about 11-CURRENT, which has since been released and is now reaching its EoL date.
 
Back
Top