From owner-freebsd-scsi@freebsd.org Tue Jun 30 19:46:04 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 15AAD990725 for ; Tue, 30 Jun 2015 19:46:04 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (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 B277A15A4 for ; Tue, 30 Jun 2015 19:46:03 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by widjy10 with SMTP id jy10so39486978wid.1 for ; Tue, 30 Jun 2015 12:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=OYQaEi1+5F0027ukOnUyTVUhQOr0oBBGRM0/bQ+0wiU=; b=QZiqZzSVkDYJekCZmsqgDAXWlKxHD33ypsgNSTPFhrMr/WEKspc2cbijbdXFPS7X16 cTbBWkLW7N6wUbkWzxAZFoSbkA7kzWoKdQVcRnWvNnpaKpkQhznITUVFu5OQyGPCSy3T eWyfssAqWNS264dgYcyVy+AczDxZLXMaiVbNrHcGb026qZvKtCb2XEnCUYWEmvZ9Pzls wCD4MtnPK51biQGXAAp2oGJmWizkD7gQu2jwAgVUz2FOHVKcIkuEyydc8u7qHNOCXH4n oPbItYWAerU6+pbAUCUSGehvS18rvs1ir6Auzwj2k3YYShB+1pQ8WBWM0YImykLs7YzT y/Og== X-Received: by 10.180.218.195 with SMTP id pi3mr36218330wic.71.1435693561854; Tue, 30 Jun 2015 12:46:01 -0700 (PDT) Received: from brick.home (adem158.neoplus.adsl.tpnet.pl. [79.184.90.158]) by mx.google.com with ESMTPSA id r9sm70344900wjo.26.2015.06.30.12.46.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jun 2015 12:46:00 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 30 Jun 2015 21:45:58 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: RA H Cc: freebsd-scsi@freebsd.org Subject: Re: [iscsictl] connection to invalid target Message-ID: <20150630194558.GA1223@brick.home> Mail-Followup-To: RA H , freebsd-scsi@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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: Tue, 30 Jun 2015 19:46:04 -0000 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 certain > 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).