From owner-freebsd-current@FreeBSD.ORG Fri Sep 27 10:16:51 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4278B5A0; Fri, 27 Sep 2013 10:16:51 +0000 (UTC) (envelope-from sergey.dyatko@gmail.com) Received: from mail-ea0-x22d.google.com (mail-ea0-x22d.google.com [IPv6:2a00:1450:4013:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A7A2A210D; Fri, 27 Sep 2013 10:16:50 +0000 (UTC) Received: by mail-ea0-f173.google.com with SMTP id g10so1116896eak.32 for ; Fri, 27 Sep 2013 03:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=berG7TnbF9ZLAhHibICzILEoZb8qPLc0avfHJmu4qE4=; b=dSBW/UDMHNvZT5ZBH3BOIYrIW6KUbmUMyq+jlk28kCvU3KYFFBcJ+Gth+uaSwcimqS FEoPe4CixIybESRqUQP+heHC2eSaESzxJMPz/Gg6fog3iwd+OJL/E+f5ylYAVvzoBXLl /ougIKBBzvP7NL78EQAHPOPYPdY6wlypVkwTRXN/LdsTQeCUnQxHVN8V6tqzVapJYXgb eT9BDhLr4D+3qasx0Lu85CUWbWAY3+eGmAB2BYWuQICjr51l9OCOINlRb9jdvqp1CW/6 vt/nEoqonkBNL8v/zaGDWwr+nFNmyS171P9UKgU7g9ednopRdf0Yei7xA4DifdxF/Qm7 +UfA== X-Received: by 10.14.88.65 with SMTP id z41mr9195440eee.38.1380277009013; Fri, 27 Sep 2013 03:16:49 -0700 (PDT) Received: from laptop.minsk.domain (m-s.agava.net. [195.222.84.203]) by mx.google.com with ESMTPSA id r48sm14396186eev.14.1969.12.31.16.00.00 (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 27 Sep 2013 03:16:48 -0700 (PDT) Date: Fri, 27 Sep 2013 13:16:57 +0300 From: "Sergey V. Dyatko" To: Edward Tomasz Napierala Subject: Re: iscsictl, Waiting for iscsid(8) Message-ID: <20130927131657.2cfc855b@laptop.minsk.domain> In-Reply-To: <49AD0635-88FB-46F4-A5B0-CC8180501BBA@FreeBSD.org> References: <20130927103629.6c04dc02@laptop.minsk.domain> <20130927105011.7323322f@laptop.minsk.domain> <49AD0635-88FB-46F4-A5B0-CC8180501BBA@FreeBSD.org> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cc: current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 10:16:51 -0000 On Fri, 27 Sep 2013 11:41:24 +0200 Edward Tomasz Napierala wrote: > Dnia 27 wrz 2013 o godz. 09:50 "Sergey V. Dyatko" > napisal(a): > > > On Fri, 27 Sep 2013 10:36:29 +0300 > > "Sergey V. Dyatko" wrote: > > > >> Hi, > >> > >> I have a time to play with native iSCSI stack on HEAD. > >> I have desktop (Alpha2, r255812) and laptop (alpha3, r255873M with > >> reverted r255870 and r255871) > >> On desktop I create following /etc/ctl.conf: > >> pidfile /var/run/ctld.pid > >> portal-group example2 { > >> discovery-auth-group no-authentication > >> listen 127.0.0.1 > >> listen 0.0.0.0:3261 > > Here you are listening on port 3261. > > >> } > >> target iqn.desktop:target0 { > >> alias "Testing target" > >> auth-group no-authentication > >> portal-group example2 > >> lun 0 { > >> path /dev/md0 > >> blocksize 4096 > >> } > >> } > >> > >> tiger# mdconfig -lv > >> md0 vnode 200M /storage/iscsi_test > >> tiger# iscsictl -A -h localhost -t iqn.desktop:target0 > >> > >> dmesg: > >> cfiscsi_ioctl_handoff: new connection from > >> iqn.1994-09.org.freebsd:tiger.minsk.domain (127.0.0.1) to > >> iqn.desktop:target0 > >> da0 at iscsi1 bus 0 scbus6 target 0 lun 0 > >> da0: Fixed Direct Access SCSI-5 device > >> da0: 200MB (51200 4096 byte sectors: 64H 32S/T 25C) > >> > >> tiger# ctladm islist -v > >> Session ID: 3 > >> Initiator name: iqn.1994-09.org.freebsd:tiger.minsk.domain > >> Initiator addr: 127.0.0.1 > >> Initiator alias: > >> Target name: iqn.desktop:target0 > >> Target alias: Testing target > >> Header digest: None > >> Data digest: None > >> DataSegmentLen: 131072 > >> ImmediateData: Yes > >> iSER (RDMA): No > >> > >> tiger# ctladm devlist -v > >> LUN Backend Size (Blocks) BS Serial Number Device > >> ID 0 block 51200 4096 MYSERIAL 0 MYDEVID > >> 0 lun_type=0 > >> num_threads=14 > >> file=/dev/md0 > >> cfiscsi_target=iqn.desktop:target0 > >> cfiscsi_target_alias=Testing target > >> cfiscsi_lun=0 > >> > >> Ok, seems it work > >> > >> now laptop: > >> laptop# iscsictl -A -h 192.168.9.98 -t iqn.desktop:target0 > >> nothing new on dmesg.. > >> > >> laptop# iscsictl -L > >> Target name Target addr State > >> iqn.desktop:target0 192.168.9.98 Waiting for > >> iscsid(8) > >> > >> I have a questions: > >> 1) is 'old' iscontrol work with native target (i tried it before, > >> w/o success too) ? > >> 2) what I missed, why laptop(iscsictl)->desktop(iscsid) do not > >> work in my case ? > > > > by the way.. on desktop (target): > > tiger# iscsictl -A -h localhost -t iqn.desktop:target0 > > tiger# iscsictl -L > > Target name Target addr State > > iqn.desktop:target0 localhost Connected: da0 > > > > tiger# iscsictl -Ra > > tiger# iscsictl -A -h 192.168.9.98 -t iqn.desktop:target0 > > And here you're trying to connect to the default, 3260. Thus... > > > tiger# iscsictl -L > > Target name Target addr State > > iqn.desktop:target0 192.168.9.98 Connection > > refused > > ... the Connection Refused. > Thank you, Edward ! oops, it was blind copy-paste from ctl.conf(5) Now I can use native iscsi target/initiator on my fresh laptop and desktop, thanks :) Also I have another machine (oooold HEAD, r239646) current# cat /etc/iscsi.conf tiger { TargetAddress=192.168.9.98 TargetName=iqn.desktop:target0 } current# kldload iscsi_initiator current# iscontrol -dt 192.168.9.98 TargetName=iqn.desktop:target0 current# iscontrol -n tiger current# iscontrol[43727]: running iscontrol[43727]: (pass1:iscsi0:0:0:0): tagged openings now 0 dmesg: iscsi: version 2.3.1 0] ic_init: cam subsystem initialized da0 at iscsi0 bus 0 scbus6 target 0 lun 0 da0: Fixed Direct Access SCSI-5 device da0: 200MB (51200 4096 byte sectors: 64H 32S/T 25C) > > tiger# sockstat -l4 > > USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN > > ADDRESS root ctld 10232 6 tcp4 127.0.0.1:3260 > > *:* root ctld 10232 7 tcp4 *:3261 *:* > > > > -- > > wbr, tiger -- wbr, tiger