From owner-freebsd-scsi@freebsd.org Wed Jul 1 19:27:29 2015 Return-Path: Delivered-To: freebsd-scsi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59B4C99199D for ; Wed, 1 Jul 2015 19:27:29 +0000 (UTC) (envelope-from rah.lists@gmail.com) Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com [IPv6:2607:f8b0:4003:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 169A62774 for ; Wed, 1 Jul 2015 19:27:29 +0000 (UTC) (envelope-from rah.lists@gmail.com) Received: by oiax193 with SMTP id x193so39669494oia.2 for ; Wed, 01 Jul 2015 12:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=BaTw7TwIObZjX/QaPX1Oqe5ZwmXt8sanj/qTTwtXAHk=; b=rSsY7tfMqAsEMHB7WB+EM218V/+hU/w6YWbmojf4LVK7BaTIDBBg9yP3xiCBKjibR/ nhNqqEFI7dJ8JNf2aRhOYo+kz5faFMdAgu8oQPlXIyWDO9M5ZPJFKHwzWtbSNsGd1xJr StiI3xf5SH43/gOzIfsNymxtKbx7FOEIkvczoR2L3iTgxTzRuXoD5sfNjhhEFoRRLLqi 3WL5kDgJS8E3C1rkYIz5Xypzb3U4a4KqT7YHa27LiqwisAodwG2D3qAteE4jn8mq6ZJQ /Jh6Xc/H9nTQCHkD/fmIDVXH47d8KTQXUPRMvyNVFsjGgnhT7inQ8WeGeTfWlz5OBPB+ EoCQ== MIME-Version: 1.0 X-Received: by 10.182.29.68 with SMTP id i4mr23547622obh.57.1435778848345; Wed, 01 Jul 2015 12:27:28 -0700 (PDT) Received: by 10.202.44.16 with HTTP; Wed, 1 Jul 2015 12:27:28 -0700 (PDT) In-Reply-To: <20150630194558.GA1223@brick.home> References: <20150630194558.GA1223@brick.home> Date: Wed, 1 Jul 2015 15:27:28 -0400 Message-ID: Subject: Re: [iscsictl] connection to invalid target From: RA H To: RA H , freebsd-scsi@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2015 19:27:29 -0000 Thanks for the suggestion. Based on the debug log it looked like the problem was with the SAN, and in fact it is. Apparently it's not considered a pressing issue because most initiators will only attempt to connect to targets returned by a discovery session... I'm using another workaround for the target validation which works fine, but it's more complicated than my initial plan, nevermind simply parsing the output of a discovery session eg. "iscontrol -dt ". Since I have your attention, is there any chance of such a thing being implemented with iscsictl? Thanks again. On Tue, Jun 30, 2015 at 3:45 PM, Edward Tomasz Napiera=C5=82a wrote: > On 0629T1458, RA H wrote: > > I have a SAN with four iSCSI targets, > > eui.000B56007135B1B0 through eui.000B56007135B1B3 > > > > I need to validate target names entered manually by a user. > > Normally, I would do this is by searching the output of a discovery > > session. Since iscsictl doesn't allow doing discovery *only*, the only > > way I can think of to validate a target is to connect, then parse the > > output of "iscsictl -L". Unfortunately, attempting to connect to certai= n > > invalid targets results in connection to a valid target: > > > > # iscsictl -Ad 192.168.3.111 > > # iscsictl -L > > Target name Target portal State > > eui.000B56007135B1B0 192.168.3.111 Connected: da0 > > eui.000B56007135B1B1 192.168.3.111 Connected: da2 > > eui.000B56007135B1B2 192.168.3.111 Connected: da1 > > eui.000B56007135B1B3 192.168.3.111 Connected: da3 > > # iscsictl -Ra > > # iscsictl -A -p 192.168.3.111 -t eui.000B56007135B1A1 > > # iscsictl -L > > Target name Target portal State > > eui.000B56007135B1A1 192.168.3.111 Connected: da0 > > # dmesg > > ... > > da0: Serial Number 000B56007135B1B10000 > > ... > > > > As the Serial Number indicates, iscsictl actually connected to > > target eui.000B56007135B1B1. > > That's weird. Could you paste the iscsid debug log when this happens? > (Basically do "pkill iscsid; while :; do iscsid -d; done" in a separate > shell and capture the output). > >